deadchat_control
Deadchat Plays Things - The Componenting
Allows deadchat to control stuff and things by typing commands into chat. These commands will then trigger callbacks to execute procs!
Vars | |
ckey_to_cooldown | Assoc list of ckey:value pairings. In DEADCHAT_DEMOCRACY_MODE, value is the player's vote. In DEADCHAT_ANARCHY_MODE, value is world.time when their cooldown expires. |
---|---|
deadchat_mode | A bitfield containing the mode which this component uses (DEADCHAT_DEMOCRACY_MODE or DEADCHAT_ANARCHY_MODE) and other settings) |
generated_point_of_interest | Set to true if a point of interest was created for an object, and needs to be removed if deadchat control is removed. Needed for preventing objects from having two points of interest. |
input_cooldown | In DEADCHAT_DEMOCRACY_MODE, this is how long players have to vote on an input. In DEADCHAT_ANARCHY_MODE, this is how long between inputs for each unique player. |
inputs | Assoc list of key-chat command string, value-callback pairs. list("right" = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(_step), src, EAST)) |
on_removal | Callback invoked when this component is Destroy()ed to allow the parent to return to a non-deadchat controlled state. |
orbiters | List of everything orbitting this component's parent. |
timerid | The id for the DEADCHAT_DEMOCRACY_MODE looping vote timer. |
Procs | |
_step | Dummy to call since we can't proc reference builtins |
end_cooldown | Removes the ghost from the ckey_to_cooldown list and lets them know they are free to submit a command for the parent again. |
on_examine | Informs any examiners to the inputs available as part of deadchat control, as well as the current operating mode and cooldowns. |
waive_automute | Prevents messages used to control the parent from counting towards the automute threshold for repeated identical messages. |
Var Details
ckey_to_cooldown
Assoc list of ckey:value pairings. In DEADCHAT_DEMOCRACY_MODE, value is the player's vote. In DEADCHAT_ANARCHY_MODE, value is world.time when their cooldown expires.
deadchat_mode
A bitfield containing the mode which this component uses (DEADCHAT_DEMOCRACY_MODE or DEADCHAT_ANARCHY_MODE) and other settings)
generated_point_of_interest
Set to true if a point of interest was created for an object, and needs to be removed if deadchat control is removed. Needed for preventing objects from having two points of interest.
input_cooldown
In DEADCHAT_DEMOCRACY_MODE, this is how long players have to vote on an input. In DEADCHAT_ANARCHY_MODE, this is how long between inputs for each unique player.
inputs
Assoc list of key-chat command string, value-callback pairs. list("right" = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(_step), src, EAST))
on_removal
Callback invoked when this component is Destroy()ed to allow the parent to return to a non-deadchat controlled state.
orbiters
List of everything orbitting this component's parent.
timerid
The id for the DEADCHAT_DEMOCRACY_MODE looping vote timer.
Proc Details
_step
Dummy to call since we can't proc reference builtins
end_cooldown
Removes the ghost from the ckey_to_cooldown list and lets them know they are free to submit a command for the parent again.
on_examine
Informs any examiners to the inputs available as part of deadchat control, as well as the current operating mode and cooldowns.
waive_automute
Prevents messages used to control the parent from counting towards the automute threshold for repeated identical messages.
Arguments: