Page 1 of 1

Can't get access to locked chests [solved]

PostPosted: Tue Jul 10, 2012 21:18
by Ragnarok
After update to 0.4.dev-20120606 I can't move items between inventory and locked chest. I suppose I haven't apropriate priviledges. Any idea how to fix this?

PostPosted: Tue Jul 10, 2012 22:27
by Topywo
Try one of the following:

1. Changing true and false (Works in one version, but I don't expect it to work between versions after an upgrade, but you never know)
Search in the init.lua (under games/minetest_game/mods/default) "locked". The third or fourth one will show you this alinea:
local function has_locked_chest_privilege(meta, player)
if player:get_player_name() ~= meta:get_string("owner") then
return false
end
return true
end

Change false in true and true in false

Remove the stuff from the locked chest. Don't forget to change it back

2. Probably didn't work... This is the text in the init.lua from an older (april) version. Maybe copying it and pasting it over the (much larger) new text (starting from the alinea mentioned under 1. and ending where furnace begins) gives you the change to empty the locked chest. Then paste the new text back over the old.

minetest.register_node("default:chest_locked", {
description = "Locked Chest",
tile_images = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
"default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"},
paramtype2 = "facedir",
metadata_name = "locked_chest",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
})

PostPosted: Tue Jul 10, 2012 23:51
by lkjoel
Nice tutorial Topywo! If his problem is just that it's his own locked chest but he can't access it, your #1 should work (unless there are "copypasted" parts of the code, to which he'll have to do the same to them)

PostPosted: Wed Jul 11, 2012 09:31
by Ragnarok
Thanks a lot :) It helped. In my case (on Ubuntu Studio) init.lua is located under path: /usr/local/share/minetest/games/minetest_game/mods/default/init.lua