From af66a53b2b5cac9de67cf02c7aa7eb9d8c029929 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Sat, 8 May 2021 17:51:56 -0600 Subject: [PATCH] Fix ghosts switching railroad tracks --- js/tiletypes.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/tiletypes.js b/js/tiletypes.js index 95d8071..f9f54f2 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -634,6 +634,9 @@ const TILE_TYPES = { level._set_tile_prop(me, 'entered_direction', other.direction); }, on_depart(me, level, other) { + if (other.type.name === 'ghost') + // Ghosts do not switch tracks + return; if (! level.is_tile_wired(me, false)) { // Only switch if both the entering and the leaving are CURRENTLY valid directions // (which has some quirky implications for the railroad sign)