From cc48136d9431fbd4a1ff8d0a22958d08aa818888 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Thu, 7 Jan 2021 18:00:29 -0700 Subject: [PATCH] Fix the editor's force floor tool --- js/main-editor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/main-editor.js b/js/main-editor.js index 3609a52..d3cc085 100644 --- a/js/main-editor.js +++ b/js/main-editor.js @@ -567,7 +567,7 @@ class SelectOperation extends MouseOperation { class ForceFloorOperation extends DrawOperation { start() { // Begin by placing an all-way force floor under the mouse - this.editor.place_in_cell(x, y, 'force_floor_all'); + this.editor.place_in_cell(this.gx0, this.gy0, {type: TILE_TYPES.force_floor_all}); } step(mx, my, gxf, gyf) { // Walk the mouse movement and change each we touch to match the direction we @@ -608,7 +608,7 @@ class ForceFloorOperation extends DrawOperation { if (i === 2) { let prevcell = this.editor.cell(prevx, prevy); if (prevcell[LAYERS.terrain].type.name.startsWith('force_floor_')) { - prevcell[LAYERS.terrain].type = TILE_TYPES[name]; + this.editor.place_in_cell(prevcell.x, prevcell.y, {type: TILE_TYPES[name]}); } } @@ -620,7 +620,7 @@ class ForceFloorOperation extends DrawOperation { { name = 'ice'; } - this.editor.place_in_cell(x, y, name); + this.editor.place_in_cell(x, y, {type: TILE_TYPES[name]}); prevx = x; prevy = y;