mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
fix end fight, try to make end fight less laggy, sync angry ghost position, maybe fix shops with dedup off,
This commit is contained in:
parent
adbf6c6a63
commit
343e48a362
5 changed files with 78 additions and 6 deletions
|
@ -4,7 +4,9 @@ local ghost = {}
|
|||
function rpc.send_ghost_data(ghosts_memory)
|
||||
for i, entity in ipairs(EntityGetAllChildren(ctx.rpc_player_data.entity, "angry_ghost") or {}) do
|
||||
local memory = EntityGetFirstComponentIncludingDisabled(entity, "VariableStorageComponent", "angry_ghost_projectile_memory")
|
||||
ComponentSetValue2(memory, "value_string", ghosts_memory[i])
|
||||
ComponentSetValue2(memory, "value_string", ghosts_memory[i][1])
|
||||
EntitySetTransform(entity, ghosts_memory[i][2], ghosts_memory[i][3])
|
||||
ComponentSetValue2(EntityGetFirstComponentIncludingDisabled(entity, "VariableStorageComponent", "ew_ghost_rnd"), "value_float", ghosts_memory[i][4])
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -15,7 +17,9 @@ function ghost.on_world_update()
|
|||
local ghosts_memory = {}
|
||||
for _, entity in ipairs(EntityGetAllChildren(ctx.my_player.entity, "angry_ghost") or {}) do
|
||||
local memory = EntityGetFirstComponentIncludingDisabled(entity, "VariableStorageComponent", "angry_ghost_projectile_memory")
|
||||
table.insert(ghosts_memory, ComponentGetValue2(memory, "value_string"))
|
||||
local x, y = EntityGetTransform(entity)
|
||||
local rnd = ComponentGetValue2(EntityGetFirstComponentIncludingDisabled(entity, "VariableStorageComponent", "ew_ghost_rnd"), "value_float")
|
||||
table.insert(ghosts_memory, {ComponentGetValue2(memory, "value_string"), x, y, rnd})
|
||||
end
|
||||
if #ghosts_memory ~= 0 then
|
||||
rpc.send_ghost_data(ghosts_memory)
|
||||
|
|
|
@ -156,9 +156,13 @@ function end_fight.on_world_update()
|
|||
end
|
||||
end
|
||||
if init == -1 then
|
||||
local x, y = EntityGetTransform(ctx.my_player.entity)
|
||||
if is_in_box(5632, 7168, 14336, 15872, x, y) then
|
||||
ModTextFileSetContent("data/entities/misc/loose_chunks.xml", "<Entity/>")
|
||||
ModTextFileSetContent("data/entities/misc/loose_chunks_huge.xml", "<Entity/>")
|
||||
ModTextFileSetContent("data/entities/projectiles/deck/crumbling_earth_effect.xml", "<Entity/>")
|
||||
local _, y = EntityGetTransform(ctx.my_player.entity)
|
||||
if y < 10414 then
|
||||
stop_fully = true
|
||||
return
|
||||
end
|
||||
np.MagicNumbersSetValue("STREAMING_CHUNK_TARGET", 6)
|
||||
if EntityHasTag(ctx.my_player.entity, "ew_notplayer") then
|
||||
|
|
|
@ -36,7 +36,7 @@ function add_funginess_level(entity_who_picked)
|
|||
if peer_id ~= "DEBUG_NAME:player" then
|
||||
return
|
||||
end
|
||||
local funginess = tonumber( GlobalsGetValue( "PLAYER_FUNGAL_LEVEL" .. peer_id, "0" ) )
|
||||
local funginess = tonumber( GlobalsGetValue( "PLAYER_FUNGAL_LEVEL", "0" ) )
|
||||
funginess = funginess + 1
|
||||
GlobalsSetValue( "PLAYER_FUNGAL_LEVEL", tostring( funginess ) )
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue