mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
fix a stale cache issue
This commit is contained in:
parent
74b063453a
commit
2181d6de46
1 changed files with 5 additions and 1 deletions
|
@ -2457,15 +2457,19 @@ fn spawn_entity_by_data(
|
|||
EntitySpawnInfo::Filename(filename) => {
|
||||
let ent = EntityID::load(filename, Some(x as f64), Some(y as f64))?;
|
||||
entity_manager.set_current_entity(ent)?;
|
||||
let mut to_remove = Vec::new();
|
||||
for lua in
|
||||
entity_manager.iter_all_components_of_type::<LuaComponent>(ComponentTag::None)?
|
||||
{
|
||||
if ["data/scripts/props/suspended_container_physics_objects.lua"]
|
||||
.contains(&&*lua.script_source_file()?)
|
||||
{
|
||||
ent.remove_component(*lua)?;
|
||||
to_remove.push(lua);
|
||||
}
|
||||
}
|
||||
for lua in to_remove {
|
||||
entity_manager.remove_component(lua)?;
|
||||
}
|
||||
Ok(ent)
|
||||
}
|
||||
EntitySpawnInfo::Serialized {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue