From af955fd218563cd13f0271a74dd5e9bf439cb172 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 24 Sep 2022 19:21:53 -0400 Subject: [PATCH 1/3] Add Prefabs tab to API manual --- docsrc/manual/scripting-capabilities.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docsrc/manual/scripting-capabilities.rst b/docsrc/manual/scripting-capabilities.rst index b64dce07..2475a27c 100644 --- a/docsrc/manual/scripting-capabilities.rst +++ b/docsrc/manual/scripting-capabilities.rst @@ -78,7 +78,7 @@ The grass-randomizer script above happens implicitly when the user paints on the // Porymap callback when project is opened. export function onProjectOpened(projectPath) { - utility.registerAction("applyNightTint", "View Night Tint", "T") + utility.registerAction("applyNightTint", "View Night Tint", "T") } Then, to trigger the ``applyNightTint()`` function, we could either click ``Tools -> View Night Tint`` or use the ``T`` keyboard shortcut. @@ -178,7 +178,7 @@ Callbacks .. js:function:: onMapViewTabChanged(oldTab, newTab) - Called when the selected tab in the map view tab bar is changed. Tabs are indexed from left to right, starting at 0 (``0``: Metatiles, ``1``: Collision). + Called when the selected tab in the map view tab bar is changed. Tabs are indexed from left to right, starting at 0 (``0``: Metatiles, ``1``: Collision, ``2``: Prefabs). :param number oldTab: the index of the previously selected tab :param number newTab: the index of the newly selected tab @@ -1244,13 +1244,13 @@ All settings functions are callable via the global ``utility`` object. .. js:function:: utility.getMapViewTab() - Gets the index of the currently selected map view tab. Tabs are indexed from left to right, starting at 0 (``0``: Metatiles, ``1``: Collision). + Gets the index of the currently selected map view tab. Tabs are indexed from left to right, starting at 0 (``0``: Metatiles, ``1``: Collision, ``2``: Prefabs). :returns number: current map view tab index .. js:function:: utility.setMapViewTab(tab) - Sets the currently selected map view tab. Tabs are indexed from left to right, starting at 0 (``0``: Metatiles, ``1``: Collision). + Sets the currently selected map view tab. Tabs are indexed from left to right, starting at 0 (``0``: Metatiles, ``1``: Collision, ``2``: Prefabs). :param number tab: index of the tab to select From 962efb3afa16e19567baecda2e197d673e8684a7 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 24 Sep 2022 19:41:27 -0400 Subject: [PATCH 2/3] Generalize pokefirered gym prefab --- resources/text/prefabs_default_firered.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/text/prefabs_default_firered.json b/resources/text/prefabs_default_firered.json index 613ef53b..adc45d77 100644 --- a/resources/text/prefabs_default_firered.json +++ b/resources/text/prefabs_default_firered.json @@ -309,47 +309,47 @@ "width": 6, "height": 5, "primary_tileset": "gTileset_General", - "secondary_tileset": "gTileset_ViridianCity", + "secondary_tileset": "", "metatiles": [ { "x": 0, "y": 0, - "metatile_id": 685, + "metatile_id": 313, "collision": 0, "elevation": 3 }, { "x": 1, "y": 0, - "metatile_id": 686, + "metatile_id": 314, "collision": 0, "elevation": 3 }, { "x": 2, "y": 0, - "metatile_id": 686, + "metatile_id": 314, "collision": 0, "elevation": 3 }, { "x": 3, "y": 0, - "metatile_id": 686, + "metatile_id": 314, "collision": 0, "elevation": 3 }, { "x": 4, "y": 0, - "metatile_id": 686, + "metatile_id": 314, "collision": 0, "elevation": 3 }, { "x": 5, "y": 0, - "metatile_id": 687, + "metatile_id": 315, "collision": 0, "elevation": 3 }, From 080dd0d0d77cb544e314f910d74033aa329a0433 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 24 Sep 2022 19:54:14 -0400 Subject: [PATCH 3/3] Generalize pokefirered gate prefab --- resources/text/prefabs_default_firered.json | 88 +++++++++++++++------ 1 file changed, 65 insertions(+), 23 deletions(-) diff --git a/resources/text/prefabs_default_firered.json b/resources/text/prefabs_default_firered.json index adc45d77..549b82a7 100644 --- a/resources/text/prefabs_default_firered.json +++ b/resources/text/prefabs_default_firered.json @@ -640,9 +640,9 @@ { "name": "Gate", "width": 6, - "height": 6, + "height": 7, "primary_tileset": "gTileset_General", - "secondary_tileset": "gTileset_ViridianCity", + "secondary_tileset": "", "metatiles": [ { "x": 0, @@ -773,111 +773,153 @@ { "x": 0, "y": 3, - "metatile_id": 368, + "metatile_id": 438, "collision": 1, "elevation": 0 }, { "x": 1, "y": 3, - "metatile_id": 693, + "metatile_id": 437, "collision": 1, "elevation": 0 }, { "x": 2, "y": 3, - "metatile_id": 694, + "metatile_id": 437, "collision": 1, "elevation": 0 }, { "x": 3, "y": 3, - "metatile_id": 694, + "metatile_id": 437, "collision": 1, "elevation": 0 }, { "x": 4, "y": 3, - "metatile_id": 695, + "metatile_id": 437, "collision": 1, "elevation": 0 }, { "x": 5, "y": 3, - "metatile_id": 369, + "metatile_id": 439, "collision": 1, "elevation": 0 }, { "x": 0, "y": 4, - "metatile_id": 100, + "metatile_id": 92, "collision": 1, "elevation": 0 }, { "x": 1, "y": 4, - "metatile_id": 400, + "metatile_id": 392, "collision": 1, "elevation": 0 }, { "x": 2, "y": 4, - "metatile_id": 401, - "collision": 0, - "elevation": 3 + "metatile_id": 393, + "collision": 1, + "elevation": 0 }, { "x": 3, "y": 4, - "metatile_id": 401, - "collision": 0, - "elevation": 3 + "metatile_id": 393, + "collision": 1, + "elevation": 0 }, { "x": 4, "y": 4, - "metatile_id": 402, + "metatile_id": 394, "collision": 1, "elevation": 0 }, { "x": 5, "y": 4, - "metatile_id": 102, + "metatile_id": 94, + "collision": 1, + "elevation": 0 + }, + { + "x": 0, + "y": 5, + "metatile_id": 100, "collision": 1, "elevation": 0 }, { "x": 1, "y": 5, - "metatile_id": 408, - "collision": 0, - "elevation": 3 + "metatile_id": 400, + "collision": 1, + "elevation": 0 }, { "x": 2, "y": 5, - "metatile_id": 409, + "metatile_id": 401, "collision": 0, "elevation": 3 }, { "x": 3, "y": 5, - "metatile_id": 409, + "metatile_id": 401, "collision": 0, "elevation": 3 }, { "x": 4, "y": 5, + "metatile_id": 402, + "collision": 1, + "elevation": 0 + }, + { + "x": 5, + "y": 5, + "metatile_id": 102, + "collision": 1, + "elevation": 0 + }, + { + "x": 1, + "y": 6, + "metatile_id": 408, + "collision": 0, + "elevation": 3 + }, + { + "x": 2, + "y": 6, + "metatile_id": 409, + "collision": 0, + "elevation": 3 + }, + { + "x": 3, + "y": 6, + "metatile_id": 409, + "collision": 0, + "elevation": 3 + }, + { + "x": 4, + "y": 6, "metatile_id": 410, "collision": 0, "elevation": 3