mirror of
https://github.com/HybridDog/connected_chests.git
synced 2024-12-28 06:00:17 +01:00
Use new setting functions
This commit is contained in:
parent
22d824e24f
commit
187cac3c45
6
init.lua
6
init.lua
@ -169,7 +169,7 @@ function connected_chests.register_chest(fromname, data)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
connect_chests(pu, pa, par2, fromname)
|
connect_chests(pu, pa, par2, fromname)
|
||||||
if not minetest.setting_getbool"creative_mode" then
|
if not minetest.settings:get_bool"creative_mode" then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
@ -199,7 +199,7 @@ function connected_chests.register_chest(fromname, data)
|
|||||||
chest.after_place_node = nil
|
chest.after_place_node = nil
|
||||||
chest.on_receive_fields = nil
|
chest.on_receive_fields = nil
|
||||||
if data.on_rightclick then
|
if data.on_rightclick then
|
||||||
chest.on_rightclick = data.on_rightclick
|
chest.on_rightclick = function()print"yem"end--data.on_rightclick
|
||||||
end
|
end
|
||||||
|
|
||||||
if not data.front then
|
if not data.front then
|
||||||
@ -293,7 +293,7 @@ connected_chests.register_chest("default:chest_locked", {
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local pname = clicker:get_player_name()
|
local pname = clicker:get_player_name()
|
||||||
if pname == meta:get_string"owner"
|
if pname == meta:get_string"owner"
|
||||||
or pname == minetest.setting_get"name" then
|
or pname == minetest.settings:get"name" then
|
||||||
minetest.show_formspec(
|
minetest.show_formspec(
|
||||||
pname,
|
pname,
|
||||||
"default:chest_locked_connected_left",
|
"default:chest_locked_connected_left",
|
||||||
|
Loading…
Reference in New Issue
Block a user