Skip to content

Commit

Permalink
bugfix: Setups Malfunctioning AI as a special role to prevent double …
Browse files Browse the repository at this point in the history
…antaging (#6151)
  • Loading branch information
Vladisvell authored Nov 9, 2024
1 parent 052bd39 commit 44923b1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/gamemode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@
#define SPECIAL_ROLE_THIEF "Thief"
#define SPECIAL_ROLE_SPACE_DRAGON "Space Dragon"
#define SPECIAL_ROLE_EVENTMISC "Event Role"
#define SPECIAL_ROLE_MALFAI "Malfunctioning AI"
2 changes: 1 addition & 1 deletion code/game/gamemodes/antag_paradise/antag_paradise.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
if(special_antag)
special_antag.restricted_roles = (restricted_jobs|protected_jobs|protected_jobs_AI)
special_antag.restricted_roles -= JOB_TITLE_AI
special_antag.special_role = SPECIAL_ROLE_TRAITOR
special_antag.special_role = SPECIAL_ROLE_MALFAI
SSjobs.new_malf = special_antag.current
pre_antags[special_antag] = ROLE_MALF_AI
antags_amount--
Expand Down
1 change: 1 addition & 0 deletions code/game/gamemodes/traitor/traitor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
pre_malf_AI = traitor
pre_malf_AI.restricted_roles = (restricted_jobs|protected_jobs|protected_jobs_AI) // All jobs are restricted for malf AI despite the config.
pre_malf_AI.restricted_roles -= JOB_TITLE_AI
traitor.special_role = SPECIAL_ROLE_MALFAI
SSjobs.new_malf = traitor.current
else
pre_traitors += traitor
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/malf_ai/malf_ai_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "Malfunctioning AI"
roundend_category = "traitors"
job_rank = ROLE_MALF_AI
special_role = SPECIAL_ROLE_TRAITOR
special_role = SPECIAL_ROLE_MALFAI
antag_hud_name = "hudsyndicate"
antag_hud_type = ANTAG_HUD_TRAITOR
/// Should the AI get codewords?
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/mob_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
SPECIAL_ROLE_TRAITOR,
SPECIAL_ROLE_VAMPIRE,
SPECIAL_ROLE_VAMPIRE_THRALL,
SPECIAL_ROLE_THIEF
SPECIAL_ROLE_THIEF,
SPECIAL_ROLE_MALFAI
)
if(special_role in crew_roles)
return 0
Expand Down

0 comments on commit 44923b1

Please sign in to comment.