Difference between revisions of "Procedure Flags"
From WikiName
(Created page with " __TOC__ = Overview = Procedure flags are flags that can be used to modify code behavior during and after special procedures are run. The flags are stored in an integer as...") |
|||
Line 13: | Line 13: | ||
|- | |- | ||
| PROC_OVERRODE_COMMAND | | PROC_OVERRODE_COMMAND | ||
− | | | + | | overrode-command |
| The special procedure has handled the command entered by the player. This tells the MUD that it should abort processing the command after the procedures are complete since the command has already been handled. | | The special procedure has handled the command entered by the player. This tells the MUD that it should abort processing the command after the procedures are complete since the command has already been handled. | ||
|- | |- | ||
| PROC_ABORT_PROCS | | PROC_ABORT_PROCS | ||
− | | | + | | abort-procedures |
| The special procedure uses this flag to tell the MUD to stop running procedures after the current one. | | The special procedure uses this flag to tell the MUD to stop running procedures after the current one. | ||
|- | |- | ||
| PROC_SUPPRESS_LOOK | | PROC_SUPPRESS_LOOK | ||
− | | | + | | suppress-look |
| The special procedure uses this flag to tell the MUD not to perform a "look" command once the player is added to a new room. | | The special procedure uses this flag to tell the MUD not to perform a "look" command once the player is added to a new room. | ||
|- | |- | ||
| PROC_SUCCESS | | PROC_SUCCESS | ||
− | | | + | | success |
| This flag must be used with PROC_OVERRODE_COMMAND. This tells the MUD that it should act as if the command was successfully executed and make any modifications to player statistics as such. Currently used to indicate a spell was successfully cast so that the MUD will subtract the full mana cost of casting the spell. | | This flag must be used with PROC_OVERRODE_COMMAND. This tells the MUD that it should act as if the command was successfully executed and make any modifications to player statistics as such. Currently used to indicate a spell was successfully cast so that the MUD will subtract the full mana cost of casting the spell. | ||
|- | |- | ||
| PROC_SENT_MESSAGES | | PROC_SENT_MESSAGES | ||
− | | | + | | sent-messages |
| This flag is used to indicate whether messages to the players regarding this command have been sent. In the case of casting a spell, it would be the messages "Player utters the words, ...". | | This flag is used to indicate whether messages to the players regarding this command have been sent. In the case of casting a spell, it would be the messages "Player utters the words, ...". | ||
|} | |} |
Revision as of 18:19, 19 March 2016
Contents
Overview
Procedure flags are flags that can be used to modify code behavior during and after special procedures are run. The flags are stored in an integer as a bitvector and can be accessed in C code via the pParam->iProcedureFlags variable. In MUDL2 the flags can be accessed using the %f global variable.
Flag Values
C Define | MUDL Name | Description |
---|---|---|
PROC_OVERRODE_COMMAND | overrode-command | The special procedure has handled the command entered by the player. This tells the MUD that it should abort processing the command after the procedures are complete since the command has already been handled. |
PROC_ABORT_PROCS | abort-procedures | The special procedure uses this flag to tell the MUD to stop running procedures after the current one. |
PROC_SUPPRESS_LOOK | suppress-look | The special procedure uses this flag to tell the MUD not to perform a "look" command once the player is added to a new room. |
PROC_SUCCESS | success | This flag must be used with PROC_OVERRODE_COMMAND. This tells the MUD that it should act as if the command was successfully executed and make any modifications to player statistics as such. Currently used to indicate a spell was successfully cast so that the MUD will subtract the full mana cost of casting the spell. |
PROC_SENT_MESSAGES | sent-messages | This flag is used to indicate whether messages to the players regarding this command have been sent. In the case of casting a spell, it would be the messages "Player utters the words, ...". |