From 4cd0585d0bd799969f8bcb0c32fca525c3930bbe Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Thu, 1 Oct 2020 03:22:49 -0600 Subject: [PATCH] Revert the blue wall compat fix and replace them with popwalls instead (fixes #5) --- js/main.js | 8 ++++---- js/tiletypes.js | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/js/main.js b/js/main.js index 3cdd1ae..c40b899 100644 --- a/js/main.js +++ b/js/main.js @@ -256,7 +256,7 @@ class Player extends PrimaryView { this.compat = { popwalls_react_on_arrive: false, auto_convert_ccl_popwalls: true, - blue_walls_walkable: true, + auto_convert_ccl_blue_walls: true, sliding_tanks_ignore_button: true, tiles_react_instantly: false, allow_flick: false, @@ -1405,10 +1405,10 @@ const COMPAT_OPTIONS = [{ impls: ['lynx', 'ms'], note: "This is a more conservative solution to the problem with recessed walls. It replaces recessed walls with a new tile, \"doubly recessed walls\", only if they begin the level with something on top of them. This should resolve compatibility issues without changing the behavior of recessed walls.", }, { - key: 'blue_walls_walkable', - label: "Blocks can be pushed off of blue walls", + key: 'auto_convert_ccl_blue_walls', + label: "Fix loaded blue walls", impls: ['lynx'], - note: "Generally, you can only push a block if it's in a space you could otherwise move into, but Tile World Lynx allows pushing blocks off of blue walls. (Unclear whether this is a Tile World bug, or a Lynx bug that Tile World is replicating.) The same effect can be achieved in Steam by using a recessed wall instead, assuming you're using the Steam recessed wall behavior.", + note: "Generally, you can only push a block if it's in a space you could otherwise move into, but Tile World Lynx allows pushing blocks off of blue walls. (Unclear whether this is a Tile World bug, or a Lynx bug that Tile World is replicating.) The same effect can be achieved in Steam by using a recessed wall instead, so this replaces such walls with recessed walls. Note that this fix may have unintended side effects in conjunction with the recessed wall compat option.", }, { key: 'sliding_tanks_ignore_button', label: "Blue tanks ignore blue buttons while sliding", diff --git a/js/tiletypes.js b/js/tiletypes.js index 4d127c0..300dc93 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -153,14 +153,14 @@ const TILE_TYPES = { }, fake_wall: { draw_layer: LAYER_TERRAIN, - blocks_monsters: true, - blocks_blocks: true, - blocks(me, level, other) { - if (other.type.is_player && level.compat.blue_walls_walkable) { - return false; - } - else { - return true; + blocks_all: true, + on_ready(me, level) { + if (level.compat.auto_convert_ccl_blue_walls && + me.cell.some(tile => tile.type.is_actor)) + { + // Blocks can be pushed off of blue walls in TW Lynx, which only works due to a tiny + // quirk of the engine that I don't want to replicate, so replace them with popwalls + me.type = TILE_TYPES['popwall']; } }, on_bump(me, level, other) {