diff --git a/games/default/files/boats/init.lua b/games/default/files/boats/init.lua index 5f3ccb7ce..3cbb2b8bf 100644 --- a/games/default/files/boats/init.lua +++ b/games/default/files/boats/init.lua @@ -163,7 +163,7 @@ function boat.on_step(self, dtime) minetest.add_item(self.object:get_pos(), "boats:boat") self.object:remove() return - end]]-- + end]] self.v = get_v(self.object:get_velocity()) * get_sign(self.v) if self.driver then diff --git a/games/default/files/default/chests.lua b/games/default/files/default/chests.lua index ebd252288..9998786f0 100644 --- a/games/default/files/default/chests.lua +++ b/games/default/files/default/chests.lua @@ -26,34 +26,6 @@ local function get_chest_neighborpos(pos, param2, side) end end -default.chest_formspec = - "size[9,9.75]".. - "image_button_exit[8.4,-0.1;0.75,0.75;close.png;exit;;true;true;]".. - "background[-0.19,-0.25;9.41,10.48;formspec_chest.png]".. - "bgcolor[#08080880;true]".. - "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]".. - "list[current_name;main;0,0.5;9,4;]".. - "list[current_player;main;0,5.5;9,3;9]".. - "list[current_player;main;0,8.74;9,1;]" - -local chest_inv_size = 4*9 -local chest_inv_vers = 2 - -minetest.register_abm({ - nodenames = {"default:chest"}, - interval = 1, - chance = 1, - action = function(pos, node) - local meta = minetest.get_meta(pos) - local inv_v = meta:get_int("chest_inv_ver") - if inv_v and inv_v < chest_inv_vers then - local inv = meta:get_inventory() - inv:set_size("main",chest_inv_size) - meta:set_int("chest_inv_ver",chest_inv_vers) - end - end -}) - minetest.register_node("default:chest", { description = "Chest", tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", @@ -70,50 +42,60 @@ minetest.register_node("default:chest", { local p = get_chest_neighborpos(pos, param2, "right") meta:set_string("formspec", "size[9,11.5]".. - "image_button_exit[8.4,-0.1;0.75,0.75;close.png;exit;;true;true;]".. - "list[nodemeta:"..p.x..","..p.y..","..p.z..";main;0,0;9,3;]".. - "list[current_name;main;0,3;9,3;]".. - "list[current_player;main;0,7;9,3;9]".. - "list[current_player;main;0,10.5;9,1;]") - meta:set_string("infotext", "Large Chest") + "background[-0.2,-0.35;9.42,12.46;formspec_chest_large.png]".. + "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]" .. + "image_button_exit[8.35,-0.28;0.75,0.75;close.png;exit;;true;true;]".. + "list[nodemeta:"..p.x..","..p.y..","..p.z..";main;0.01,0.4;9,3;]".. + "list[current_name;main;0.01,3.39;9,3;]".. + "list[current_player;main;0.01,7.4;9,3;9]".. + "list[current_player;main;0,10.61;9,1;]") + meta:set_string("infotext", "Large Chest 1") minetest.swap_node(p, {name="default:chest_left", param2=param2}) local m = minetest.get_meta(p) m:set_string("formspec", "size[9,11.5]".. - "image_button_exit[8.4,-0.1;0.75,0.75;close.png;exit;;true;true;]".. - "list[current_name;main;0,0;9,3;]".. - "list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,3;9,3;]".. - "list[current_player;main;0,7;9,3;9]".. - "list[current_player;main;0,10.5;9,1;]") - m:set_string("infotext", "Large Chest") + "background[-0.2,-0.35;9.42,12.46;formspec_chest_large.png]".. + "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]" .. + "image_button_exit[8.35,-0.28;0.75,0.75;close.png;exit;;true;true;]".. + "list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0.01,3.39;9,3;]".. + "list[current_name;main;0.01,0.4;9,3;]".. + "list[current_player;main;0.01,7.4;9,3;9]".. + "list[current_player;main;0,10.61;9,1;]") + m:set_string("infotext", "Large Chest 2") elseif minetest.get_node(get_chest_neighborpos(pos, param2, "left")).name == "default:chest" then minetest.set_node(pos, {name="default:chest_left",param2=param2}) local p = get_chest_neighborpos(pos, param2, "left") meta:set_string("formspec", "size[9,11.5]".. - "image_button_exit[8.4,-0.1;0.75,0.75;close.png;exit;;true;true;]".. - "list[current_name;main;0,0;9,3;]".. - "list[nodemeta:"..p.x..","..p.y..","..p.z..";main;0,3;9,3;]".. - "list[current_player;main;0,7;9,3;9]".. - "list[current_player;main;0,10.5;9,1;]") - meta:set_string("infotext", "Large Chest") + "background[-0.2,-0.35;9.42,12.46;formspec_chest_large.png]".. + "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]" .. + "image_button_exit[8.35,-0.28;0.75,0.75;close.png;exit;;true;true;]".. + "list[nodemeta:"..p.x..","..p.y..","..p.z..";main;0.01,3.39;9,3;]".. + "list[current_name;main;0.01,0.4;9,3;]".. + "list[current_player;main;0.01,7.4;9,3;9]".. + "list[current_player;main;0,10.61;9,1;]") + meta:set_string("infotext", "Large Chest 3") minetest.swap_node(p, {name="default:chest_right", param2=param2}) local m = minetest.get_meta(p) m:set_string("formspec", "size[9,11.5]".. - "image_button_exit[8.4,-0.1;0.75,0.75;close.png;exit;;true;true;]".. - "list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0;9,3;]".. - "list[current_name;main;0,3;9,3;]".. - "list[current_player;main;0,7;9,3;9]".. - "list[current_player;main;0,10.5;9,1;]") - m:set_string("infotext", "Large Chest") + "background[-0.2,-0.35;9.42,12.46;formspec_chest_large.png]".. + "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]" .. + "image_button_exit[8.35,-0.28;0.75,0.75;close.png;exit;;true;true;]".. + "list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0.01,0.4;9,3;]".. + "list[current_name;main;0.01,3.39;9,3;]".. + "list[current_player;main;0.01,7.4;9,3;9]".. + "list[current_player;main;0,10.61;9,1;]") + m:set_string("infotext", "Large Chest 4") else meta:set_string("formspec", - "size[9,8.5]".. - "image_button_exit[8.4,-0.1;0.75,0.75;close.png;exit;;true;true;]".. - "list[current_name;main;0,0;9,3;]".. - "list[current_player;main;0,4;9,3;9]".. - "list[current_player;main;0,7.5.5;9,1;]") + "size[9,8.75]".. + "background[-0.2,-0.26;9.41,9.49;formspec_chest.png]".. + "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]" .. + "image_button_exit[8.35,-0.19;0.75,0.75;close.png;exit;;true;true;]".. + "list[current_name;main;0,0.5;9,3;]".. + "list[current_player;main;0,4.5;9,3;9]" .. + "list[current_player;main;0,7.74;9,1;]") meta:set_string("infotext", "Chest") end local inv = meta:get_inventory() @@ -158,7 +140,7 @@ minetest.register_node("default:chest_left", { tiles = {"default_chest_top_big.png", "default_chest_top_big.png", "default_chest_side.png", "default_chest_side.png", "default_chest_side_big.png^[transformFX", "default_chest_front_big.png"}, paramtype2 = "facedir", - groups = {choppy = 2, oddly_breakable_by_hand = 2,not_in_creative_inventory=1}, + groups = {choppy = 2, oddly_breakable_by_hand = 2, not_in_creative_inventory=1}, drop = "default:chest", sounds = default.node_sound_wood_defaults(), on_destruct = function(pos) @@ -172,12 +154,14 @@ minetest.register_node("default:chest_left", { return end local meta = minetest.get_meta(p) - meta:set_string("formspec", - "size[9,8.5]".. - "image_button_exit[8.4,-0.1;0.75,0.75;close.png;exit;;true;true;]".. - "list[current_name;main;0,0;9,3;]".. - "list[current_player;main;0,4;9,3;9]".. - "list[current_player;main;0,7.5.5;9,1;]") + meta:set_string("formspec", + "size[9,8.75]".. + "background[-0.2,-0.26;9.41,9.49;formspec_chest.png]".. + "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]" .. + "image_button_exit[8.35,-0.19;0.75,0.75;close.png;exit;;true;true;]".. + "list[current_name;main;0,0.5;9,3;]".. + "list[current_player;main;0,4.5;9,3;9]" .. + "list[current_player;main;0,7.74;9,1;]") meta:set_string("infotext", "Chest") minetest.swap_node(p, {name="default:chest", param2=param2}) end, @@ -213,7 +197,7 @@ minetest.register_node("default:chest_right", { tiles = {"default_chest_top_big.png^[transformFX", "default_chest_top_big.png^[transformFX", "default_chest_side.png", "default_chest_side.png", "default_chest_side_big.png", "default_chest_front_big.png^[transformFX"}, paramtype2 = "facedir", - groups = {choppy = 2, oddly_breakable_by_hand = 2,not_in_creative_inventory=1}, + groups = {choppy = 2, oddly_breakable_by_hand = 2, not_in_creative_inventory=1}, drop = "default:chest", sounds = default.node_sound_wood_defaults(), on_destruct = function(pos) @@ -227,12 +211,14 @@ minetest.register_node("default:chest_right", { return end local meta = minetest.get_meta(p) - meta:set_string("formspec", - "size[9,8.5]".. - "image_button_exit[9,0;1,1;close.png;exit;;true;true;]".. - "list[current_name;main;0,0;9,3;]".. - "list[current_player;main;0,4;9,3;9]".. - "list[current_player;main;0,7.5.5;9,1;]") + meta:set_string("formspec", + "size[9,8.75]".. + "background[-0.2,-0.26;9.41,9.49;formspec_chest.png]".. + "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]" .. + "image_button_exit[8.35,-0.19;0.75,0.75;close.png;exit;;true;true;]".. + "list[current_name;main;0,0.5;9,3;]".. + "list[current_player;main;0,4.5;9,3;9]" .. + "list[current_player;main;0,7.74;9,1;]") meta:set_string("infotext", "Chest") minetest.swap_node(p, {name="default:chest", param2=param2}) end, diff --git a/games/default/files/default/functions.lua b/games/default/files/default/functions.lua index 2c368760c..4a52c2110 100644 --- a/games/default/files/default/functions.lua +++ b/games/default/files/default/functions.lua @@ -539,9 +539,9 @@ local moss_correspondences = { } minetest.register_abm({ label = "Moss growth", - nodenames = {"default:cobble", "stairs:slab_cobble", "stairs:stair_cobble", + nodenames = {"default:cobble"--[[, "stairs:slab_cobble", "stairs:stair_cobble", "stairs:stair_inner_cobble", "stairs:stair_outer_cobble", - "walls:cobble"}, + "walls:cobble"]]}, neighbors = {"group:water"}, interval = 16, chance = 200, diff --git a/games/default/files/default/mapgen.lua b/games/default/files/default/mapgen.lua index c9f603821..39b7ce703 100644 --- a/games/default/files/default/mapgen.lua +++ b/games/default/files/default/mapgen.lua @@ -1072,7 +1072,7 @@ function default.register_decorations() rotation = "random", place_offset_y = -4, }) - end]]-- + end]] -- Jungle tree and log diff --git a/games/default/files/default/nodes.lua b/games/default/files/default/nodes.lua index 4f50a8252..e1ce5fa58 100644 --- a/games/default/files/default/nodes.lua +++ b/games/default/files/default/nodes.lua @@ -1195,7 +1195,7 @@ local function update_bookshelf(pos) local stack = invlist[i] if stack:is_empty() then formspec = formspec --[[.. - "image[" .. bx .. "," .. by .. ";1,1;default_bookshelf_slot.png]"]]-- + "image[" .. bx .. "," .. by .. ";1,1;default_bookshelf_slot.png]"]] else local metatable = stack:get_meta():to_table() or {} if metatable.fields and metatable.fields.text then @@ -1503,7 +1503,7 @@ minetest.register_node("default:glowstone", { {items = {'default:glowdust 3'}, rarity = 2}, {items = {'default:glowdust 2'}}, } - },]]-- + },]] light_source = 12, }) diff --git a/games/default/files/default/textures/default_mineral_emerald.png b/games/default/files/default/textures/default_mineral_emerald.png index c3f6404b2..7147aa01e 100644 Binary files a/games/default/files/default/textures/default_mineral_emerald.png and b/games/default/files/default/textures/default_mineral_emerald.png differ diff --git a/games/default/files/default/textures/default_stonebrick_mossy.png b/games/default/files/default/textures/default_stonebrick_mossy.png index 2befd72a5..325562b19 100644 Binary files a/games/default/files/default/textures/default_stonebrick_mossy.png and b/games/default/files/default/textures/default_stonebrick_mossy.png differ diff --git a/games/default/files/default/textures/formspec_chest.png b/games/default/files/default/textures/formspec_chest.png index 083eb3763..5ed452eb1 100644 Binary files a/games/default/files/default/textures/formspec_chest.png and b/games/default/files/default/textures/formspec_chest.png differ diff --git a/games/default/files/default/textures/formspec_chest_large.png b/games/default/files/default/textures/formspec_chest_large.png new file mode 100644 index 000000000..49e4723e3 Binary files /dev/null and b/games/default/files/default/textures/formspec_chest_large.png differ diff --git a/games/default/files/default/textures/hotbar_selected.png b/games/default/files/default/textures/hotbar_selected.png deleted file mode 100644 index 8240f5e39..000000000 Binary files a/games/default/files/default/textures/hotbar_selected.png and /dev/null differ diff --git a/games/default/files/default/workbench.lua b/games/default/files/default/workbench.lua index d6fc8718a..38b1a8260 100644 --- a/games/default/files/default/workbench.lua +++ b/games/default/files/default/workbench.lua @@ -8,16 +8,15 @@ local function set_workbench(player) local split_form = "" local workbench = "size[9,8.75]" .. "image_button_exit[8.4,-0.1;0.75,0.75;close.png;exit;;true;true;]".. - "background[-0.19,-0.25;9.41,9.49;formspec_workbench.png]" .. + "background[-0.2,-0.26;9.41,9.49;formspec_workbench.png]" .. "bgcolor[#08080880;true]" .. "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]" .. - "list[detached:split;main;8,3.15;1,1;]".. + "list[detached:split;main;8,3.14;1,1;]".. "list[current_player;main;0,4.5;9,3;9]" .. "list[current_player;main;0,7.74;9,1;]" .. "list[current_player;craft;2,0.5;3,3;]" .. "list[current_player;craftpreview;6.05,1.5;1,1;]" .. - split_form.. - "wob" + split_form minetest.show_formspec(player:get_player_name(), "main", workbench) end diff --git a/games/default/files/farming/nodes.lua b/games/default/files/farming/nodes.lua index 5b9f70a6f..286c5e959 100644 --- a/games/default/files/farming/nodes.lua +++ b/games/default/files/farming/nodes.lua @@ -36,7 +36,7 @@ minetest.override_item("default:dirt_with_coniferous_litter", { dry = "farming:soil", wet = "farming:soil_wet" } -})]]-- +})]] minetest.register_node("farming:soil", { description = "Soil", @@ -115,7 +115,7 @@ minetest.register_node("farming:straw", { "Straw Slab", default.node_sound_leaves_defaults(), true -)]]-- +)]] minetest.register_abm({ label = "Farming soil", diff --git a/games/default/files/player_api/init.lua b/games/default/files/player_api/init.lua index 7a1f353ea..303d1c853 100644 --- a/games/default/files/player_api/init.lua +++ b/games/default/files/player_api/init.lua @@ -29,6 +29,13 @@ minetest.register_on_joinplayer(function(player) {x = 200, y = 219}, 30 ) + +if PLATFORM ~= "Android" or PLATFORM ~= "iOS" then player:hud_set_hotbar_image("gui_hotbar.png") + player:hud_set_hotbar_itemcount(9) +else + player:hud_set_hotbar_image("gui_hotbar_touch.png") + player:hud_set_hotbar_itemcount(8) +end player:hud_set_hotbar_selected_image("gui_hotbar_selected.png") end) diff --git a/games/default/files/player_api/textures/gui_hotbar.png b/games/default/files/player_api/textures/gui_hotbar.png index 97d4508e5..e92a83ab4 100644 Binary files a/games/default/files/player_api/textures/gui_hotbar.png and b/games/default/files/player_api/textures/gui_hotbar.png differ diff --git a/games/default/files/default/textures/hotbar.png b/games/default/files/player_api/textures/gui_hotbar_touch.png similarity index 100% rename from games/default/files/default/textures/hotbar.png rename to games/default/files/player_api/textures/gui_hotbar_touch.png