mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-06-28 06:11:47 +02:00
Reverting minetest.env: calls
- Last minetest.env: calls removed - IRC rules' table moves into a list
This commit is contained in:
@ -127,8 +127,8 @@ function add_falling_protect_item(named)
|
||||
if minetest.is_protected(pointed_thing.above, pn) then
|
||||
return itemstack
|
||||
end
|
||||
minetest.env:add_node(pointed_thing.above, {name=itemstack:get_name()})
|
||||
local meta = minetest.env:get_meta(pointed_thing.above)
|
||||
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
|
||||
local meta = minetest.get_meta(pointed_thing.above)
|
||||
meta:set_string("owner", pn)
|
||||
nodeupdate(pointed_thing.above)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
@ -169,7 +169,7 @@ function add_protected_bukket_liquid(nameofbukket,liquidsourcename)
|
||||
return
|
||||
end
|
||||
-- Check if pointing to a buildable node
|
||||
n = minetest.env:get_node(pointed_thing.under)
|
||||
n = minetest.get_node(pointed_thing.under)
|
||||
|
||||
if is_protected_area(pointed_thing.under, 7 ,user:get_player_name()) then
|
||||
minetest.chat_send_player(user:get_player_name(),"You cant place here - Too short of a protected area.")
|
||||
@ -182,14 +182,14 @@ function add_protected_bukket_liquid(nameofbukket,liquidsourcename)
|
||||
if minetest.registered_nodes[n.name].buildable_to then
|
||||
-- buildable; replace the node
|
||||
minetest.log("action", user:get_player_name().. " use "..nameofbukket.." at ".. minetest.pos_to_string(pointed_thing.under))
|
||||
minetest.env:add_node(pointed_thing.under, {name=liquidsourcename})
|
||||
minetest.add_node(pointed_thing.under, {name=liquidsourcename})
|
||||
else
|
||||
-- not buildable to; place the liquid above
|
||||
-- check if the node above can be replaced
|
||||
n = minetest.env:get_node(pointed_thing.above)
|
||||
n = minetest.get_node(pointed_thing.above)
|
||||
if minetest.registered_nodes[n.name].buildable_to then
|
||||
minetest.log("action", user:get_player_name().. " use "..nameofbukket.." at ".. minetest.pos_to_string(pointed_thing.above))
|
||||
minetest.env:add_node(pointed_thing.above, {name=liquidsourcename})
|
||||
minetest.add_node(pointed_thing.above, {name=liquidsourcename})
|
||||
else
|
||||
-- do not remove the bucket with the liquid
|
||||
return
|
||||
|
@ -143,8 +143,8 @@ minetest.override_item("default:lava_source", {
|
||||
if minetest.is_protected(pointed_thing.above, pn) then
|
||||
return itemstack
|
||||
end
|
||||
minetest.env:add_node(pointed_thing.above, {name=itemstack:get_name()})
|
||||
local meta = minetest.env:get_meta(pointed_thing.above)
|
||||
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
|
||||
local meta = minetest.get_meta(pointed_thing.above)
|
||||
meta:set_string("owner", pn)
|
||||
nodeupdate(pointed_thing.above)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
@ -163,8 +163,8 @@ minetest.override_item("default:lava_flowing", {
|
||||
if minetest.is_protected(pointed_thing.above, pn) then
|
||||
return itemstack
|
||||
end
|
||||
minetest.env:add_node(pointed_thing.above, {name=itemstack:get_name()})
|
||||
local meta = minetest.env:get_meta(pointed_thing.above)
|
||||
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
|
||||
local meta = minetest.get_meta(pointed_thing.above)
|
||||
meta:set_string("owner", pn)
|
||||
nodeupdate(pointed_thing.above)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
@ -181,7 +181,7 @@ if PROTECT_LAVA_REALTIME == 1 then
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if meta:get_string("owner") ~= nil and minetest.is_protected(pos, meta:get_string("owner")) then
|
||||
minetest.add_node(pos,{name="air"})
|
||||
end
|
||||
@ -196,7 +196,7 @@ if PROTECT_WATER_REALTIME == 1 then
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if meta:get_string("owner") ~= nil and minetest.is_protected(pos, meta:get_string("owner")) then
|
||||
minetest.add_node(pos,{name="air"})
|
||||
end
|
||||
|
Reference in New Issue
Block a user