From 19112cf7a639dccff576178f8fe4442ff5ffe8da Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 15 Dec 2021 09:15:11 -0500 Subject: [PATCH] Add new functions to manual's 'Settings Functions' section --- docsrc/manual/scripting-capabilities.rst | 40 ++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/docsrc/manual/scripting-capabilities.rst b/docsrc/manual/scripting-capabilities.rst index 531a93fb..096734a4 100644 --- a/docsrc/manual/scripting-capabilities.rst +++ b/docsrc/manual/scripting-capabilities.rst @@ -142,14 +142,14 @@ Callbacks .. js:function:: onMainTabChanged(oldTab, newTab) - Called when the selected tab in the main tab bar is changed. Tabs are indexed from left to right, starting at 0 (``0``: Map, ``1``: Events, ``2``: Header, ``3``: Connections, ``4``: Wild Pokemon) + Called when the selected tab in the main tab bar is changed. Tabs are indexed from left to right, starting at 0 (``0``: Map, ``1``: Events, ``2``: Header, ``3``: Connections, ``4``: Wild Pokemon). :param number oldTab: the index of the previously selected tab :param number newTab: the index of the newly selected tab .. 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). :param number oldTab: the index of the previously selected tab :param number newTab: the index of the newly selected tab @@ -585,6 +585,42 @@ The following functions are related to settings. :param boolean enabled: smart paths enabled +.. js:function:: map.getBaseGameVersion() + + Gets the project's base game version. + + :returns string: ``"pokeruby"``, ``"pokefirered"``, or ``"pokeemerald"`` + +.. js:function:: map.getCustomScripts() + + Gets the list of paths to custom scripts. + + :returns array: string array of custom scripts paths + +.. js:function:: map.getMainTab() + + Gets the index of the currently selected main tab. Tabs are indexed from left to right, starting at 0 (``0``: Map, ``1``: Events, ``2``: Header, ``3``: Connections, ``4``: Wild Pokemon). + + :returns number: current main tab index + +.. js:function:: map.setMainTab(tab) + + Sets the currently selected main tab. Tabs are indexed from left to right, starting at 0 (``0``: Map, ``1``: Events, ``2``: Header, ``3``: Connections, ``4``: Wild Pokemon). + + :param number tab: index of the tab to select + +.. js:function:: map.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). + + :returns number: current map view tab index + +.. js:function:: map.setMapViewTab(tab) + + Sets the currently selected map view tab. Tabs are indexed from left to right, starting at 0 (``0``: Metatiles, ``1``: Collision). + + :param number tab: index of the tab to select + Utility Functions ^^^^^^^^^^^^^^^^^