diff --git a/baystation12.dme b/baystation12.dme
index 139ebc26a95..077b78116a4 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -971,8 +971,8 @@
#include "code\modules\client\preferences_toggles.dm"
#include "code\modules\client\ui_style.dm"
#include "code\modules\client\preference_setup\preference_setup.dm"
-#include "code\modules\client\preference_setup\antagonism\01_basic.dm"
-#include "code\modules\client\preference_setup\antagonism\02_candidacy.dm"
+#include "code\modules\client\preference_setup\antagonism\01_candidacy.dm"
+#include "code\modules\client\preference_setup\antagonism\02_setup.dm"
#include "code\modules\client\preference_setup\general\01_basic.dm"
#include "code\modules\client\preference_setup\general\02_language.dm"
#include "code\modules\client\preference_setup\general\03_body.dm"
@@ -1882,10 +1882,10 @@
#include "code\modules\xgm\xgm_gas_data.dm"
#include "code\modules\xgm\xgm_gas_mixture.dm"
#include "code\unit_tests\equipment_tests.dm"
+#include "code\unit_tests\map_tests.dm"
#include "code\unit_tests\mob_tests.dm"
#include "code\unit_tests\unit_test.dm"
#include "code\unit_tests\zas_tests.dm"
-#include "code\unit_tests\map_tests.dm"
#include "code\ZAS\_docs.dm"
#include "code\ZAS\Airflow.dm"
#include "code\ZAS\Atom.dm"
diff --git a/code/__defines/gamemode.dm b/code/__defines/gamemode.dm
index cf8d4f47667..94288982684 100644
--- a/code/__defines/gamemode.dm
+++ b/code/__defines/gamemode.dm
@@ -9,25 +9,9 @@
#define SEC_LEVEL_RED 2
#define SEC_LEVEL_DELTA 3
-#define BE_TRAITOR 0x1
-#define BE_OPERATIVE 0x2
-#define BE_CHANGELING 0x4
-#define BE_WIZARD 0x8
-#define BE_MALF 0x10
-#define BE_REV 0x20
-#define BE_ALIEN 0x40
-#define BE_AI 0x80
-#define BE_CULTIST 0x100
-#define BE_MONKEY 0x200
-#define BE_NINJA 0x400
-#define BE_RAIDER 0x800
-#define BE_PLANT 0x1000
-#define BE_MUTINEER 0x2000
-#define BE_PAI 0x4000
-#define BE_LOYALIST 0x8000
-
-#define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE))))
-
+#define BE_PLANT "BE_PLANT"
+#define BE_SYNTH "BE_SYNTH"
+#define BE_PAI "BE_PAI"
// Antagonist datum flags.
#define ANTAG_OVERRIDE_JOB 0x1 // Assigned job is set to MODE when spawning.
diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm
index 13c6611f631..2a4dc372d92 100644
--- a/code/_helpers/game.dm
+++ b/code/_helpers/game.dm
@@ -334,7 +334,7 @@ proc/isInSight(var/atom/A, var/atom/B)
var/i = 0
while(candidates.len <= 0 && i < 5)
for(var/mob/dead/observer/G in player_list)
- if(BE_ALIEN in G.client.prefs.be_special_role)
+ if(MODE_XENOMORPH in G.client.prefs.be_special_role)
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
diff --git a/code/game/antagonist/alien/xenomorph.dm b/code/game/antagonist/alien/xenomorph.dm
index 36f5216045a..2eb8d2d23fc 100644
--- a/code/game/antagonist/alien/xenomorph.dm
+++ b/code/game/antagonist/alien/xenomorph.dm
@@ -2,7 +2,6 @@ var/datum/antagonist/xenos/xenomorphs
/datum/antagonist/xenos
id = MODE_XENOMORPH
- role_type = BE_ALIEN
role_text = "Xenomorph"
role_text_plural = "Xenomorphs"
mob_path = /mob/living/carbon/alien/larva
diff --git a/code/game/antagonist/antagonist.dm b/code/game/antagonist/antagonist.dm
index 32f40ad985d..2dd934d1f04 100644
--- a/code/game/antagonist/antagonist.dm
+++ b/code/game/antagonist/antagonist.dm
@@ -14,7 +14,7 @@
// Role data.
var/id = "traitor" // Unique datum identifier.
- var/role_type = BE_TRAITOR // Preferences option for this role.
+ var/role_type // Preferences option for this role. Defaults to the id if unset
var/role_text = "Traitor" // special_role text.
var/role_text_plural = "Traitors" // As above but plural.
@@ -72,6 +72,9 @@
/datum/antagonist/New()
..()
+ if(!role_type)
+ role_type = id
+
cur_max = hard_cap
get_starting_locations()
if(!role_text_plural)
diff --git a/code/game/antagonist/outsider/actors.dm b/code/game/antagonist/outsider/actors.dm
index 7d5deb39e76..d9e8d422700 100644
--- a/code/game/antagonist/outsider/actors.dm
+++ b/code/game/antagonist/outsider/actors.dm
@@ -2,8 +2,7 @@ var/datum/antagonist/actor/actor
/datum/antagonist/actor
id = MODE_ACTOR
- bantype = "operative"
- role_type = BE_OPERATIVE
+ bantype = "actor"
role_text = "NanoTrasen Actor"
role_text_plural = "NanoTrasen Actors"
welcome_text = "You've been hired to entertain people through the power of television!"
diff --git a/code/game/antagonist/outsider/deathsquad.dm b/code/game/antagonist/outsider/deathsquad.dm
index ca0b39aaefe..2abdb5db3d4 100644
--- a/code/game/antagonist/outsider/deathsquad.dm
+++ b/code/game/antagonist/outsider/deathsquad.dm
@@ -2,7 +2,6 @@ var/datum/antagonist/deathsquad/deathsquad
/datum/antagonist/deathsquad
id = MODE_DEATHSQUAD
- role_type = BE_OPERATIVE
role_text = "Death Commando"
role_text_plural = "Death Commandos"
welcome_text = "You work in the service of corporate Asset Protection, answering directly to the Board of Directors."
diff --git a/code/game/antagonist/outsider/ert.dm b/code/game/antagonist/outsider/ert.dm
index e8517dbf4e8..5408a8a889d 100644
--- a/code/game/antagonist/outsider/ert.dm
+++ b/code/game/antagonist/outsider/ert.dm
@@ -3,7 +3,6 @@ var/datum/antagonist/ert/ert
/datum/antagonist/ert
id = MODE_ERT
bantype = "Emergency Response Team"
- role_type = BE_OPERATIVE
role_text = "Emergency Responder"
role_text_plural = "Emergency Responders"
welcome_text = "As member of the Emergency Response Team, you answer only to your leader and company officials."
@@ -41,6 +40,6 @@ var/datum/antagonist/ert/ert
player.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes)
player.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves)
player.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses)
-
+
create_id(role_text, player)
return 1
diff --git a/code/game/antagonist/outsider/mercenary.dm b/code/game/antagonist/outsider/mercenary.dm
index e2c44aef70f..82415de808a 100644
--- a/code/game/antagonist/outsider/mercenary.dm
+++ b/code/game/antagonist/outsider/mercenary.dm
@@ -2,7 +2,6 @@ var/datum/antagonist/mercenary/mercs
/datum/antagonist/mercenary
id = MODE_MERCENARY
- role_type = BE_OPERATIVE
role_text = "Mercenary"
bantype = "operative"
antag_indicator = "synd"
diff --git a/code/game/antagonist/outsider/ninja.dm b/code/game/antagonist/outsider/ninja.dm
index 09dc15b5949..eeead17be7f 100644
--- a/code/game/antagonist/outsider/ninja.dm
+++ b/code/game/antagonist/outsider/ninja.dm
@@ -2,7 +2,6 @@ var/datum/antagonist/ninja/ninjas
/datum/antagonist/ninja
id = MODE_NINJA
- role_type = BE_NINJA
role_text = "Ninja"
role_text_plural = "Ninja"
bantype = "ninja"
diff --git a/code/game/antagonist/outsider/raider.dm b/code/game/antagonist/outsider/raider.dm
index 8ab342bbf24..26648a34f04 100644
--- a/code/game/antagonist/outsider/raider.dm
+++ b/code/game/antagonist/outsider/raider.dm
@@ -2,7 +2,6 @@ var/datum/antagonist/raider/raiders
/datum/antagonist/raider
id = MODE_RAIDER
- role_type = BE_RAIDER
role_text = "Raider"
role_text_plural = "Raiders"
bantype = "raider"
diff --git a/code/game/antagonist/outsider/wizard.dm b/code/game/antagonist/outsider/wizard.dm
index f6741cafa07..292277b1a27 100644
--- a/code/game/antagonist/outsider/wizard.dm
+++ b/code/game/antagonist/outsider/wizard.dm
@@ -2,7 +2,6 @@ var/datum/antagonist/wizard/wizards
/datum/antagonist/wizard
id = MODE_WIZARD
- role_type = BE_WIZARD
role_text = "Space Wizard"
role_text_plural = "Space Wizards"
bantype = "wizard"
diff --git a/code/game/antagonist/station/changeling.dm b/code/game/antagonist/station/changeling.dm
index b3f5605a91c..216d731137d 100644
--- a/code/game/antagonist/station/changeling.dm
+++ b/code/game/antagonist/station/changeling.dm
@@ -1,6 +1,5 @@
/datum/antagonist/changeling
id = MODE_CHANGELING
- role_type = BE_CHANGELING
role_text = "Changeling"
role_text_plural = "Changelings"
bantype = "changeling"
diff --git a/code/game/antagonist/station/cultist.dm b/code/game/antagonist/station/cultist.dm
index aba2115d152..cc6314c7519 100644
--- a/code/game/antagonist/station/cultist.dm
+++ b/code/game/antagonist/station/cultist.dm
@@ -13,7 +13,6 @@ var/datum/antagonist/cultist/cult
bantype = "cultist"
restricted_jobs = list("Chaplain","AI", "Cyborg", "Internal Affairs Agent", "Head of Security", "Captain")
protected_jobs = list("Security Officer", "Warden", "Detective")
- role_type = BE_CULTIST
feedback_tag = "cult_objective"
antag_indicator = "cult"
welcome_text = "You have a talisman in your possession; one that will help you start the cult on this station. Use it well and remember - there are others."
diff --git a/code/game/antagonist/station/loyalist.dm b/code/game/antagonist/station/loyalist.dm
index fddf0c37960..f8b5ec49946 100644
--- a/code/game/antagonist/station/loyalist.dm
+++ b/code/game/antagonist/station/loyalist.dm
@@ -2,7 +2,6 @@ var/datum/antagonist/loyalists/loyalists
/datum/antagonist/loyalists
id = MODE_LOYALIST
- role_type = BE_LOYALIST
role_text = "Head Loyalist"
role_text_plural = "Loyalists"
bantype = "loyalist"
diff --git a/code/game/antagonist/station/revolutionary.dm b/code/game/antagonist/station/revolutionary.dm
index 96e37529915..ca0011f8d72 100644
--- a/code/game/antagonist/station/revolutionary.dm
+++ b/code/game/antagonist/station/revolutionary.dm
@@ -2,7 +2,6 @@ var/datum/antagonist/revolutionary/revs
/datum/antagonist/revolutionary
id = MODE_REVOLUTIONARY
- role_type = BE_REV
role_text = "Head Revolutionary"
role_text_plural = "Revolutionaries"
bantype = "revolutionary"
diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm
index 4240708cc22..ea99bf14afb 100644
--- a/code/game/antagonist/station/rogue_ai.dm
+++ b/code/game/antagonist/station/rogue_ai.dm
@@ -2,7 +2,6 @@ var/datum/antagonist/rogue_ai/malf
/datum/antagonist/rogue_ai
id = MODE_MALFUNCTION
- role_type = BE_MALF
role_text = "Rampant AI"
role_text_plural = "Rampant AIs"
mob_path = /mob/living/silicon/ai
diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm
index 3cbacf9e501..613e9c7241a 100644
--- a/code/game/jobs/whitelist.dm
+++ b/code/game/jobs/whitelist.dm
@@ -52,6 +52,8 @@ var/list/whitelist = list()
//todo: admin aliens
/proc/is_alien_whitelisted(mob/M, var/species)
+ if(!M || !species)
+ return 0
if(!config.usealienwhitelist)
return 1
if(istype(species,/datum/species) || istype(species,/datum/language))
diff --git a/code/game/objects/structures/alien/egg.dm b/code/game/objects/structures/alien/egg.dm
index 5eb44d08327..5d32f9685f6 100644
--- a/code/game/objects/structures/alien/egg.dm
+++ b/code/game/objects/structures/alien/egg.dm
@@ -30,7 +30,7 @@
progress++
if(progress >= MAX_PROGRESS)
for(var/mob/M in dead_mob_list)
- if(istype(M,/mob/dead) && M.client && M.client.prefs && (BE_ALIEN in M.client.prefs.be_special_role))
+ if(istype(M,/mob/dead) && M.client && M.client.prefs && (MODE_XENOMORPH in M.client.prefs.be_special_role))
M << "An alien is ready to hatch! ([ghost_follow_link(src, M)]) (spawn)"
processing_objects -= src
update_icon()
diff --git a/code/modules/client/preference_setup/antagonism/02_candidacy.dm b/code/modules/client/preference_setup/antagonism/01_candidacy.dm
similarity index 72%
rename from code/modules/client/preference_setup/antagonism/02_candidacy.dm
rename to code/modules/client/preference_setup/antagonism/01_candidacy.dm
index 3f71893e6be..449a5ceb747 100644
--- a/code/modules/client/preference_setup/antagonism/02_candidacy.dm
+++ b/code/modules/client/preference_setup/antagonism/01_candidacy.dm
@@ -2,7 +2,7 @@ var/list/private_valid_special_roles
/datum/category_item/player_setup_item/antagonism/candidacy
name = "Candidacy"
- sort_order = 2
+ sort_order = 1
/datum/category_item/player_setup_item/antagonism/candidacy/load_character(var/savefile/S)
S["be_special"] >> pref.be_special_role
@@ -20,14 +20,17 @@ var/list/private_valid_special_roles
/datum/category_item/player_setup_item/antagonism/candidacy/content(var/mob/user)
. += "Special Role Availability:
"
- for(var/datum/antagonist/antag in all_antag_types)
- . += "[antag.role_text]: "
+ . += "
| [antag.role_text]: | "
if(jobban_isbanned(preference_mob(), antag.bantype))
. += "\[BANNED\] " else if(antag.role_type in pref.be_special_role) . += "Yes / No" else . += "Yes / No" + . += " |
| [(ghost_trap.ghost_trap_role)]: | "
+ if(banned_from_ghost_role(preference_mob(), ghost_trap))
+ . += "\[BANNED\] " + else if(ghost_trap.pref_check in pref.be_special_role) . += "Yes / No" else . += "Yes / No" + . += " |