Skip to content

Commit bbc056a

Browse files
committed
fix kaami again, dont sync tube lamps, dont dupe in world paha silma and mushrooms
1 parent 0c3403e commit bbc056a

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

ewext/src/modules/entity_sync/diff_model.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::NetManager;
22
use crate::{modules::ModuleCtx, my_peer_id, print_error};
33
use bimap::BiHashMap;
44
use eyre::{Context, ContextCompat, OptionExt};
5-
use noita_api::raw::{entity_create_new, raytrace_platforms};
5+
use noita_api::raw::{entity_create_new, game_get_frame_num, raytrace_platforms};
66
use noita_api::serialize::{deserialize_entity, serialize_entity};
77
use noita_api::{
88
game_print, AIAttackComponent, AbilityComponent, AdvancedFishAIComponent, AnimalAIComponent,
@@ -1493,8 +1493,11 @@ impl RemoteDiffModel {
14931493
entity
14941494
.iter_all_components_of_type_including_disabled::<VariableStorageComponent>(None)?
14951495
.for_each(|var| {
1496-
if var.name().unwrap_or("".into()) == "ew_gid_lid" {
1496+
let name = var.name().unwrap_or("".into());
1497+
if name == "ew_gid_lid" {
14971498
let _ = entity.remove_component(*var);
1499+
} else if name == "throw_time" {
1500+
let _ = var.set_value_int(game_get_frame_num().unwrap_or(0));
14981501
}
14991502
});
15001503

quant.ew/files/core/constants.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.phys_sync_allowed = {
2626
["data/entities/props/physics_seamine.xml"] = true,
2727

2828
["data/entities/props/physics_box_harmless.xml"] = true,
29-
["data/entities/props/physics_tubelamp.xml"] = true,
29+
--["data/entities/props/physics_tubelamp.xml"] = true,
3030

3131
["data/entities/props/suspended_container.xml"] = true,
3232
["data/entities/props/suspended_seamine.xml"] = true,
@@ -255,4 +255,4 @@ for line in string.gmatch(ModTextFileGetContent("mods/quant.ew/files/resource/in
255255
module.interned_filename_to_index[line] = #module.interned_index_to_filename
256256
end
257257

258-
return module
258+
return module

quant.ew/files/system/uniq_flags/uniq_flags.lua

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ function module.on_world_update()
6565
if EntityGetIsAlive(ent) and not EntityHasTag(ent, "ew_des") then
6666
local f = EntityGetFilename(ent)
6767
local seed = EntityGetFirstComponentIncludingDisabled(ent, "PositionSeedComponent")
68+
local x, y = EntityGetTransform(ent)
69+
local lx, ly = math.floor(x / 64), math.floor(y / 64)
6870
if
6971
f == "data/entities/misc/orb_07_pitcheck_b.xml"
7072
or f == "data/entities/misc/orb_07_pitcheck_a.xml"
@@ -76,12 +78,23 @@ function module.on_world_update()
7678
or f == "data/entities/props/music_machines/music_machine_03.xml"
7779
or f == "data/entities/animals/boss_fish/fish_giga.xml"
7880
then
79-
local x, y = EntityGetTransform(ent)
8081
local flag = f .. ":" .. math.floor(x / 512) .. ":" .. math.floor(y / 512)
8182
ewext.notrack(ent)
8283
rpc.request_flag_slow(flag, ent)
84+
elseif
85+
(
86+
f == "data/entities/props/physics_fungus.xml"
87+
and (lx == -29 or lx == -28 or lx == -27)
88+
and (ly == -20 or ly == -19)
89+
)
90+
or (f == "data/entities/props/physics_fungus_big.xml" and lx == -29 and ly == -20)
91+
or (f == "data/entities/props/physics_fungus_small.xml" and lx == -27 and ly == -19)
92+
or (f == "data/entities/items/pickup/evil_eye.xml" and lx == -39 and ly == -4)
93+
then
94+
local flag = f .. ":" .. lx .. ":" .. ly
95+
ewext.notrack(ent)
96+
rpc.request_flag_slow(flag, ent)
8397
elseif seed ~= nil then
84-
local x, y = ComponentGetValue2(seed, "pos_x"), ComponentGetValue2(seed, "pos_y")
8598
local flag = f .. ":" .. x .. ":" .. y
8699
ewext.notrack(ent)
87100
rpc.request_flag_slow(flag, ent)

quant.ew/files/system/wang_hooks/wang_hooks.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ local allow_patching = {
7878
spawn_rock1 = true,
7979
spawn_rock2 = true,
8080
spawn_prize = true,
81+
spawn_physics_fungus = true,
82+
spawn_physics_acid_fungus = true,
8183
--spawn_chest = true,
8284
}
8385

0 commit comments

Comments
 (0)