|F2LINK int F2CALL||f2_desctag_reg ()|
|Registers a desctag slot. |
|F2LINK bool F2CALL||f2_desctag_unreg (int tag_id)|
|Unregisters a desctag slot. |
|F2LINK bool F2CALL||f2_desctag_set (int tag_id, const char *tag)|
|Sets the contents of a desctag slot. |
Oftentimes modules or scripts will want to append some data to the end of the player's description. However, if you have multiple modules or scripts trying to tag/untag the player's desc at the same time, you usually end up with a mess as each module presents what -it- thinks was the original description.
To solve this problem, Furnarchy makes a logical separation between the player's description and any tags scripts or modules want to append to it. When the client sends a `desc or `chdesc command, then Furnarchy appends the tags to the description.
By agreeing to go through Furnarchy for this sort of stuff, modules can tag the desc with whatever they'd like without stepping on each other's toes, and there's no need to track/restore the original description as Furnarchy will handle it all for you.
To use desctags, modules have to register for a desctag slot with f2_desctag_reg(), then use f2_desctag_set() to set its contents. f2_desctag_unreg() should be called when the tag is no longer needed.
|F2LINK int F2CALL furn2::f2_desctag_reg||(||)|
Registers a desctag slot.
The created desctag can be set by f2_desctag_set().
|F2LINK bool F2CALL furn2::f2_desctag_set||(||int||tag_id,|
|const char *||tag|
Sets the contents of a desctag slot.
|[in]||tag_id||A unique tag identifier previously used in a successful f2_desctag_reg() call.|
|[in]||tag||A string to set the slot to.|
|F2LINK bool F2CALL furn2::f2_desctag_unreg||(||int||tag_id||)|
Unregisters a desctag slot.
|[in]||tag_id||A unique tag identifier previously returned by a f2_desctag_reg() call.|
trueif tag_id was successfully unregistered.