mirror of
https://github.com/APercy/airutils.git
synced 2025-03-21 18:41:21 +00:00
fix
This commit is contained in:
parent
996e650194
commit
44a23b3928
1 changed files with 14 additions and 12 deletions
|
@ -96,19 +96,21 @@ minetest.register_node("airutils:papi",{
|
||||||
function airutils.remove_papi(pos)
|
function airutils.remove_papi(pos)
|
||||||
local meta = core.get_meta(pos)
|
local meta = core.get_meta(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local dir=node.param2
|
if node and meta then
|
||||||
if node.name == "airutils:papi_right" then
|
local dir=node.param2
|
||||||
core.set_node(pos, {name="airutils:papi", param2=dir})
|
if node.name == "airutils:papi_right" then
|
||||||
meta:set_string("infotext", "PAPI - left side\rOwned by: "..player_name)
|
core.set_node(pos, {name="airutils:papi", param2=dir})
|
||||||
|
meta:set_string("infotext", "PAPI - left side\rOwned by: "..player_name)
|
||||||
|
end
|
||||||
|
|
||||||
|
meta:set_string("owner", player_name)
|
||||||
|
meta:set_string("dont_destroy", "false")
|
||||||
|
|
||||||
|
if meta:get_string("dont_destroy") == "true" then
|
||||||
|
-- when swapping it
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
meta:set_string("owner", player_name)
|
|
||||||
meta:set_string("dont_destroy", "false")
|
|
||||||
|
|
||||||
if meta:get_string("dont_destroy") == "true" then
|
|
||||||
-- when swapping it
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- PAPI right node
|
-- PAPI right node
|
||||||
|
|
Loading…
Add table
Reference in a new issue