From 1b48c291c9c7bca65f2363b89834abc03678f50e Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Fri, 1 Jan 2021 17:30:50 -0700 Subject: [PATCH] Implement the pgchip clone block ice cloning hack --- js/format-dat.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/js/format-dat.js b/js/format-dat.js index d2fd493..357579d 100644 --- a/js/format-dat.js +++ b/js/format-dat.js @@ -247,6 +247,16 @@ function parse_level(bytes, number) { continue; } + // pgchip grants directions to ice blocks on cloners by putting a clone block + // beneath them instead + if (l === 1 && 0x0e <= tile_byte && tile_byte <= 0x11 && + cell[0] && cell[0].type.name === 'ice_block') + { + cell[0].direction = extra.direction; + cell.unshift({type: TILE_TYPES['cloner']}); + continue; + } + cell.unshift({...tile}); } }