" //So things dont get squished.
//Servant of Ratvar
- if(jobban_isbanned(M, "servant of Ratvar") || isbanned_dept)
+ if(jobban_isbanned(M, ROLE_SERVANT_OF_RATVAR) || isbanned_dept)
dat += "
"
usr << browse(dat, "window=jobban2;size=800x450")
@@ -937,11 +937,11 @@
continue
joblist += jobPos
if("ghostroles")
- joblist += list("pAI", "posibrain", "drone", "deathsquad", "lavaland")
+ joblist += list(ROLE_PAI, "posibrain", "drone", "deathsquad", "lavaland")
if("teamantags")
- joblist += list("operative", "revolutionary", "cultist", "servant of Ratvar", "abductor", "alien candidate")
+ joblist += list(ROLE_OPERATIVE, ROLE_REV, ROLE_CULTIST, ROLE_SERVANT_OF_RATVAR, ROLE_ABDUCTOR, ROLE_ALIEN)
if("convertantags")
- joblist += list("revolutionary", "cultist", "servant of Ratvar", "alien candidate")
+ joblist += list(ROLE_REV, ROLE_CULTIST, ROLE_SERVANT_OF_RATVAR, ROLE_ALIEN)
else
joblist += href_list["jobban3"]
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index 11b4775f111b..759cc97dbb09 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -41,7 +41,7 @@
return FALSE
if(!considered_alive(applicant.mind) || considered_afk(applicant.mind)) //makes sure the player isn't a zombie, brain, or just afk all together
return FALSE
- return (!jobban_isbanned(applicant, targetrole) && !jobban_isbanned(applicant, "Syndicate"))
+ return (!jobban_isbanned(applicant, targetrole) && !jobban_isbanned(applicant, ROLE_SYNDICATE))
/datum/admins/proc/makeTraitors()
@@ -137,7 +137,7 @@
/datum/admins/proc/makeWizard()
- var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard", null)
+ var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", ROLE_WIZARD, null)
var/mob/dead/observer/selected = pick_n_take(candidates)
@@ -214,7 +214,7 @@
/datum/admins/proc/makeNukeTeam()
var/datum/game_mode/nuclear/temp = new
- var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to be considered for a nuke team being sent in?", "operative", temp)
+ var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to be considered for a nuke team being sent in?", ROLE_OPERATIVE, temp)
var/list/mob/dead/observer/chosen = list()
var/mob/dead/observer/theghost = null
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index d462256cacb0..bbe7c97bbf6c 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -280,7 +280,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
//Check if they were an alien
- if(G_found.mind.assigned_role=="Alien")
+ if(G_found.mind.assigned_role == ROLE_ALIEN)
if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes")
var/turf/T
if(GLOB.xeno_spawn.len)
@@ -380,15 +380,15 @@ Traitors and the like can also be revived with the previous role mostly intact.
switch(new_character.mind.special_role)
- if("Wizard")
+ if(ROLE_WIZARD)
new_character.forceMove(pick(GLOB.wizardstart))
var/datum/antagonist/wizard/A = new_character.mind.has_antag_datum(/datum/antagonist/wizard,TRUE)
A.equip_wizard()
- if("Syndicate")
+ if(ROLE_SYNDICATE)
new_character.forceMove(pick(GLOB.nukeop_start))
var/datum/antagonist/nukeop/N = new_character.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE)
N.equip_op()
- if("Space Ninja")
+ if(ROLE_NINJA)
var/list/ninja_spawn = list()
for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list)
ninja_spawn += L
diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm
index 7d090bfd6367..108429975991 100644
--- a/code/modules/antagonists/_common/antag_datum.dm
+++ b/code/modules/antagonists/_common/antag_datum.dm
@@ -72,19 +72,18 @@ GLOBAL_LIST_EMPTY(antagonists)
/datum/antagonist/proc/is_banned(mob/M)
if(!M)
return FALSE
- . = (jobban_isbanned(M,"Syndicate") || (job_rank && jobban_isbanned(M,job_rank)))
+ . = (jobban_isbanned(M, ROLE_SYNDICATE) || (job_rank && jobban_isbanned(M,job_rank)))
/datum/antagonist/proc/replace_banned_player()
set waitfor = FALSE
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [name]?", "[name]", null, job_rank, 50, owner.current)
- var/mob/dead/observer/theghost = null
- if(candidates.len)
- theghost = pick(candidates)
+ if(LAZYLEN(candidates))
+ var/client/C = pick(candidates)
to_chat(owner, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!")
- message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.")
+ message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.")
owner.current.ghostize(0)
- owner.current.key = theghost.key
+ owner.current.key = C.key
/datum/antagonist/proc/on_removal()
remove_innate_effects()
diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm
index 8d4c1cf5ba95..2ced63535a1d 100644
--- a/code/modules/antagonists/_common/antag_spawner.dm
+++ b/code/modules/antagonists/_common/antag_spawner.dm
@@ -2,7 +2,7 @@
throw_speed = 1
throw_range = 5
w_class = WEIGHT_CLASS_TINY
- var/used = 0
+ var/used = FALSE
/obj/item/antag_spawner/proc/spawn_antag(client/C, turf/T, kind = "", datum/mind/user)
return
@@ -57,13 +57,13 @@
to_chat(H, "You already used this contract!")
return
var/list/candidates = pollCandidatesForMob("Do you want to play as a wizard's [href_list["school"]] apprentice?", ROLE_WIZARD, null, ROLE_WIZARD, 150, src)
- if(candidates.len)
+ if(LAZYLEN(candidates))
if(used)
to_chat(H, "You already used this contract!")
return
- used = 1
- var/mob/dead/observer/theghost = pick(candidates)
- spawn_antag(theghost.client, get_turf(src), href_list["school"],H.mind)
+ used = TRUE
+ var/client/C = pick(candidates)
+ spawn_antag(C, get_turf(src), href_list["school"],H.mind)
else
to_chat(H, "Unable to reach your apprentice! You can either attack the spellbook with the contract to refund your points, or wait and try again later.")
@@ -120,12 +120,12 @@
to_chat(user, "You activate [src] and wait for confirmation.")
var/list/nuke_candidates = pollGhostCandidates("Do you want to play as a syndicate [borg_to_spawn ? "[lowertext(borg_to_spawn)] cyborg":"operative"]?", ROLE_OPERATIVE, null, ROLE_OPERATIVE, 150, POLL_IGNORE_SYNDICATE)
- if(nuke_candidates.len)
+ if(LAZYLEN(nuke_candidates))
if(!(check_usability(user)))
return
used = TRUE
- var/mob/dead/observer/theghost = pick(nuke_candidates)
- spawn_antag(theghost.client, get_turf(src), "syndieborg", user.mind)
+ var/client/C = pick(nuke_candidates)
+ spawn_antag(C, get_turf(src), "syndieborg", user.mind)
do_sparks(4, TRUE, src)
qdel(src)
else
@@ -213,13 +213,13 @@
return
if(used)
return
- var/list/demon_candidates = pollCandidatesForMob("Do you want to play as a [initial(demon_type.name)]?", null, null, ROLE_ALIEN, 50, src)
- if(demon_candidates.len)
+ var/list/candidates = pollCandidatesForMob("Do you want to play as a [initial(demon_type.name)]?", ROLE_ALIEN, null, ROLE_ALIEN, 50, src)
+ if(LAZYLEN(candidates))
if(used)
return
- used = 1
- var/mob/dead/observer/theghost = pick(demon_candidates)
- spawn_antag(theghost.client, get_turf(src), initial(demon_type.name),user.mind)
+ used = TRUE
+ var/client/C = pick(candidates)
+ spawn_antag(C, get_turf(src), initial(demon_type.name),user.mind)
to_chat(user, shatter_msg)
to_chat(user, veil_msg)
playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1)
diff --git a/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm b/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm
index a31c0e02e667..c9bb5fdc9a36 100644
--- a/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm
+++ b/code/modules/antagonists/blob/blob/blobs/blob_mobs.dm
@@ -7,7 +7,7 @@
/mob/living/simple_animal/hostile/blob
icon = 'icons/mob/blob.dmi'
pass_flags = PASSBLOB
- faction = list("blob")
+ faction = list(ROLE_BLOB)
bubble_icon = "blob"
speak_emote = null //so we use verb_yell/verb_say/etc
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
diff --git a/code/modules/antagonists/blob/blob/overmind.dm b/code/modules/antagonists/blob/blob/overmind.dm
index a37a8d5c227e..6c852684b2bc 100644
--- a/code/modules/antagonists/blob/blob/overmind.dm
+++ b/code/modules/antagonists/blob/blob/overmind.dm
@@ -18,7 +18,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
layer = FLY_LAYER
pass_flags = PASSBLOB
- faction = list("blob")
+ faction = list(ROLE_BLOB)
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
var/obj/structure/blob/core/blob_core = null // The blob overmind's core
var/blob_points = 0
@@ -115,7 +115,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
if(!Ablob.blob_allowed)
continue
- if(!("blob" in L.faction))
+ if(!(ROLE_BLOB in L.faction))
playsound(L, 'sound/effects/splat.ogg', 50, 1)
L.death()
new/mob/living/simple_animal/hostile/blob/blobspore(T)
diff --git a/code/modules/antagonists/blob/blob/powers.dm b/code/modules/antagonists/blob/blob/powers.dm
index e88cc8fb963a..131f3c14cc0c 100644
--- a/code/modules/antagonists/blob/blob/powers.dm
+++ b/code/modules/antagonists/blob/blob/powers.dm
@@ -13,13 +13,13 @@
if(!placement_override)
if(!pop_override)
for(var/mob/living/M in range(7, src))
- if("blob" in M.faction)
+ if(ROLE_BLOB in M.faction)
continue
if(M.client)
to_chat(src, "There is someone too close to place your blob core!")
return 0
for(var/mob/living/M in view(13, src))
- if("blob" in M.faction)
+ if(ROLE_BLOB in M.faction)
continue
if(M.client)
to_chat(src, "Someone could see your blob core from here!")
@@ -157,7 +157,7 @@
return
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as a [blob_reagent_datum.name] blobbernaut?", ROLE_BLOB, null, ROLE_BLOB, 50) //players must answer rapidly
- if(candidates.len) //if we got at least one candidate, they're a blobbernaut now.
+ if(LAZYLEN(candidates)) //if we got at least one candidate, they're a blobbernaut now.
B.max_integrity = initial(B.max_integrity) * 0.25 //factories that produced a blobbernaut have much lower health
B.obj_integrity = min(B.obj_integrity, B.max_integrity)
B.update_icon()
@@ -251,7 +251,7 @@
if(can_buy(4))
var/attacksuccess = FALSE
for(var/mob/living/L in T)
- if("blob" in L.faction) //no friendly/dead fire
+ if(ROLE_BLOB in L.faction) //no friendly/dead fire
continue
if(L.stat != DEAD)
attacksuccess = TRUE
diff --git a/code/modules/antagonists/blob/blob/theblob.dm b/code/modules/antagonists/blob/blob/theblob.dm
index f878e519bad2..c110ef272cc2 100644
--- a/code/modules/antagonists/blob/blob/theblob.dm
+++ b/code/modules/antagonists/blob/blob/theblob.dm
@@ -250,7 +250,7 @@
to_chat(user, "Effects:[scannerreport()]")
/obj/structure/blob/attack_animal(mob/living/simple_animal/M)
- if("blob" in M.faction) //sorry, but you can't kill the blob as a blobbernaut
+ if(ROLE_BLOB in M.faction) //sorry, but you can't kill the blob as a blobbernaut
return
..()
diff --git a/code/modules/antagonists/brother/brother.dm b/code/modules/antagonists/brother/brother.dm
index f692335ee167..d8371d37516f 100644
--- a/code/modules/antagonists/brother/brother.dm
+++ b/code/modules/antagonists/brother/brother.dm
@@ -2,7 +2,7 @@
name = "Brother"
antagpanel_category = "Brother"
job_rank = ROLE_BROTHER
- var/special_role = "blood brother"
+ var/special_role = ROLE_BROTHER
var/datum/team/brother_team/team
/datum/antagonist/brother/create_team(datum/team/brother_team/new_team)
diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm
index 033bf49b3bf9..d6afa339d5ce 100644
--- a/code/modules/antagonists/changeling/changeling.dm
+++ b/code/modules/antagonists/changeling/changeling.dm
@@ -396,7 +396,7 @@
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = owner
if(team_mode) //No backstabbing while in a team
- kill_objective.find_target_by_role(role = "Changeling", role_type = 1, invert = 1)
+ kill_objective.find_target_by_role(role = ROLE_CHANGELING, role_type = 1, invert = 1)
else
kill_objective.find_target()
objectives += kill_objective
@@ -404,7 +404,7 @@
var/datum/objective/maroon/maroon_objective = new
maroon_objective.owner = owner
if(team_mode)
- maroon_objective.find_target_by_role(role = "Changeling", role_type = 1, invert = 1)
+ maroon_objective.find_target_by_role(role = ROLE_CHANGELING, role_type = 1, invert = 1)
else
maroon_objective.find_target()
objectives += maroon_objective
@@ -426,7 +426,7 @@
var/datum/objective/escape/escape_with_identity/identity_theft = new
identity_theft.owner = owner
if(team_mode)
- identity_theft.find_target_by_role(role = "Changeling", role_type = 1, invert = 1)
+ identity_theft.find_target_by_role(role = ROLE_CHANGELING, role_type = 1, invert = 1)
else
identity_theft.find_target()
objectives += identity_theft
diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
index 49cab86ff92d..2eb3315e0353 100644
--- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
+++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
@@ -337,12 +337,12 @@
if(!L.client || L.client.is_afk())
set waitfor = FALSE
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [L.name], an inactive clock cultist?", ROLE_SERVANT_OF_RATVAR, null, ROLE_SERVANT_OF_RATVAR, 50, L)
- var/mob/dead/observer/theghost = null
- if(candidates.len)
+ if(LAZYLEN(candidates))
+ var/client/C = pick(candidates)
to_chat(L, "Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form!")
- message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(L)]) to replace an inactive clock cultist.")
+ message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(L)]) to replace an inactive clock cultist.")
L.ghostize(0)
- L.key = theghost.key
+ L.key = C.key
var/obj/effect/temp_visual/ratvar/sigil/vitality/V = new /obj/effect/temp_visual/ratvar/sigil/vitality(get_turf(src))
animate(V, alpha = 0, transform = matrix()*2, time = 8)
playsound(L, 'sound/magic/staff_healing.ogg', 50, 1)
diff --git a/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm b/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm
index 753a82fccb37..121961e0d8ea 100644
--- a/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm
@@ -122,9 +122,9 @@
else if(eminence_nominee == "ghosts")
kingmaking = TRUE
hierophant_message("The eminence spire is now selecting a ghost to be the Eminence...")
- var/list/candidates = pollGhostCandidates("Would you like to play as the servants' Eminence?", "Servant of Ratvar", null, ROLE_SERVANT_OF_RATVAR, poll_time = 100)
+ var/list/candidates = pollGhostCandidates("Would you like to play as the servants' Eminence?", ROLE_SERVANT_OF_RATVAR, null, ROLE_SERVANT_OF_RATVAR, poll_time = 100)
kingmaking = FALSE
- if(!candidates.len)
+ if(!LAZYLEN(candidates))
for(var/mob/M in servants_and_ghosts())
M.playsound_local(M, 'sound/machines/clockcult/integration_cog_install.ogg', 50, FALSE)
hierophant_message("No ghosts accepted the offer! The eminence spire has been reset.")
diff --git a/code/modules/antagonists/clockcult/clockcult.dm b/code/modules/antagonists/clockcult/clockcult.dm
index 2a05b14d70e3..067801677bf1 100644
--- a/code/modules/antagonists/clockcult/clockcult.dm
+++ b/code/modules/antagonists/clockcult/clockcult.dm
@@ -51,7 +51,7 @@
var/mob/living/current = owner.current
SSticker.mode.servants_of_ratvar += owner
SSticker.mode.update_servant_icons_added(owner)
- owner.special_role = "Servant of Ratvar"
+ owner.special_role = ROLE_SERVANT_OF_RATVAR
owner.current.log_message("Has been converted to the cult of Ratvar!", INDIVIDUAL_ATTACK_LOG)
if(issilicon(current))
if(iscyborg(current) && !silent)
diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm
index 1bcb9ef63ca0..db24afa1a579 100644
--- a/code/modules/antagonists/cult/runes.dm
+++ b/code/modules/antagonists/cult/runes.dm
@@ -268,7 +268,7 @@ structure_check() searches for nearby cultist structures required for the invoca
"AAAAAAAAAAAAAA-")
SSticker.mode.add_cultist(convertee.mind, 1)
new /obj/item/melee/cultblade/dagger(get_turf(src))
- convertee.mind.special_role = "Cultist"
+ convertee.mind.special_role = ROLE_CULTIST
to_chat(convertee, "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible, truth. The veil of reality has been ripped away \
and something evil takes root.")
to_chat(convertee, "Assist your new compatriots in their dark dealings. Your goal is theirs, and theirs is yours. You serve the Geometer above all else. Bring it back.\
@@ -576,13 +576,12 @@ structure_check() searches for nearby cultist structures required for the invoca
if(!mob_to_revive.client || mob_to_revive.client.is_afk())
set waitfor = FALSE
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [mob_to_revive.name], an inactive blood cultist?", ROLE_CULTIST, null, ROLE_CULTIST, 50, mob_to_revive)
- var/mob/dead/observer/theghost = null
- if(candidates.len)
- theghost = pick(candidates)
+ if(LAZYLEN(candidates))
+ var/client/C = pick(candidates)
to_chat(mob_to_revive.mind, "Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form.")
- message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(mob_to_revive)]) to replace an AFK player.")
+ message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(mob_to_revive)]) to replace an AFK player.")
mob_to_revive.ghostize(0)
- mob_to_revive.key = theghost.key
+ mob_to_revive.key = C.key
else
fail_invoke()
return
diff --git a/code/modules/antagonists/morph/morph.dm b/code/modules/antagonists/morph/morph.dm
index e467be0cfca6..74ec3ecacbc5 100644
--- a/code/modules/antagonists/morph/morph.dm
+++ b/code/modules/antagonists/morph/morph.dm
@@ -213,7 +213,7 @@
role_name = "morphling"
/datum/round_event/ghost_role/morph/spawn_role()
- var/list/candidates = get_candidates("alien", null, ROLE_ALIEN)
+ var/list/candidates = get_candidates(ROLE_ALIEN, null, ROLE_ALIEN)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
diff --git a/code/modules/antagonists/ninja/ninja.dm b/code/modules/antagonists/ninja/ninja.dm
index 8124b8c5b8c4..e8a1c140ea42 100644
--- a/code/modules/antagonists/ninja/ninja.dm
+++ b/code/modules/antagonists/ninja/ninja.dm
@@ -135,8 +135,8 @@
adj = "objectiveless"
else
return
- new_owner.assigned_role = "Space Ninja"
- new_owner.special_role = "Space Ninja"
+ new_owner.assigned_role = ROLE_NINJA
+ new_owner.special_role = ROLE_NINJA
new_owner.add_antag_datum(src)
message_admins("[key_name_admin(admin)] has [adj] ninja'ed [new_owner.current].")
log_admin("[key_name(admin)] has [adj] ninja'ed [new_owner.current].")
diff --git a/code/modules/antagonists/nukeop/nukeop.dm b/code/modules/antagonists/nukeop/nukeop.dm
index 8401dc8cedc5..7b07b762c07c 100644
--- a/code/modules/antagonists/nukeop/nukeop.dm
+++ b/code/modules/antagonists/nukeop/nukeop.dm
@@ -112,7 +112,7 @@
nuke_team = new_team
/datum/antagonist/nukeop/admin_add(datum/mind/new_owner,mob/admin)
- new_owner.assigned_role = "Syndicate"
+ new_owner.assigned_role = ROLE_SYNDICATE
new_owner.add_antag_datum(src)
message_admins("[key_name_admin(admin)] has nuke op'ed [new_owner.current].")
log_admin("[key_name(admin)] has nuke op'ed [new_owner.current].")
diff --git a/code/modules/antagonists/revenant/revenant.dm b/code/modules/antagonists/revenant/revenant.dm
index 94775887f93a..5be923ddcc88 100644
--- a/code/modules/antagonists/revenant/revenant.dm
+++ b/code/modules/antagonists/revenant/revenant.dm
@@ -84,8 +84,8 @@
objective2.owner = mind
mind.objectives += objective2
to_chat(src, "Objective #2: [objective2.explanation_text]")
- mind.assigned_role = "revenant"
- mind.special_role = "Revenant"
+ mind.assigned_role = ROLE_REVENANT
+ mind.special_role = ROLE_REVENANT
mind.add_antag_datum(/datum/antagonist/auto_custom)
AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision/revenant(null))
AddSpell(new /obj/effect/proc_holder/spell/targeted/revenant_transmit(null))
@@ -382,8 +382,8 @@
key_of_revenant = client_to_revive.key
if(!key_of_revenant)
message_admins("The new revenant's old client either could not be found or is in a new, living mob - grabbing a random candidate instead...")
- var/list/candidates = pollCandidatesForMob("Do you want to be [revenant.name] (reforming)?", "revenant", null, ROLE_REVENANT, 50, revenant)
- if(!candidates.len)
+ var/list/candidates = pollCandidatesForMob("Do you want to be [revenant.name] (reforming)?", ROLE_REVENANT, null, ROLE_REVENANT, 50, revenant)
+ if(!LAZYLEN(candidates))
qdel(revenant)
message_admins("No candidates were found for the new revenant. Oh well!")
inert = TRUE
diff --git a/code/modules/antagonists/revenant/revenant_spawn_event.dm b/code/modules/antagonists/revenant/revenant_spawn_event.dm
index 1b1bdcbfc189..876bd30bb9b4 100644
--- a/code/modules/antagonists/revenant/revenant_spawn_event.dm
+++ b/code/modules/antagonists/revenant/revenant_spawn_event.dm
@@ -26,7 +26,7 @@
message_admins("Event attempted to spawn a revenant, but there were only [deadMobs]/[REVENANT_SPAWN_THRESHOLD] dead mobs.")
return WAITING_FOR_SOMETHING
- var/list/candidates = get_candidates("revenant", null, ROLE_REVENANT)
+ var/list/candidates = get_candidates(ROLE_REVENANT, null, ROLE_REVENANT)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
diff --git a/code/modules/antagonists/revolution/revolution.dm b/code/modules/antagonists/revolution/revolution.dm
index 5c89fe24cf5e..e708cb925485 100644
--- a/code/modules/antagonists/revolution/revolution.dm
+++ b/code/modules/antagonists/revolution/revolution.dm
@@ -184,7 +184,7 @@
carbon_mob.flash_act(1, 1)
rev_mind.current.Stun(100)
rev_mind.add_antag_datum(/datum/antagonist/rev,rev_team)
- rev_mind.special_role = "Revolutionary"
+ rev_mind.special_role = ROLE_REV
return TRUE
/datum/antagonist/rev/head/proc/demote()
diff --git a/code/modules/antagonists/slaughter/slaughterevent.dm b/code/modules/antagonists/slaughter/slaughterevent.dm
index 4ac480b3452e..1af01e05ea29 100644
--- a/code/modules/antagonists/slaughter/slaughterevent.dm
+++ b/code/modules/antagonists/slaughter/slaughterevent.dm
@@ -13,7 +13,7 @@
role_name = "slaughter demon"
/datum/round_event/ghost_role/slaughter/spawn_role()
- var/list/candidates = get_candidates("alien", null, ROLE_ALIEN)
+ var/list/candidates = get_candidates(ROLE_ALIEN, null, ROLE_ALIEN)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm
index 136658767596..da34debf9554 100644
--- a/code/modules/antagonists/traitor/datum_traitor.dm
+++ b/code/modules/antagonists/traitor/datum_traitor.dm
@@ -6,7 +6,7 @@
var/should_specialise = TRUE //do we split into AI and human, set to true on inital assignment only
var/ai_datum = /datum/antagonist/traitor/AI
var/human_datum = /datum/antagonist/traitor/human
- var/special_role = "traitor"
+ var/special_role = ROLE_TRAITOR
var/employer = "The Syndicate"
var/give_objectives = TRUE
var/should_give_codewords = TRUE
diff --git a/code/modules/antagonists/wizard/wizard.dm b/code/modules/antagonists/wizard/wizard.dm
index e447fc46aa48..c23d7fe5a536 100644
--- a/code/modules/antagonists/wizard/wizard.dm
+++ b/code/modules/antagonists/wizard/wizard.dm
@@ -156,12 +156,12 @@
/datum/antagonist/wizard/apply_innate_effects(mob/living/mob_override)
var/mob/living/M = mob_override || owner.current
update_wiz_icons_added(M, wiz_team ? TRUE : FALSE) //Don't bother showing the icon if you're solo wizard
- M.faction |= "wizard"
+ M.faction |= ROLE_WIZARD
/datum/antagonist/wizard/remove_innate_effects(mob/living/mob_override)
var/mob/living/M = mob_override || owner.current
update_wiz_icons_removed(M)
- M.faction -= "wizard"
+ M.faction -= ROLE_WIZARD
/datum/antagonist/wizard/get_admin_commands()
diff --git a/code/modules/awaymissions/mission_code/Academy.dm b/code/modules/awaymissions/mission_code/Academy.dm
index 34144f0c4731..118bc9b5df15 100644
--- a/code/modules/awaymissions/mission_code/Academy.dm
+++ b/code/modules/awaymissions/mission_code/Academy.dm
@@ -92,7 +92,7 @@
var/mob/living/current_wizard = null
var/next_check = 0
var/cooldown = 600
- var/faction = "wizard"
+ var/faction = ROLE_WIZARD
var/braindead_check = 0
/obj/structure/academy_wizard_spawner/New()
@@ -128,13 +128,12 @@
if(!current_wizard)
return
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as Wizard Academy Defender?", ROLE_WIZARD, null, ROLE_WIZARD, 50, current_wizard)
- var/mob/dead/observer/chosen = null
- if(candidates.len)
- chosen = pick(candidates)
- message_admins("[key_name_admin(chosen)] was spawned as Wizard Academy Defender")
+ if(LAZYLEN(candidates))
+ var/client/C = pick(candidates)
+ message_admins("[key_name_admin(C)] was spawned as Wizard Academy Defender")
current_wizard.ghostize() // on the off chance braindead defender gets back in
- current_wizard.key = chosen.key
+ current_wizard.key = C.key
/obj/structure/academy_wizard_spawner/proc/summon_wizard()
var/turf/T = src.loc
@@ -272,11 +271,10 @@
servant_mind.transfer_to(H)
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [user.real_name] Servant?", ROLE_WIZARD, null, ROLE_WIZARD, 50, H)
- var/mob/dead/observer/chosen = null
- if(candidates.len)
- chosen = pick(candidates)
- message_admins("[key_name_admin(chosen)] was spawned as Dice Servant")
- H.key = chosen.key
+ if(LAZYLEN(candidates))
+ var/client/C = pick(candidates)
+ message_admins("[key_name_admin(C)] was spawned as Dice Servant")
+ H.key = C.key
var/obj/effect/proc_holder/spell/targeted/summonmob/S = new
S.target_mob = H
diff --git a/code/modules/awaymissions/mission_code/snowdin.dm b/code/modules/awaymissions/mission_code/snowdin.dm
index 4a069f26c05b..79ae318d048a 100644
--- a/code/modules/awaymissions/mission_code/snowdin.dm
+++ b/code/modules/awaymissions/mission_code/snowdin.dm
@@ -233,7 +233,7 @@
icon_state = "sleeper"
roundstart = FALSE
death = FALSE
- faction = "syndicate"
+ faction = ROLE_SYNDICATE
outfit = /datum/outfit/snowsyndie
flavour_text = {"You are a syndicate operative recently awoken from cyrostatis in an underground outpost. Monitor Nanotrasen communications and record information. All intruders should be
disposed of swirfly to assure no gathered information is stolen or lost. Try not to wander too far from the outpost as the caves can be a deadly place even for a trained operative such as yourself."}
diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm
index 666b7bbbafef..96ea588bfa54 100644
--- a/code/modules/awaymissions/mission_code/wildwest.dm
+++ b/code/modules/awaymissions/mission_code/wildwest.dm
@@ -113,7 +113,7 @@
if("To Kill")
to_chat(user, "Your wish is granted, but at a terrible cost...")
to_chat(user, "The Wish Granter punishes you for your wickedness, claiming your soul and warping your body to match the darkness in your heart.")
- user.mind.special_role = "traitor"
+ user.mind.special_role = ROLE_TRAITOR
var/datum/objective/hijack/hijack = new
hijack.owner = user.mind
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 900b0028354c..5d2cf519ecc5 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -468,7 +468,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "
Special Role Settings
"
- if(jobban_isbanned(user, "Syndicate"))
+ if(jobban_isbanned(user, ROLE_SYNDICATE))
dat += "You are banned from antagonist roles."
src.be_special = list()
diff --git a/code/modules/events/abductor.dm b/code/modules/events/abductor.dm
index 0777161a1f51..983553820624 100755
--- a/code/modules/events/abductor.dm
+++ b/code/modules/events/abductor.dm
@@ -12,7 +12,7 @@
fakeable = FALSE //Nothing to fake here
/datum/round_event/ghost_role/abductor/spawn_role()
- var/list/mob/dead/observer/candidates = get_candidates("abductor", null, ROLE_ABDUCTOR)
+ var/list/mob/dead/observer/candidates = get_candidates(ROLE_ABDUCTOR, null, ROLE_ABDUCTOR)
if(candidates.len < 2)
return NOT_ENOUGH_PLAYERS
diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm
index c34c219882da..87b12ad4cf01 100644
--- a/code/modules/events/alien_infestation.dm
+++ b/code/modules/events/alien_infestation.dm
@@ -51,7 +51,7 @@
message_admins("An event attempted to spawn an alien but no suitable vents were found. Shutting down.")
return MAP_ERROR
- var/list/candidates = get_candidates("alien", null, ROLE_ALIEN)
+ var/list/candidates = get_candidates(ROLE_ALIEN, null, ROLE_ALIEN)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm
index e75752adcc61..72e500db1cb2 100644
--- a/code/modules/events/blob.dm
+++ b/code/modules/events/blob.dm
@@ -19,7 +19,7 @@
/datum/round_event/ghost_role/blob/spawn_role()
if(!GLOB.blobstart.len)
return MAP_ERROR
- var/list/candidates = get_candidates("blob", null, ROLE_BLOB)
+ var/list/candidates = get_candidates(ROLE_BLOB, null, ROLE_BLOB)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
var/mob/dead/observer/new_blob = pick(candidates)
diff --git a/code/modules/events/devil.dm b/code/modules/events/devil.dm
index 467973bc953d..83c6dcb83d75 100644
--- a/code/modules/events/devil.dm
+++ b/code/modules/events/devil.dm
@@ -19,7 +19,7 @@
return MAP_ERROR
//selecting a candidate player
- var/list/candidates = get_candidates("devil", null, ROLE_DEVIL)
+ var/list/candidates = get_candidates(ROLE_DEVIL, null, ROLE_DEVIL)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
@@ -53,7 +53,7 @@
/proc/create_devil_mind(key)
var/datum/mind/Mind = new /datum/mind(key)
- Mind.assigned_role = "devil"
- Mind.special_role = "devil"
+ Mind.assigned_role = ROLE_DEVIL
+ Mind.special_role = ROLE_DEVIL
SSticker.mode.devils |= Mind
return Mind
diff --git a/code/modules/events/holiday/xmas.dm b/code/modules/events/holiday/xmas.dm
index 93d0b4edb584..8986c6a44bfd 100644
--- a/code/modules/events/holiday/xmas.dm
+++ b/code/modules/events/holiday/xmas.dm
@@ -75,10 +75,9 @@
/datum/round_event/santa/start()
var/list/candidates = pollGhostCandidates("Santa is coming to town! Do you want to be Santa?", poll_time=150)
if(LAZYLEN(candidates))
- var/mob/dead/observer/Z = pick(candidates)
+ var/client/C = pick(candidates)
santa = new /mob/living/carbon/human(pick(GLOB.blobstart))
- santa.key = Z.key
- qdel(Z)
+ santa.key = C.key
santa.equipOutfit(/datum/outfit/santa)
santa.update_icons()
diff --git a/code/modules/events/nightmare.dm b/code/modules/events/nightmare.dm
index 94014027fd69..1a6c99d6ed77 100644
--- a/code/modules/events/nightmare.dm
+++ b/code/modules/events/nightmare.dm
@@ -10,7 +10,7 @@
fakeable = FALSE
/datum/round_event/ghost_role/nightmare/spawn_role()
- var/list/candidates = get_candidates("alien", null, ROLE_ALIEN)
+ var/list/candidates = get_candidates(ROLE_ALIEN, null, ROLE_ALIEN)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
diff --git a/code/modules/events/operative.dm b/code/modules/events/operative.dm
index e0e3b987762e..424888f99b24 100644
--- a/code/modules/events/operative.dm
+++ b/code/modules/events/operative.dm
@@ -10,7 +10,7 @@
fakeable = FALSE
/datum/round_event/ghost_role/operative/spawn_role()
- var/list/candidates = get_candidates("operative", null, ROLE_OPERATIVE)
+ var/list/candidates = get_candidates(ROLE_OPERATIVE, null, ROLE_OPERATIVE)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
diff --git a/code/modules/jobs/jobs.dm b/code/modules/jobs/jobs.dm
index b5ec8fa27a4c..54a5b402db1f 100644
--- a/code/modules/jobs/jobs.dm
+++ b/code/modules/jobs/jobs.dm
@@ -57,7 +57,7 @@ GLOBAL_LIST_INIT(security_positions, list(
GLOBAL_LIST_INIT(nonhuman_positions, list(
"AI",
"Cyborg",
- "pAI"))
+ ROLE_PAI))
GLOBAL_LIST_INIT(exp_jobsmap, list(
EXP_TYPE_CREW = list("titles" = command_positions | engineering_positions | medical_positions | science_positions | supply_positions | security_positions | civilian_positions | list("AI","Cyborg")), // crew positions
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 5a97aa220e7a..18f8543a6a67 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -8,7 +8,7 @@
icon = 'icons/mob/alien.dmi'
gender = FEMALE //All xenos are girls!!
dna = null
- faction = list("alien")
+ faction = list(ROLE_ALIEN)
ventcrawler = VENTCRAWLER_ALWAYS
sight = SEE_MOBS
see_in_dark = 4
diff --git a/code/modules/mob/living/carbon/alien/organs.dm b/code/modules/mob/living/carbon/alien/organs.dm
index de543651ebf8..61ae0cba5d38 100644
--- a/code/modules/mob/living/carbon/alien/organs.dm
+++ b/code/modules/mob/living/carbon/alien/organs.dm
@@ -112,10 +112,10 @@
/obj/item/organ/alien/hivenode/Insert(mob/living/carbon/M, special = 0)
..()
- M.faction |= "alien"
+ M.faction |= ROLE_ALIEN
/obj/item/organ/alien/hivenode/Remove(mob/living/carbon/M, special = 0)
- M.faction -= "alien"
+ M.faction -= ROLE_ALIEN
..()
//When the alien queen dies, all aliens suffer a penalty as punishment for failing to protect her.
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index c08dd83f99be..401b7fafba92 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -46,7 +46,7 @@
connected_ai = null
if(mind)
if(!mind.special_role)
- mind.special_role = "traitor"
+ mind.special_role = ROLE_TRAITOR
mind.add_antag_datum(/datum/antagonist/auto_custom) // ????
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 65df7d9bbe71..8d7d2600ce7b 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -800,7 +800,7 @@
/mob/living/silicon/robot/modules/syndicate
icon_state = "syndie_bloodhound"
- faction = list("syndicate")
+ faction = list(ROLE_SYNDICATE)
bubble_icon = "syndibot"
req_access = list(ACCESS_SYNDICATE)
lawupdate = FALSE
diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm
index 0bafce60d315..db9ad53a9fae 100644
--- a/code/modules/mob/living/silicon/robot/robot_defense.dm
+++ b/code/modules/mob/living/silicon/robot/robot_defense.dm
@@ -118,11 +118,7 @@
log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they were a syndicate cyborg.")
return
- var/ai_is_antag = 0
- if(connected_ai && connected_ai.mind)
- if(connected_ai.mind.special_role)
- ai_is_antag = (connected_ai.mind.special_role == "traitor")
- if(ai_is_antag)
+ if(connected_ai && connected_ai.mind && connected_ai.mind.has_antag_datum(/datum/antagonist/traitor))
to_chat(src, "ALERT: Foreign software execution prevented.")
to_chat(connected_ai, "ALERT: Cyborg unit \[[src]] successfully defended against subversion.")
log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they were slaved to traitor AI [connected_ai].")
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm
index 1105940f22f0..4abed2e8c495 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm
@@ -18,7 +18,7 @@
health = 30
maxHealth = 120 //If you murder other drones and cannibalize them you can get much stronger
initial_language_holder = /datum/language_holder/drone/syndicate
- faction = list("syndicate")
+ faction = list(ROLE_SYNDICATE)
speak_emote = list("hisses")
bubble_icon = "syndibot"
heavy_emp_damage = 10
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index fbed7d4331d1..24b61424e1c9 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -418,16 +418,15 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
var/mob/living/simple_animal/hostile/guardian/G = input(src, "Pick the guardian you wish to reset", "Guardian Reset") as null|anything in guardians
if(G)
to_chat(src, "You attempt to reset [G.real_name]'s personality...")
- var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as [src.real_name]'s [G.real_name]?", "pAI", null, FALSE, 100)
- var/mob/dead/observer/new_stand = null
- if(candidates.len)
- new_stand = pick(candidates)
+ var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as [src.real_name]'s [G.real_name]?", ROLE_PAI, null, FALSE, 100)
+ if(LAZYLEN(candidates))
+ var/client/C = pick(candidates)
to_chat(G, "Your user reset you, and your body was taken over by a ghost. Looks like they weren't happy with your performance.")
to_chat(src, "Your [G.real_name] has been successfully reset.")
- message_admins("[key_name_admin(new_stand)] has taken control of ([key_name_admin(G)])")
+ message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(G)])")
G.ghostize(0)
G.setthemename(G.namedatum.theme) //give it a new color, to show it's a new person
- G.key = new_stand.key
+ G.key = C.key
G.reset = 1
switch(G.namedatum.theme)
if("tech")
@@ -494,11 +493,10 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
used = TRUE
to_chat(user, "[use_message]")
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as the [mob_name] of [user.real_name]?", ROLE_PAI, null, FALSE, 100, POLL_IGNORE_HOLOPARASITE)
- var/mob/dead/observer/theghost = null
- if(candidates.len)
- theghost = pick(candidates)
- spawn_guardian(user, theghost.key)
+ if(LAZYLEN(candidates))
+ var/client/C = pick(candidates)
+ spawn_guardian(user, C.key)
else
to_chat(user, "[failure_message]")
used = FALSE
diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm
index 70881820dd69..5b4909c27420 100644
--- a/code/modules/mob/living/simple_animal/hostile/alien.dm
+++ b/code/modules/mob/living/simple_animal/hostile/alien.dm
@@ -26,7 +26,7 @@
attack_sound = 'sound/weapons/bladeslice.ogg'
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
- faction = list("alien")
+ faction = list(ROLE_ALIEN)
status_flags = CANPUSH
minbodytemp = 0
see_in_dark = 8
diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm
index 878f7b301903..4b494aeb5f01 100644
--- a/code/modules/mob/living/simple_animal/hostile/carp.dm
+++ b/code/modules/mob/living/simple_animal/hostile/carp.dm
@@ -93,7 +93,7 @@
gender = FEMALE
speak_emote = list("squeaks")
gold_core_spawnable = NO_SPAWN
- faction = list("syndicate")
+ faction = list(ROLE_SYNDICATE)
AIStatus = AI_OFF
#undef REGENERATION_DELAY
diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
index 10587947648c..38c0d387101a 100644
--- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
@@ -41,7 +41,7 @@
loot = list(/obj/effect/mob_spawn/human/corpse/syndicatesoldier)
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
- faction = list("syndicate")
+ faction = list(ROLE_SYNDICATE)
check_friendly_fire = 1
status_flags = CANPUSH
del_on_death = 1
@@ -169,7 +169,7 @@
environment_smash = ENVIRONMENT_SMASH_NONE
attacktext = "cuts"
attack_sound = 'sound/weapons/bladeslice.ogg'
- faction = list("syndicate")
+ faction = list(ROLE_SYNDICATE)
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
mob_size = MOB_SIZE_TINY
diff --git a/code/modules/mob/living/simple_animal/hostile/wizard.dm b/code/modules/mob/living/simple_animal/hostile/wizard.dm
index f53b5b8f507f..9d745b7b3a4f 100644
--- a/code/modules/mob/living/simple_animal/hostile/wizard.dm
+++ b/code/modules/mob/living/simple_animal/hostile/wizard.dm
@@ -21,7 +21,7 @@
a_intent = INTENT_HARM
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
- faction = list("wizard")
+ faction = list(ROLE_WIZARD)
status_flags = CANPUSH
retreat_distance = 3 //out of fireball range
diff --git a/code/modules/mob/living/simple_animal/spawner.dm b/code/modules/mob/living/simple_animal/spawner.dm
index 43274bc3f79d..a6970ece6879 100644
--- a/code/modules/mob/living/simple_animal/spawner.dm
+++ b/code/modules/mob/living/simple_animal/spawner.dm
@@ -55,7 +55,7 @@
icon_state = "syndbeacon"
spawn_text = "warps in from"
mob_type = /mob/living/simple_animal/hostile/syndicate/ranged
- faction = list("syndicate")
+ faction = list(ROLE_SYNDICATE)
/mob/living/simple_animal/hostile/spawner/skeleton
name = "bone pit"
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 0295d4f7fa91..067307320a8d 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -449,15 +449,14 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
var/datum/antagonist/A = M.mind.has_antag_datum(/datum/antagonist/)
if(A)
poll_message = "[poll_message] Status:[A.name]."
- var/list/mob/dead/observer/candidates = pollCandidatesForMob(poll_message, "pAI", null, FALSE, 100, M)
- var/mob/dead/observer/theghost = null
+ var/list/mob/dead/observer/candidates = pollCandidatesForMob(poll_message, ROLE_PAI, null, FALSE, 100, M)
- if(candidates.len)
- theghost = pick(candidates)
+ if(LAZYLEN(candidates))
+ var/client/C = pick(candidates)
to_chat(M, "Your mob has been taken over by a ghost!")
- message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(M)])")
+ message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(M)])")
M.ghostize(0)
- M.key = theghost.key
+ M.key = C.key
return TRUE
else
to_chat(M, "There were no ghosts willing to take control.")
diff --git a/code/modules/ninja/ninja_event.dm b/code/modules/ninja/ninja_event.dm
index 2b12adb4a8c1..ef3569b051da 100644
--- a/code/modules/ninja/ninja_event.dm
+++ b/code/modules/ninja/ninja_event.dm
@@ -48,7 +48,7 @@ Contents:
return MAP_ERROR
//selecting a candidate player
- var/list/candidates = get_candidates("ninja", null, ROLE_NINJA)
+ var/list/candidates = get_candidates(ROLE_NINJA, null, ROLE_NINJA)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
@@ -57,8 +57,8 @@ Contents:
//Prepare ninja player mind
var/datum/mind/Mind = new /datum/mind(key)
- Mind.assigned_role = "Space Ninja"
- Mind.special_role = "Space Ninja"
+ Mind.assigned_role = ROLE_NINJA
+ Mind.special_role = ROLE_NINJA
Mind.active = 1
//spawn the ninja and assign the candidate
diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
index aed7b0b5e836..348848c4476d 100644
--- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
@@ -380,7 +380,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A classic mix of rum and cola."
/datum/reagent/consumable/ethanol/cuba_libre/on_mob_life(mob/living/M)
- if(M.mind && M.mind.special_role in list("Revolutionary", "Head Revolutionary")) //Cuba Libre, the traditional drink of revolutions! Heals revolutionaries.
+ if(M.mind && M.mind.has_antag_datum(/datum/antagonist/rev)) //Cuba Libre, the traditional drink of revolutions! Heals revolutionaries.
M.adjustBruteLoss(-1, 0)
M.adjustFireLoss(-1, 0)
M.adjustToxLoss(-1, 0)
diff --git a/code/modules/reagents/chemistry/reagents/blob_reagents.dm b/code/modules/reagents/chemistry/reagents/blob_reagents.dm
index cd5f4aa7c704..727ffa2874fa 100644
--- a/code/modules/reagents/chemistry/reagents/blob_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/blob_reagents.dm
@@ -301,7 +301,7 @@
var/obj/effect/temp_visual/explosion/fast/E = new /obj/effect/temp_visual/explosion/fast(get_turf(M))
E.alpha = 150
for(var/mob/living/L in orange(get_turf(M), 1))
- if("blob" in L.faction) //no friendly fire
+ if(ROLE_BLOB in L.faction) //no friendly fire
continue
var/aoe_volume = ..(L, TOUCH, initial_volume, 0, L.get_permeability_protection(), O)
L.apply_damage(0.4*aoe_volume, BRUTE)
diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm
index 77f5a04c8804..98fddc1c79ae 100644
--- a/code/modules/research/xenobiology/xenobiology.dm
+++ b/code/modules/research/xenobiology/xenobiology.dm
@@ -592,10 +592,9 @@
being_used = TRUE
var/list/candidates = pollCandidatesForMob("Do you want to play as [SM.name]?", ROLE_ALIEN, null, ROLE_ALIEN, 50, SM, POLL_IGNORE_SENTIENCE_POTION) // see poll_ignore.dm
- var/mob/dead/observer/theghost = null
- if(candidates.len)
- theghost = pick(candidates)
- SM.key = theghost.key
+ if(LAZYLEN(candidates))
+ var/client/C = pick(candidates)
+ SM.key = C.key
SM.mind.enslave_mind_to_creator(user)
SM.sentience_act()
to_chat(SM, "All at once it makes sense: you know what you are and who you are! Self awareness is yours!")
diff --git a/code/modules/ruins/lavaland_ruin_code.dm b/code/modules/ruins/lavaland_ruin_code.dm
index f2377258db71..becb7abf1d05 100644
--- a/code/modules/ruins/lavaland_ruin_code.dm
+++ b/code/modules/ruins/lavaland_ruin_code.dm
@@ -120,7 +120,7 @@
implants = list(/obj/item/implant/weapons_auth)
/datum/outfit/lavaland_syndicate/post_equip(mob/living/carbon/human/H)
- H.faction |= "syndicate"
+ H.faction |= ROLE_SYNDICATE
/obj/effect/mob_spawn/human/lavaland_syndicate/comms
name = "Syndicate Comms Agent"
diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm
index 59faaf1779c8..e9182edeae65 100644
--- a/code/modules/shuttle/emergency.dm
+++ b/code/modules/shuttle/emergency.dm
@@ -261,7 +261,7 @@
if(shuttle_areas[get_area(player)])
has_people = TRUE
var/location = get_turf(player.mind.current)
- if(!(player.mind.special_role == "traitor" || player.mind.special_role == "Syndicate" || player.mind.special_role == "blood brother") && !istype(location, /turf/open/floor/plasteel/shuttle/red) && !istype(location, /turf/open/floor/mineral/plastitanium/brig))
+ if(!(player.mind.has_antag_datum(/datum/antagonist)) && !istype(location, /turf/open/floor/plasteel/shuttle/red) && !istype(location, /turf/open/floor/mineral/plastitanium/brig))
return FALSE
return has_people