mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
get stuck less in HM walls from tether and stuff*
This commit is contained in:
parent
225c0c9944
commit
34d6849d33
3 changed files with 24 additions and 1 deletions
|
@ -9,6 +9,11 @@ local module = {}
|
|||
|
||||
util.replace_text_in("data/entities/animals/boss_centipede/sampo.xml", "data/entities/animals/boss_centipede/ending/sampo_start_ending_sequence.lua", "mods/quant.ew/files/system/ending/ending_sequence.lua")
|
||||
|
||||
local function float()
|
||||
local character_data = EntityGetFirstComponentIncludingDisabled(ctx.my_player.entity, "CharacterDataComponent")
|
||||
ComponentSetValue2(character_data, "mVelocity", 0, -40)
|
||||
end
|
||||
|
||||
rpc.opts_reliable()
|
||||
rpc.opts_everywhere()
|
||||
function rpc.gather_and_do_ending(x, y, sx, sy)
|
||||
|
@ -30,6 +35,7 @@ function rpc.gather_and_do_ending(x, y, sx, sy)
|
|||
wait(30)
|
||||
|
||||
EntitySetTransform(ctx.my_player.entity, x, y)
|
||||
float()
|
||||
|
||||
-- Emulate the following script being called from LuaComponent
|
||||
local old_updated = GetUpdatedEntityID
|
||||
|
|
|
@ -882,6 +882,11 @@ local function teleport_to_next_hm()
|
|||
end
|
||||
end
|
||||
|
||||
local function float()
|
||||
local character_data = EntityGetFirstComponentIncludingDisabled(ctx.my_player.entity, "CharacterDataComponent")
|
||||
ComponentSetValue2(character_data, "mVelocity", 0, -40)
|
||||
end
|
||||
|
||||
local function teleport_outside_cursed()
|
||||
--17370 < x < 18470
|
||||
--53210 < x
|
||||
|
@ -894,7 +899,12 @@ local function teleport_outside_cursed()
|
|||
local x, _ = EntityGetTransform(ctx.my_player.entity)
|
||||
local how_far_right = (x - (17370+550)) % 35840
|
||||
if how_far_right <= 550 or how_far_right >= (35840 - 550) then
|
||||
async(function()
|
||||
EntitySetTransform(ctx.my_player.entity, 14074, -820)
|
||||
wait(30)
|
||||
EntitySetTransform(ctx.my_player.entity, 14074, -820)
|
||||
float()
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -161,11 +161,17 @@ local function set_tether_length(length, entity)
|
|||
end
|
||||
end
|
||||
|
||||
local function float()
|
||||
local character_data = EntityGetFirstComponentIncludingDisabled(ctx.my_player.entity, "CharacterDataComponent")
|
||||
ComponentSetValue2(character_data, "mVelocity", 0, -80)
|
||||
end
|
||||
|
||||
function rpc.teleport_to_tower()
|
||||
async(function()
|
||||
EntitySetTransform(ctx.my_player.entity, 9740, 9100)
|
||||
wait(30)
|
||||
EntitySetTransform(ctx.my_player.entity, 9740, 9100)
|
||||
float()
|
||||
end)
|
||||
end
|
||||
|
||||
|
@ -241,6 +247,7 @@ function module.on_world_update_client()
|
|||
EntitySetTransform(ctx.my_player.entity, x, y)
|
||||
wait(40)
|
||||
EntitySetTransform(ctx.my_player.entity, x, y)
|
||||
float()
|
||||
end)
|
||||
elseif tether_length_3 > tether_length_2 then
|
||||
tether_length_3 = math.max(math.min(tether_length_3, math.sqrt(dist_sq) + 256), tether_length_2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue