Explicitly allow VFX to erase other VFX (otherwise undo breaks!)
This commit is contained in:
parent
fb1e749a28
commit
b4acc74e0a
@ -2279,6 +2279,13 @@ export class Level extends LevelInterface {
|
|||||||
|
|
||||||
spawn_animation(cell, name) {
|
spawn_animation(cell, name) {
|
||||||
let type = TILE_TYPES[name];
|
let type = TILE_TYPES[name];
|
||||||
|
// Spawned VFX erase any existing VFX
|
||||||
|
if (type.layer === LAYERS.vfx) {
|
||||||
|
let vfx = cell[type.layer];
|
||||||
|
if (vfx) {
|
||||||
|
this.remove_tile(vfx);
|
||||||
|
}
|
||||||
|
}
|
||||||
let tile = new Tile(type);
|
let tile = new Tile(type);
|
||||||
// Co-opt movement_cooldown/speed for these despite that they aren't moving, since those
|
// Co-opt movement_cooldown/speed for these despite that they aren't moving, since those
|
||||||
// properties are also used to animate everything else anyway. Decrement the cooldown
|
// properties are also used to animate everything else anyway. Decrement the cooldown
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user