From 019856883bce4c911ee01f2383b48c838ecdb002 Mon Sep 17 00:00:00 2001 From: myk002 Date: Mon, 18 Jul 2022 11:10:56 -0700 Subject: [PATCH] update sc-script docs based on code spelunking --- docs/builtins/sc-script.rst | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/builtins/sc-script.rst b/docs/builtins/sc-script.rst index 1d5d177c7..4c99f3225 100644 --- a/docs/builtins/sc-script.rst +++ b/docs/builtins/sc-script.rst @@ -2,8 +2,19 @@ sc-script --------- Runs commands when game state changes occur. This is similar to the static -`init-files` but can be set dynamically. +`init-files` but is slightly more flexible since it can be set dynamically. -Usage:: +Usage: - sc-script +- ``sc-script [help]`` + Show the list of valid event names. +- ``sc-script list []`` + List the currently registered files for all events or the specified event. +- ``sc-script add|remove [ ...]`` + Register or unregister a file to be run for the specified event. + +Examples: + +- ``sc-script add SC_MAP_LOADED spawn_extra_monsters.init`` + Registers the ``spawn_extra_monsters.init`` file to be run whenever a new map + is loaded.