working protected beacons with is_protected (protector-mod compatible: player-allowed list)
This commit is contained in:
parent
ac8096bdb0
commit
3585a87c8b
9
init.lua
9
init.lua
@ -457,6 +457,15 @@ minetest.register_globalstep(function(dtime)
|
||||
pl.started_emerge = false
|
||||
|
||||
elseif pl.allow_teleport and (stand_node.name == 'telemosaic:beacon' or stand_node.name == 'telemosaic:beacon_protected') then
|
||||
if stand_node.name == 'telemosaic:beacon_protected' then
|
||||
-- check protection on protected telemosaic
|
||||
if minetest.is_protected(pos, name) then
|
||||
-- protected telemosaic, reset moved-flag and abort
|
||||
pl.allow_teleport = false
|
||||
pl.last_pos = pos_hash
|
||||
return
|
||||
end
|
||||
end
|
||||
pl.time_in_pos = pl.time_in_pos + dtime
|
||||
|
||||
if pl.time_in_pos > C.emerge_delay and not pl.started_emerge then
|
||||
|
Loading…
x
Reference in New Issue
Block a user