From 9091d61132020782d1a3d8eafc6118bd763a982c Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sun, 6 Sep 2015 14:09:17 +0200 Subject: [PATCH] Fix locked chests' formspec --- minetestforfun_game/mods/default/nodes.lua | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/minetestforfun_game/mods/default/nodes.lua b/minetestforfun_game/mods/default/nodes.lua index 8ce986ab..5db96877 100755 --- a/minetestforfun_game/mods/default/nodes.lua +++ b/minetestforfun_game/mods/default/nodes.lua @@ -1803,8 +1803,8 @@ minetest.register_node("default:torch", { }) local chest_formspec = - "size[8,9]".. - default.gui_slots .. + "size[8,9]" .. + default.gui_bg .. default.gui_bg_img .. default.gui_slots .. "list[current_name;main;0,0.3;8,4;]" .. @@ -1812,8 +1812,7 @@ local chest_formspec = "list[current_player;main;0,6.08;8,3;8]" .. "listring[current_name;main]" .. "listring[current_player;main]" .. - default.get_hotbar_bg(0, 4.85) .. - default.get_hotbar_bg(0, 6.85) + default.get_hotbar_bg(0,4.85) local function get_locked_chest_formspec(pos) local spos = pos.x .. "," .. pos.y .. "," .. pos.z @@ -1823,12 +1822,11 @@ local function get_locked_chest_formspec(pos) default.gui_bg_img .. default.gui_slots .. "list[nodemeta:".. spos .. ";main;0,0.3;8,4;]".. - "list[current_player;main;0,4.85;8,4;]".. + "list[current_player;main;0,4.85;8,1;]".. "list[current_player;main;0,6.08;8,3;8]" .. "listring[nodemeta:" .. spos .. ";main]" .. "listring[current_player;main]" .. - default.get_hotbar_bg(0, 4.85) .. - default.get_hotbar_bg(0, 5.85) + default.get_hotbar_bg(0,4.85) return formspec end @@ -1875,7 +1873,6 @@ minetest.register_node("default:chest", { end, }) - minetest.register_node("default:chest_locked", { description = "Locked Chest", tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", @@ -1883,6 +1880,7 @@ minetest.register_node("default:chest_locked", { paramtype2 = "facedir", groups = {choppy = 2, oddly_breakable_by_hand = 2}, legacy_facedir_simple = true, + is_ground_content = false, sounds = default.node_sound_wood_defaults(), after_place_node = function(pos, placer) @@ -1949,7 +1947,6 @@ minetest.register_node("default:chest_locked", { minetest.log("action", player:get_player_name() .. " takes stuff from locked chest at " .. minetest.pos_to_string(pos)) end, - on_rightclick = function(pos, node, clicker) local meta = minetest.get_meta(pos) if has_locked_chest_privilege(meta, clicker) then @@ -1960,7 +1957,6 @@ minetest.register_node("default:chest_locked", { ) end end, - on_blast = function() end, })