mafia_role
![code/modules/mafia/roles/roles.dm 1](git.png)
Vars | |
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_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. |
Procs | |
handle_speech | handle_speech |
kill | Tests kill immunities, if nothing prevents the kill, kills this role. |
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 |
Var Details
game_status
![code/modules/mafia/roles/roles.dm 41](git.png)
so mafia have to also kill them to have a majority
hud_icon
![code/modules/mafia/roles/roles.dm 44](git.png)
icon state in the mafia dmi of the hud of the role, used in the mafia ui
mafia_alert
![code/modules/mafia/roles/roles.dm 12](git.png)
The mafia popup we edit text to give different alerts for (such as when to vote).
mafia_panel
![code/modules/mafia/roles/roles.dm 31](git.png)
The Mafia innate action panel that allows players to view the game's state.
note_chat_sending_cooldown
![code/modules/mafia/roles/roles.dm 51](git.png)
The cooldown between being able to send your will in chat.
player_key
![code/modules/mafia/roles/roles.dm 19](git.png)
The ckey of the person playing as this Mafia role, CAN BE NULL IN FAVOR OF player_pda.
player_pda
![code/modules/mafia/roles/roles.dm 21](git.png)
The PDA of the person playing as this Mafia role, CAN BE NULL IN FAVOR OF player_key.
revealed_icon
![code/modules/mafia/roles/roles.dm 46](git.png)
icon state in the mafia dmi of the hud of the role, used in the mafia ui
revealed_outfit
![code/modules/mafia/roles/roles.dm 36](git.png)
what they get equipped with when they are revealed
role_flags
![code/modules/mafia/roles/roles.dm 9](git.png)
role flags (special status of roles like detection immune)
role_messages
![code/modules/mafia/roles/roles.dm 24](git.png)
List of all messages this role got throughout the game.
role_type
![code/modules/mafia/roles/roles.dm 7](git.png)
how the random setup chooses which roles get put in
role_unique_actions
![code/modules/mafia/roles/roles.dm 14](git.png)
List of all mafia abilities this role is able to perform.
special_ui_theme
![code/modules/mafia/roles/roles.dm 48](git.png)
set this to something cool for antagonists and their window will look different
vote_power
![code/modules/mafia/roles/roles.dm 34](git.png)
how many votes submitted when you vote. used in voting and deciding victory.
winner_award
![code/modules/mafia/roles/roles.dm 38](git.png)
what the role gets when it wins a game
written_notes
![code/modules/mafia/roles/roles.dm 16](git.png)
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 it will go through their abilities for Ability-specific speech, if none affects it, we will go to day chat.
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:
- message - The message to send to the person
- balloon_alert - Whether it should be as a balloon alert, only if it's to a non-PDA user.