mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
dont tp to tower if you already have been in it
This commit is contained in:
parent
47ccff6544
commit
f733a56945
2 changed files with 9 additions and 1 deletions
|
@ -60,7 +60,7 @@ local water_mats = {"water", "swamp", "water_swamp", "water_salt", "blood", "mud
|
|||
local ignore_spell = {"ANTIHEAL", "BLACK_HOLE", "BLACK_HOLE_DEATH_TRIGGER", "POWERDIGGER", "DIGGER", "PIPE_BOMB", "PIPE_BOMB_DEATH_TRIGGER", "GRENADE_LARGE", "CRUMBLING_EARTH", "HEAL_BULLET", "FISH",
|
||||
"TELEPORT_PROJECTILE_CLOSER", "TELEPORT_PROJECTILE_STATIC", "SWAPPER_PROJECTILE", "TELEPORT_PROJECTILE", "TELEPORT_PROJECTILE_SHORT", "WHITE_HOLE", "CESSATION", "ADD_TRIGGER",
|
||||
"ADD_TIMER", "ADD_DEATH_TRIGGER", "DIVIDE_2", "DIVIDE_3", "DIVIDE_4", "DIVIDE_10", "GAMMA", "MU", "ALPHA", "OMEGA", "PHI", "SIGMA", "TAU", "SUMMON_PORTAL", "DUPLICATE",
|
||||
"IF_PROJECTILE", "IF_HP", "IF_ENEMY", "IF_HALF", "IF_ELSE", "IF_END", "ALL_SPELLS", "SUMMON_ROCK", "SUMMON_EGG", "SUMMON_HOLLOW_EGG", "PEBBLE"}
|
||||
"IF_PROJECTILE", "IF_HP", "IF_ENEMY", "IF_HALF", "IF_ELSE", "IF_END", "ALL_SPELLS", "SUMMON_ROCK", "SUMMON_EGG", "SUMMON_HOLLOW_EGG", "PEBBLE", "COMMON_GRUB"}
|
||||
|
||||
local function get_potions_of_type(type)
|
||||
local potions = {}
|
||||
|
|
|
@ -7,6 +7,8 @@ local tether_length_2 = tether_length + 128
|
|||
|
||||
local module = {}
|
||||
|
||||
local ignore_tower = false
|
||||
|
||||
function is_in_box(x1, x2, y1, y2, x, y)
|
||||
return x1 < x and x < x2 and y1 < y and y < y2
|
||||
end
|
||||
|
@ -167,6 +169,9 @@ local function float()
|
|||
end
|
||||
|
||||
function rpc.teleport_to_tower()
|
||||
if ignore_tower then
|
||||
return
|
||||
end
|
||||
local x2, y2 = EntityGetTransform(ctx.my_player.entity)
|
||||
if is_in_box(9200, 11000, 8300, 9800, x2, y2) then
|
||||
return
|
||||
|
@ -192,6 +197,9 @@ function module.on_world_update()
|
|||
return
|
||||
end
|
||||
local x2, y2 = EntityGetTransform(ctx.my_player.entity)
|
||||
if is_in_box(9200, 11000, 4000, 8300, x2, y2) then
|
||||
ignore_tower = true
|
||||
end
|
||||
if np.GetGameModeNr() ~= 2
|
||||
and tonumber(SessionNumbersGetValue("NEW_GAME_PLUS_COUNT")) == 0
|
||||
and is_in_box(9200, 11000, 8300, 9800, x2, y2) then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue