From 662787c28787d4bbf4ee704678a5a8feb8a3d59b Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Sun, 7 Mar 2021 00:46:01 -0700 Subject: [PATCH] Add palette support for sokoban tiles --- js/main-editor.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/js/main-editor.js b/js/main-editor.js index e9b50b4..e989d81 100644 --- a/js/main-editor.js +++ b/js/main-editor.js @@ -2518,6 +2518,21 @@ const SPECIAL_PALETTE_BEHAVIOR = { return 'circuit_block/xxx'; }, }, + sokoban_block: { + pick_palette_entry(tile) { + return 'sokoban_block/' + (tile.color ?? 'red'); + }, + }, + sokoban_button: { + pick_palette_entry(tile) { + return 'sokoban_button/' + (tile.color ?? 'red'); + }, + }, + sokoban_wall: { + pick_palette_entry(tile) { + return 'sokoban_wall/' + (tile.color ?? 'red'); + }, + }, }; // Fill in some special behavior that boils down to rotating tiles which happen to be encoded as // different tile types