/tg/ Station 13 - Modules - TypesVar Details - Proc Details

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_cooldownAssoc list of ckey:value pairings. In DEMOCRACY_MODE, value is the player's vote. In ANARCHY_MODE, value is world.time when their cooldown expires.
deadchat_modeA bitfield containing the mode which this component uses (DEMOCRACY_MODE or ANARCHY_MODE) and other settings)
input_cooldownIn DEMOCRACY_MODE, this is how long players have to vote on an input. In ANARCHY_MODE, this is how long between inputs for each unique player.
inputsAssoc list of key-chat command string, value-callback pairs. list("right" = CALLBACK(GLOBAL_PROC, .proc/_step, src, EAST))
on_removalCallback invoked when this component is Destroy()ed to allow the parent to return to a non-deadchat controlled state.
orbitersList of everything orbitting this component's parent.
timeridThe id for the DEMOCRACY_MODE looping vote timer.

Procs

async_handle_vv_topicAsync proc handling the alert input and associated logic for an admin removing this component via the VV dropdown.
end_cooldownRemoves the ghost from the ckey_to_cooldown list and lets them know they are free to submit a command for the parent again.
handle_vv_topicAllows for this component to be removed via a dedicated VV dropdown entry.
on_examineInforms any examiners to the inputs available as part of deadchat control, as well as the current operating mode and cooldowns.
waive_automutePrevents 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 DEMOCRACY_MODE, value is the player's vote. In ANARCHY_MODE, value is world.time when their cooldown expires.

deadchat_mode

A bitfield containing the mode which this component uses (DEMOCRACY_MODE or ANARCHY_MODE) and other settings)

input_cooldown

In DEMOCRACY_MODE, this is how long players have to vote on an input. In 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, .proc/_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 DEMOCRACY_MODE looping vote timer.

Proc Details

async_handle_vv_topic

Async proc handling the alert input and associated logic for an admin removing this component via the VV dropdown.

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.

handle_vv_topic

Allows for this component to be removed via a dedicated VV dropdown entry.

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: