mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
World sync reset on NG+
This commit is contained in:
parent
fbb0de1538
commit
334556f80d
2 changed files with 3 additions and 0 deletions
|
@ -523,6 +523,7 @@ impl NetManager {
|
|||
self.world_info.update_player_pos(peer_id, x, y);
|
||||
}
|
||||
}
|
||||
Some("reset_world") => state.world.reset(),
|
||||
key => {
|
||||
error!("Unknown msg from mod: {:?}", key)
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ function rpc.gather_and_do_ending(x, y, sx, sy)
|
|||
local entity = EntityCreateNew("totally_sampo")
|
||||
EntitySetTransform(entity, sx, sy)
|
||||
|
||||
-- Emulate the following script being called from LuaComponent
|
||||
local old_updated = GetUpdatedEntityID
|
||||
function GetUpdatedEntityID()
|
||||
return entity
|
||||
|
@ -25,6 +26,7 @@ function rpc.gather_and_do_ending(x, y, sx, sy)
|
|||
dofile("data/entities/animals/boss_centipede/ending/sampo_start_ending_sequence.lua")
|
||||
|
||||
GetUpdatedEntityID = old_updated
|
||||
net.proxy_send("reset_world", "")
|
||||
end
|
||||
|
||||
np.CrossCallAdd("ew_ending_sequence", function(sx, sy, sampo_ent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue