diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-02-09 03:31:46 -0500 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-02-09 03:31:46 -0500 |
commit | 8c590b26f38d2ee05a68aa1dec993f05129adbee (patch) | |
tree | 6d0d224eda9c3968a16b0cc6830d936daf6c7e65 /sigmod | |
parent | 1ac135c6f5341e7ca39e89416ce07fbea29e837b (diff) | |
download | sigen-8c590b26f38d2ee05a68aa1dec993f05129adbee.tar.gz sigen-8c590b26f38d2ee05a68aa1dec993f05129adbee.tar.xz sigen-8c590b26f38d2ee05a68aa1dec993f05129adbee.zip |
Better documentation for scripts in sigmod
Diffstat (limited to 'sigmod')
-rw-r--r-- | sigmod/CoinList.h | 4 | ||||
-rw-r--r-- | sigmod/GlobalScript.h | 10 | ||||
-rw-r--r-- | sigmod/Item.h | 12 | ||||
-rw-r--r-- | sigmod/Move.h | 26 | ||||
-rw-r--r-- | sigmod/Skin.h | 7 | ||||
-rw-r--r-- | sigmod/Status.h | 14 | ||||
-rw-r--r-- | sigmod/Tile.h | 8 | ||||
-rw-r--r-- | sigmod/Weather.h | 7 |
8 files changed, 57 insertions, 31 deletions
diff --git a/sigmod/CoinList.h b/sigmod/CoinList.h index 064b1b54..07363b6f 100644 --- a/sigmod/CoinList.h +++ b/sigmod/CoinList.h @@ -113,9 +113,9 @@ class SIGMOD_EXPORT CoinList : public Object * Sets the script that controls the list of items and purchasing of them. The following * objects are provided to the script: * - * - \b client -- The \link Sigencore::Client client \endlink which activated the list. + * - \b list -- The instance of the \link Sigscript::CoinListWrapper coin list \endlink that is being used. + * - \b player -- The \link Sigencore::Player player \endlink which activated the list. * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. - * - \b items -- The instance of the \link Sigscript::CoinListWrapper coin list \endlink that is being used. * * \param script The script that gets executed when the player activates the list. */ diff --git a/sigmod/GlobalScript.h b/sigmod/GlobalScript.h index 9d538968..1c31670d 100644 --- a/sigmod/GlobalScript.h +++ b/sigmod/GlobalScript.h @@ -107,10 +107,14 @@ class SIGMOD_EXPORT GlobalScript : public Object * Sets the script that contains common code that is available for use by other scripts. The following * objects are available to the script (\p NULL if unavailable): * - * - \b client -- The \link Sigencore::Client client \endlink which owns \b owner. + * - \b script -- The \link Sigscript::GlobalScriptWrapper wrapper \endlink for the script. + * - \b player -- The \link Sigencore::Player player \endlink the script is active. * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. - * - \b arena -- The \link Sigencore::Arena arena \endlink the ability is being used in. - * - \b world -- The \link Sigworld::Map map \endlink for the \link Map map \endlink the player is on. + * - \b arena -- The \link Sigencore::Arena arena \endlink that is active. + * - \b world -- The \link Sigworld::Map map \endlink for the \link Sigscript::MapWrapper map \endlink that is active. + * + * Other objects may be available to the script depending on its context. Also, objects may be added to the script by + * giving the script more before it is started. * * \param script The script. */ diff --git a/sigmod/Item.h b/sigmod/Item.h index 7733502e..631c8cbb 100644 --- a/sigmod/Item.h +++ b/sigmod/Item.h @@ -139,13 +139,15 @@ class SIGMOD_EXPORT Item : public Object /** * Sets the script that determines the behavior of the item. The following objects are available to the script: * - * - \b owner -- The \link Sigencore::TeamMember team member \endlink which owns the instance of the ability. - * - \b client -- The \link Sigencore::Client client \endlink which owns \b owner. + * - \b item -- The \link Sigscript::ItemWrapper item \endlink that the script controls. + * - \b owner -- The \link Sigencore::TeamMember team member \endlink which is holding the item. + * - \b player -- The \link Sigencore::Player client \endlink which owns \b item. * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. - * - \b arena -- The \link Sigencore::Arena arena \endlink the ability is being used in. + * - \b arena -- The \link Sigencore::Arena arena \endlink the item is being used in. + * - \b targetN -- The \link Sigencore::TeamMember targets \endlink of the item (target0, target1, etc.). * - * When used, the \p used function will be called. It should return a \p bool as to whether the item was consumed or not. - * If it is consumed, it is removed from the player's inventory. + * When used and destroyed in the process, the item should call the <b>consumed(Sigscript::ItemWrapper*)</b> slot on + * either \b owner if held and \b player otherwise. * * \param script */ diff --git a/sigmod/Move.h b/sigmod/Move.h index 45d1d0db..b1706c74 100644 --- a/sigmod/Move.h +++ b/sigmod/Move.h @@ -151,10 +151,15 @@ class SIGMOD_EXPORT Move : public Object * Set the script for the move when in battle. This script defines the behavior of the move when in a battle. * The following objects are available to the script: * - * - \b owner -- The \link Sigencore::TeamMember team member \endlink which owns the instance of the move. - * - \b client -- The \link Sigencore::Client client \endlink which owns \b owner. + * - \b move -- The \link Sigscritp::MoveWrapper move \endlink the script controls. + * - \b owner -- The \link Sigencore::TeamMember team member \endlink which is using the move. + * - \b player -- The \link Sigencore::Player player \endlink which owns \b owner. * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. * - \b arena -- The \link Sigencore::Arena arena \endlink the move is being used in. + * - \b targetN -- The \link Sigencore::TeamMember targets \endlink of the move (target0, target1, etc.). + * + * This script should control damage, status effects inflicted, and other side effects of the move (PP is automatically + * reduced by one when using it, though more can be done). * * \param battleScript The script for the move when in battle. */ @@ -163,12 +168,14 @@ class SIGMOD_EXPORT Move : public Object * Set the script for the move when on the world map. This script defines the behavior of the move when on the world map. * The following objects are available to the script: * - * - \b owner -- The \link Sigencore::TeamMember team member \endlink which owns the instance of the move. - * - \b client -- The \link Sigencore::Client client \endlink which owns \b owner. + * - \b move -- The \link Sigscritp::MoveWrapper move \endlink the script controls. + * - \b owner -- The \link Sigencore::TeamMember team member \endlink which knows the move. + * - \b player -- The \link Sigencore::Player player \endlink which owns \b owner. * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. - * - \b world -- The \link Sigworld::Map map \endlink for the \link Map map \endlink the move is on. + * - \b world -- The \link Sigworld::Map map \endlink for the \link Map map \endlink the \b player is on. * - * If the move does nothing outside of battle, the script should be empty. + * If the move does nothing outside of battle, the script should be empty. Otherwise, it should listen to the appropriate + * signals and react to them. * * \param worldScript The script for the move when on the world map. */ @@ -177,13 +184,14 @@ class SIGMOD_EXPORT Move : public Object * Set the script that determines the priority of the move. This script allows the move to change its priority based on what * is happening in the \link Sigencore::Arena arena \endlink. The following objects are available to the script: * - * - \b owner -- The \link Sigencore::TeamMember team member \endlink which owns the instance of the move. - * - \b client -- The \link Sigencore::Client client \endlink which owns \b owner. + * - \b move -- The \link Sigscript::MoveWrapper move \endlink the script controls. + * - \b owner -- The \link Sigencore::TeamMember team member \endlink which is using the move. + * - \b player -- The \link Sigencore::Player player \endlink which owns \b owner. * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. * - \b arena -- The \link Sigencore::Arena arena \endlink the move is being used in. * * To override the priority given by the move, set the \p move-priority-%name (where "%name" is the name of the move) - * value in \p owner. Setting it in the \link Sigscript::SigmodWrapper sigmod wrapper \endlink will cause all instances of the + * value in \p owner. Setting it in the \link Sigscript::SigmodWrapper Sigmod \endlink will cause all instances of the * move to have the new priority. * * \param priorityScript The script that determines the priority of the move. diff --git a/sigmod/Skin.h b/sigmod/Skin.h index aad14a55..62dbd1a0 100644 --- a/sigmod/Skin.h +++ b/sigmod/Skin.h @@ -103,12 +103,15 @@ class SIGMOD_EXPORT Skin : public Object * Sets the script that manages the images for the skin. The following objects will be available * to the script: * + * - \b skin -- The \link Sigscript::SkinWrapper skin \endlink the script controls. * - \b item -- The \link Sigworld::MapItem map item \endlink the skin controls the images for. * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. * - \b world -- The \link Sigworld::Map map \endlink for the \link Map map \endlink the map item is on. * - * The \b item object will have signals for when it moves and for when it stops. This script should connect to the - * signals and modify the image for it as it moves. + * The \b item object will have signals for when it moves, turns, and stops. The script should animate \b item for each + * action. This can usually be done by using a \link QTimeLine \endlink in order to keep track of frames. By connecting + * the timeline's <i>frameChanged(int)</i> signal a function should convert it into the corresponding sprite and set it + * for \b item. * * \param script The script that controls the skin. */ diff --git a/sigmod/Status.h b/sigmod/Status.h index 9418c764..59536edc 100644 --- a/sigmod/Status.h +++ b/sigmod/Status.h @@ -101,10 +101,11 @@ class SIGMOD_EXPORT Status : public Object * Set the script for the status when in battle. This script defines the behavior of the status when in a battle. * The following objects are available to the script: * - * - \b owner -- The \link Sigencore::TeamMember team member \endlink which owns the instance of the status. - * - \b client -- The \link Sigencore::Client client \endlink which owns \b owner. + * - \b status -- The \link Sigscript::StatusWrapper status \endlink the script controls. + * - \b owner -- The \link Sigencore::TeamMember team member \endlink which is affected by the status. + * - \b player -- The \link Sigencore::Player player \endlink which owns \b owner. * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. - * - \b arena -- The \link Sigencore::Arena arena \endlink the ability is being used in. + * - \b arena -- The \link Sigencore::Arena arena \endlink the \b owner is in. * * \param battleScript The script for the status when in battle. */ @@ -113,10 +114,11 @@ class SIGMOD_EXPORT Status : public Object * Set the script for the status when on the world map. This script defines the behavior of the status when on the world map. * The following objects are available to the script: * - * - \b owner -- The \link Sigencore::TeamMember team member \endlink which owns the instance of the status. - * - \b client -- The \link Sigencore::Client client \endlink which owns \b owner. + * - \b status -- The \link Sigscript::StatusWrapper status \endlink the script controls. + * - \b owner -- The \link Sigencore::TeamMember team member \endlink which is affected by the status. + * - \b player -- The \link Sigencore::Player player \endlink which owns \b owner. * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. - * - \b world -- The \link Sigworld::Map map \endlink for the \link Map map \endlink the player is on. + * - \b world -- The \link Sigworld::Map map \endlink for the \link Map map \endlink \b player is on. * * \param worldScript The script for the status when on the world map. */ diff --git a/sigmod/Tile.h b/sigmod/Tile.h index 3697c1ae..8a8ab006 100644 --- a/sigmod/Tile.h +++ b/sigmod/Tile.h @@ -107,9 +107,15 @@ class SIGMOD_EXPORT Tile : public Object /** * Sets the script for the tile. The following objects are available to the script: * + * - \b tileinfo -- The \link Sigscript::TileWrapper wrapper \endlink for the tile. * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. - * - \b world -- The \link Sigworld::Map map \endlink for the \link Map map \endlink the player is on. + * - \b world -- The \link Sigworld::Map map \endlink for the \link Map map \endlink the \b player is on. * - \b tile -- The \link Sigworld::Tile tile \endlink the script controls. + * + * The \b tile object has a <i>entered(\link Sigencore::Player* \endlink)</i> signal which the script can connect to + * in order to interact with the player. In order to animate \b tile, it is recommended to use a \link QTimeLine \endlink + * in order to control the animation. Then, providing a function that converts accepts the frame number, set the corresponding + * sprite in \b tile. * * \param script The script for the tile. */ diff --git a/sigmod/Weather.h b/sigmod/Weather.h index c11679ff..3cb0ad4d 100644 --- a/sigmod/Weather.h +++ b/sigmod/Weather.h @@ -103,10 +103,11 @@ class SIGMOD_EXPORT Weather : public Object * Sets the script for the weather. What the weather does is defined by this script. * The following objects are available to the script: * - * - \b owner -- The \link Sigencore::TeamMember team member \endlink which owns the instance of the ability. - * - \b client -- The \link Sigencore::Client client \endlink which owns \b owner. + * - \b weather -- The \link Sigscript::WeatherWrapper weather \endlink being used. + * - \b owner -- The \link Sigencore::TeamMember team member \endlink which started the weather. + * - \b player -- The \link Sigencore::Player player \endlink which owns \b owner. * - \b sigmod -- The \link Sigscript::SigmodWrapper wrapper \endlink for the \link Sigmod sigmod \endlink in use. - * - \b arena -- The \link Sigencore::Arena arena \endlink the ability is being used in. + * - \b arena -- The \link Sigencore::Arena arena \endlink the weather is being used in. * * \param script The script for the weather. */ |