Rule-updated entities should get new burnable/sinkable
This commit is contained in:
parent
3b6282c152
commit
3f6a14e142
@ -90,8 +90,11 @@ game.system.Logic = (entitiesGrid) => {
|
||||
const entity = entities[id];
|
||||
if (entity.hasComponent("name") && entity.components.name.selector == entityName) {
|
||||
const e = nounsToEntityCreators[applicationEntityName]();
|
||||
entity.components.name = e.components.name;
|
||||
entity.components.sprite = e.components.sprite;
|
||||
["name", "sprite", "burnable", "sinkable"].map((name) => {
|
||||
if (e.hasComponent(name)) {
|
||||
entity.components[name] = e.components[name];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user