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

mafia_role

Vars

game_statusso mafia have to also kill them to have a majority
hud_iconicon state in the mafia dmi of the hud of the role, used in the mafia ui
mafia_alertThe mafia popup we edit text to give different alerts for (such as when to vote).
mafia_game_controllerThe mafia controller board this mafia role is tied to, in case there's several Mafia games at once.
mafia_panelThe Mafia innate action panel that allows players to view the game's state.
note_chat_sending_cooldownThe cooldown between being able to send your will in chat.
player_keyThe ckey of the person playing as this Mafia role, CAN BE NULL IN FAVOR OF player_pda.
player_pdaThe PDA of the person playing as this Mafia role, CAN BE NULL IN FAVOR OF player_key.
revealed_iconicon state in the mafia dmi of the hud of the role, used in the mafia ui
revealed_outfitwhat they get equipped with when they are revealed
role_flagsrole flags (special status of roles like detection immune)
role_messagesList of all messages this role got throughout the game.
role_typehow the random setup chooses which roles get put in
role_unique_actionsList of all mafia abilities this role is able to perform.
special_ui_themeset this to something cool for antagonists and their window will look different
vote_powerhow many votes submitted when you vote. used in voting and deciding victory.
winner_awardwhat the role gets when it wins a game
written_notesThe player's written notes, that they can send to chat at any time.

Procs

handle_speechhandle_speech
handle_speech_deadSame as handle_speech, but for dead players.
killTests kill immunities, if nothing prevents the kill, kills this role.
put_player_in_bodyPuts the player in their body and keeps track of their previous one to put them back in later. Adds the playing_mafia trait so people examining them will know why they're currently lacking a soul.
send_message_to_playersend_message_to_player

Var Details

game_status

so mafia have to also kill them to have a majority

hud_icon

icon state in the mafia dmi of the hud of the role, used in the mafia ui

mafia_alert

The mafia popup we edit text to give different alerts for (such as when to vote).

mafia_game_controller

The mafia controller board this mafia role is tied to, in case there's several Mafia games at once.

mafia_panel

The Mafia innate action panel that allows players to view the game's state.

note_chat_sending_cooldown

The cooldown between being able to send your will in chat.

player_key

The ckey of the person playing as this Mafia role, CAN BE NULL IN FAVOR OF player_pda.

player_pda

The PDA of the person playing as this Mafia role, CAN BE NULL IN FAVOR OF player_key.

revealed_icon

icon state in the mafia dmi of the hud of the role, used in the mafia ui

revealed_outfit

what they get equipped with when they are revealed

role_flags

role flags (special status of roles like detection immune)

role_messages

List of all messages this role got throughout the game.

role_type

how the random setup chooses which roles get put in

role_unique_actions

List of all mafia abilities this role is able to perform.

special_ui_theme

set this to something cool for antagonists and their window will look different

vote_power

how many votes submitted when you vote. used in voting and deciding victory.

winner_award

what the role gets when it wins a game

written_notes

The player's written notes, that they can send to chat at any time.

Proc Details

handle_speech

handle_speech

Handles Mafia roles talking in chat. First we'll go through their abilities for Ability-specific speech, if none affects it, we will go to day chat (if it is indeed day).

handle_speech_dead

Same as handle_speech, but for dead players.

kill

Tests kill immunities, if nothing prevents the kill, kills this role.

Does not count as visiting, see visit proc.

put_player_in_body

Puts the player in their body and keeps track of their previous one to put them back in later. Adds the playing_mafia trait so people examining them will know why they're currently lacking a soul.

send_message_to_player

send_message_to_player

Sends a message to a player, checking if they are playing through a PDA or not. Args: