mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
avoid teleporters as notplayer
This commit is contained in:
parent
97827098ff
commit
08b43e0bd2
1 changed files with 9 additions and 0 deletions
|
@ -1389,6 +1389,15 @@ local function update()
|
||||||
end
|
end
|
||||||
state.stationary_check = {}
|
state.stationary_check = {}
|
||||||
end
|
end
|
||||||
|
if GameGetFrameNum() % 10 == 6 then
|
||||||
|
for _, ent in ipairs(EntityGetInRadius(mx, my, 256)) do
|
||||||
|
if EntityGetFirstComponentIncludingDisabled(ent, "TeleportComponent") ~= nil and not table.contains(state.ignore, ent) then
|
||||||
|
table.insert(state.ignore, ent)
|
||||||
|
local x, y = EntityGetTransform(ent)
|
||||||
|
table.insert(state.stay_away, {x, y, ent})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function module.on_world_update()
|
function module.on_world_update()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue