diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 1d3300bbf8c..60260036ecf 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -6,12 +6,14 @@ //These are synced with the Database, if you change the values of the defines //then you MUST update the database! +#define ROLE_SYNDICATE "Syndicate" #define ROLE_TRAITOR "traitor" #define ROLE_OPERATIVE "operative" #define ROLE_CHANGELING "changeling" #define ROLE_WIZARD "wizard" #define ROLE_MALF "malf AI" #define ROLE_REV "revolutionary" +#define ROLE_REV_HEAD "Head Revolutionary" #define ROLE_ALIEN "xenomorph" #define ROLE_PAI "pAI" #define ROLE_CULTIST "cultist" diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 462e5459a6e..80d3d8e3496 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -476,7 +476,7 @@ if(!gametypeCheck.age_check(M.client)) continue if(jobbanType) - if(jobban_isbanned(M, jobbanType) || jobban_isbanned(M, "Syndicate")) + if(jobban_isbanned(M, jobbanType) || jobban_isbanned(M, ROLE_SYNDICATE)) continue showCandidatePollWindow(M, poll_time, Question, result, ignore_category, time_passed, flashwindow) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index abe7b0222ff..963b29d46d4 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -686,20 +686,20 @@ var/datum/antagonist/changeling/C = has_antag_datum(/datum/antagonist/changeling) if(!C) C = add_antag_datum(/datum/antagonist/changeling) - special_role = "Changeling" + special_role = ROLE_CHANGELING return C /datum/mind/proc/make_Wizard() if(!has_antag_datum(/datum/antagonist/wizard)) - special_role = "Wizard" - assigned_role = "Wizard" + special_role = ROLE_WIZARD + assigned_role = ROLE_WIZARD add_antag_datum(/datum/antagonist/wizard) /datum/mind/proc/make_Cultist() if(!has_antag_datum(/datum/antagonist/cult,TRUE)) SSticker.mode.add_cultist(src,FALSE,equip=TRUE) - special_role = "Cultist" + special_role = ROLE_CULTIST to_chat(current, "You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy your world is, you see that it should be open to the knowledge of Nar-Sie.") to_chat(current, "Assist your new bretheren in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.") @@ -708,7 +708,7 @@ head.give_flash = TRUE head.give_hud = TRUE add_antag_datum(head) - special_role = "Head Revolutionary" + special_role = ROLE_REV_HEAD /datum/mind/proc/AddSpell(obj/effect/proc_holder/spell/S) spell_list += S @@ -809,7 +809,7 @@ //XENO /mob/living/carbon/alien/mind_initialize() ..() - mind.special_role = "Alien" + mind.special_role = ROLE_ALIEN //AI /mob/living/silicon/ai/mind_initialize() @@ -824,5 +824,5 @@ //PAI /mob/living/silicon/pai/mind_initialize() ..() - mind.assigned_role = "pAI" + mind.assigned_role = ROLE_PAI mind.special_role = "" diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 491378c5de2..1f95688fa36 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -48,7 +48,7 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th var/datum/mind/changeling = pick(antag_candidates) antag_candidates -= changeling changelings += changeling - changeling.special_role = "Changeling" + changeling.special_role = ROLE_CHANGELING changeling.restricted_roles = restricted_jobs return 1 else @@ -82,7 +82,7 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th return if(changelings.len <= (changelingcap - 2) || prob(100 - (csc * 2))) if(ROLE_CHANGELING in character.client.prefs.be_special) - if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, "Syndicate")) + if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, ROLE_SYNDICATE)) if(age_check(character.client)) if(!(character.job in restricted_jobs)) character.mind.make_Changling() diff --git a/code/game/gamemodes/changeling/traitor_chan.dm b/code/game/gamemodes/changeling/traitor_chan.dm index 6287e707f2d..e59cf40ca44 100644 --- a/code/game/gamemodes/changeling/traitor_chan.dm +++ b/code/game/gamemodes/changeling/traitor_chan.dm @@ -49,7 +49,7 @@ var/datum/mind/changeling = pick(possible_changelings) antag_candidates -= changeling possible_changelings -= changeling - changeling.special_role = "Changeling" + changeling.special_role = ROLE_CHANGELING changelings += changeling changeling.restricted_roles = restricted_jobs return ..() @@ -69,7 +69,7 @@ return if(changelings.len <= (changelingcap - 2) || prob(100 / (csc * 4))) if(ROLE_CHANGELING in character.client.prefs.be_special) - if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, "Syndicate")) + if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, ROLE_SYNDICATE)) if(age_check(character.client)) if(!(character.job in restricted_jobs)) character.mind.make_Changling() diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index 7790361f12d..730c8bff774 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -158,8 +158,8 @@ Credit where due: var/datum/mind/servant = pick(antag_candidates) servants_to_serve += servant antag_candidates -= servant - servant.assigned_role = "Servant of Ratvar" - servant.special_role = "Servant of Ratvar" + servant.assigned_role = ROLE_SERVANT_OF_RATVAR + servant.special_role = ROLE_SERVANT_OF_RATVAR starter_servants-- ark_time = 30 + round((roundstart_player_count / 5)) //In minutes, how long the Ark will wait before activation ark_time = min(ark_time, 35) //35 minute maximum for the activation timer diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 873fc96afeb..fde8a16b13c 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -77,7 +77,7 @@ var/datum/mind/cultist = pick(antag_candidates) antag_candidates -= cultist cultists_to_cult += cultist - cultist.special_role = "Cultist" + cultist.special_role = ROLE_CULTIST cultist.restricted_roles = restricted_jobs log_game("[cultist.key] (ckey) has been selected as a cultist") diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 0fdac5c86a7..06c1b4fb185 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -301,7 +301,7 @@ for(var/mob/dead/new_player/player in players) if(player.client && player.ready == PLAYER_READY_TO_PLAY) if(role in player.client.prefs.be_special) - if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans + if(!jobban_isbanned(player, ROLE_SYNDICATE) && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans if(age_check(player.client)) //Must be older than the minimum age candidates += player.mind // Get a list of all the people who want to be the antagonist for this round @@ -315,7 +315,7 @@ for(var/mob/dead/new_player/player in players) if(player.client && player.ready == PLAYER_READY_TO_PLAY) if(!(role in player.client.prefs.be_special)) // We don't have enough people who want to be antagonist, make a separate list of people who don't want to be one - if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans + if(!jobban_isbanned(player, ROLE_SYNDICATE) && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans drafted += player.mind if(restricted_jobs) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 5451de3d5c2..b5e1224cc89 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -154,7 +154,7 @@ W.implant(H) var/obj/item/implant/explosive/E = new/obj/item/implant/explosive(H) E.implant(H) - H.faction |= "syndicate" + H.faction |= ROLE_SYNDICATE H.update_icons() /datum/outfit/syndicate/full diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 47c1b403bcb..7409faa706e 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -79,7 +79,7 @@ return if((SSticker.mode.traitors.len + pre_traitors.len) <= (traitorcap - 2) || prob(100 / (tsc * 2))) if(ROLE_TRAITOR in character.client.prefs.be_special) - if(!jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, "Syndicate")) + if(!jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, ROLE_SYNDICATE)) if(age_check(character.client)) if(!(character.job in restricted_jobs)) add_latejoin_traitor(character.mind) diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 0d9655ae8eb..dd8dad331f4 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -21,8 +21,8 @@ /datum/game_mode/wizard/pre_setup() var/datum/mind/wizard = pick(antag_candidates) wizards += wizard - wizard.assigned_role = "Wizard" - wizard.special_role = "Wizard" + wizard.assigned_role = ROLE_WIZARD + wizard.special_role = ROLE_WIZARD log_game("[wizard.key] (ckey) has been selected as a Wizard") //TODO: Move these to base antag datum if(GLOB.wizardstart.len == 0) to_chat(wizard.current, "A starting location for you could not be found, please report this bug!") diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 26b156c8f44..99b951c32c8 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -570,7 +570,7 @@ stun_projectile_sound = 'sound/weapons/gunshot.ogg' icon_state = "syndie_off" base_icon_state = "syndie" - faction = "syndicate" + faction = ROLE_SYNDICATE emp_vunerable = 0 desc = "A ballistic machine gun auto-turret." diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index ae20859a9de..b8c2344dacc 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -125,23 +125,29 @@ else qdel(src) //How? +/obj/item/grenade/plastic/proc/shout_syndicate_crap(mob/M) + if(!M) + return + var/message_say = "FOR NO RAISIN!" + if(M.mind) + var/datum/mind/UM = M + if(UM.has_antag_datum(/datum/antagonist/nukeop) || UM.has_antag_datum(/datum/antagonist/traitor)) + message_say = "FOR THE SYNDICATE!" + else if(UM.has_antag_datum(/datum/antagonist/changeling)) + message_say = "FOR THE HIVE!" + else if(UM.has_antag_datum(/datum/antagonist/cult)) + message_say = "FOR NAR-SIE!" + else if(UM.has_antag_datum(/datum/antagonist/clockcult)) + message_say = "FOR RATVAR!" + else if(UM.has_antag_datum(/datum/antagonist/rev)) + message_say = "VIVA LA REVOLUTION!" + M.say(message_say) + /obj/item/grenade/plastic/suicide_act(mob/user) message_admins("[ADMIN_LOOKUPFLW(user)] suicided with [src] at [ADMIN_COORDJMP(user)]",0,1) log_game("[key_name(user)] suicided with [src] at [COORD(user)]") user.visible_message("[user] activates [src] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!") - var/message_say = "FOR NO RAISIN!" - if(user.mind) - if(user.mind.special_role) - var/role = lowertext(user.mind.special_role) - if(role == "traitor" || role == "syndicate") - message_say = "FOR THE SYNDICATE!" - else if(role == "changeling") - message_say = "FOR THE HIVE!" - else if(role == "cultist") - message_say = "FOR NAR-SIE!" - else if(is_revolutionary(user)) - message_say = "VIVA LA REVOLUTION!" - user.say(message_say) + shout_syndicate_crap(user) explosion(user,0,2,0) //Cheap explosion imitation because putting prime() here causes runtimes user.gib(1, 1) qdel(src) @@ -176,19 +182,7 @@ /obj/item/grenade/plastic/c4/suicide_act(mob/user) user.visible_message("[user] activates the [src.name] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!") - var/message_say = "FOR NO RAISIN!" - if(user.mind) - if(user.mind.special_role) - var/role = lowertext(user.mind.special_role) - if(role == "traitor" || role == "syndicate") - message_say = "FOR THE SYNDICATE!" - else if(role == "changeling") - message_say = "FOR THE HIVE!" - else if(role == "cultist") - message_say = "FOR NAR-SIE!" - else if(is_revolutionary(user)) - message_say = "VIVA LA REVOLUTION!" - user.say(message_say) + shout_syndicate_crap(user) target = user message_admins("[ADMIN_LOOKUPFLW(user)] suicided with [name] at [ADMIN_COORDJMP(src)]",0,1) message_admins("[key_name(user)] suicided with [name] at ([x],[y],[z])") diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index aaa19b6ab13..4368797f068 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -241,14 +241,13 @@ possessed = TRUE var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, null, FALSE, 100, POLL_IGNORE_POSSESSED_BLADE) - var/mob/dead/observer/theghost = null if(LAZYLEN(candidates)) - theghost = pick(candidates) + var/client/C = pick(candidates) var/mob/living/simple_animal/shade/S = new(src) S.real_name = name S.name = name - S.ckey = theghost.ckey + S.ckey = C.ckey S.status_flags |= GODMODE S.language_holder = user.language_holder.copy(S) var/input = stripped_input(S,"What are you named?", ,"", MAX_NAME_LEN) diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index ec1099fb51b..fc292060904 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -411,7 +411,7 @@ id = /obj/item/card/id /datum/outfit/syndicate_empty/post_equip(mob/living/carbon/human/H) - H.faction |= "syndicate" + H.faction |= ROLE_SYNDICATE /obj/effect/mob_spawn/human/syndicate/battlecruiser name = "Syndicate Battlecruiser Ship Operative" diff --git a/code/modules/admin/DB_ban/functions.dm b/code/modules/admin/DB_ban/functions.dm index 752131369b4..90eac62b16e 100644 --- a/code/modules/admin/DB_ban/functions.dm +++ b/code/modules/admin/DB_ban/functions.dm @@ -383,7 +383,7 @@ output += "" for(var/j in GLOB.nonhuman_positions) output += "" - for(var/j in list("traitor","changeling","operative","revolutionary", "gangster","cultist","wizard")) + for(var/j in list(ROLE_TRAITOR, ROLE_CHANGELING, ROLE_OPERATIVE, ROLE_REV, ROLE_CULTIST, ROLE_WIZARD)) output += "" output += "" output += "Reason:

" diff --git a/code/modules/admin/fun_balloon.dm b/code/modules/admin/fun_balloon.dm index e86aa6d6453..6508953694c 100644 --- a/code/modules/admin/fun_balloon.dm +++ b/code/modules/admin/fun_balloon.dm @@ -51,15 +51,15 @@ bodies += M var/question = "Would you like to be [group_name]?" - var/list/candidates = pollCandidatesForMobs(question, "pAI", null, FALSE, 100, bodies) - while(candidates.len && bodies.len) - var/mob/dead/observer/ghost = pick_n_take(candidates) + var/list/candidates = pollCandidatesForMobs(question, ROLE_PAI, null, FALSE, 100, bodies) + while(LAZYLEN(candidates) && LAZYLEN(bodies)) + var/client/C = pick_n_take(candidates) var/mob/living/body = pick_n_take(bodies) to_chat(body, "Your mob has been taken over by a ghost!") - message_admins("[key_name_admin(ghost)] has taken control of ([key_name_admin(body)])") + message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(body)])") body.ghostize(0) - body.key = ghost.key + body.key = C.key new /obj/effect/temp_visual/gravpush(get_turf(body)) /obj/effect/fun_balloon/sentience/emergency_shuttle diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 6e15da69ef8..670b22815db 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -236,7 +236,7 @@ if(islarva(M)) M_job = "Alien larva" else - M_job = "Alien" + M_job = ROLE_ALIEN else M_job = "Carbon-based" @@ -244,7 +244,7 @@ if(isAI(M)) M_job = "AI" else if(ispAI(M)) - M_job = "pAI" + M_job = ROLE_PAI else if(iscyborg(M)) M_job = "Cyborg" else diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index e0ba3a63784..f4b614e7bba 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -781,7 +781,7 @@ dat += "Ghost Roles" //pAI - if(jobban_isbanned(M, "pAI")) + if(jobban_isbanned(M, ROLE_PAI)) dat += "pAI" else dat += "pAI" @@ -816,38 +816,38 @@ dat += "" //Antagonist (Orange) - var/isbanned_dept = jobban_isbanned(M, "Syndicate") + var/isbanned_dept = jobban_isbanned(M, ROLE_SYNDICATE) dat += "" dat += "" dat += "Conversion Antagonists" //Traitor - if(jobban_isbanned(M, "traitor") || isbanned_dept) + if(jobban_isbanned(M, ROLE_TRAITOR) || isbanned_dept) dat += "" else dat += "" //Changeling - if(jobban_isbanned(M, "changeling") || isbanned_dept) + if(jobban_isbanned(M, ROLE_CHANGELING) || isbanned_dept) dat += "" else dat += "" //Nuke Operative - if(jobban_isbanned(M, "operative") || isbanned_dept) + if(jobban_isbanned(M, ROLE_OPERATIVE) || isbanned_dept) dat += "" else dat += "" //Revolutionary - if(jobban_isbanned(M, "revolutionary") || isbanned_dept) + if(jobban_isbanned(M, ROLE_REV) || isbanned_dept) dat += "" else dat += "" //Cultist - if(jobban_isbanned(M, "cultist") || isbanned_dept) + if(jobban_isbanned(M, ROLE_CULTIST) || isbanned_dept) dat += "" else dat += "" @@ -855,28 +855,28 @@ dat += "" //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 += "" else dat += "" //Wizard - if(jobban_isbanned(M, "wizard") || isbanned_dept) + if(jobban_isbanned(M, ROLE_WIZARD) || isbanned_dept) dat += "" else dat += "" //Abductor - if(jobban_isbanned(M, "abductor") || isbanned_dept) + if(jobban_isbanned(M, ROLE_ABDUCTOR) || isbanned_dept) dat += "" else dat += "" //Alien - if(jobban_isbanned(M, "alien candidate") || isbanned_dept) - dat += "" + if(jobban_isbanned(M, ROLE_ALIEN) || isbanned_dept) + dat += "" else - dat += "" + dat += "" dat += "
Antagonist Positions | " dat += "Team Antagonists
TraitorTraitorChangelingChangelingNuke OperativeNuke OperativeRevolutionaryRevolutionaryCultistCultist
ServantServantWizardWizardAbductorAbductorAlienAlienAlienAlien
" 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 11b4775f111..759cc97dbb0 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 d462256cacb..bbe7c97bbf6 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 7d090bfd636..10842997599 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 8d4c1cf5ba9..2ced63535a1 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 a31c0e02e66..c9bb5fdc9a3 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 a37a8d5c227..6c852684b2b 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 e88cc8fb963..131f3c14cc0 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 f878e519bad..c110ef272cc 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 f692335ee16..d8371d37516 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 033bf49b3bf..d6afa339d5c 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 49cab86ff92..2eb3315e035 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 753a82fccb3..121961e0d8e 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 2a05b14d70e..067801677bf 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 1bcb9ef63ca..db24afa1a57 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 e467be0cfca..74ec3ecacbc 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 8124b8c5b8c..e8a1c140ea4 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 8401dc8cedc..7b07b762c07 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 94775887f93..5be923ddcc8 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 1b1bdcbfc18..876bd30bb9b 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 5c89fe24cf5..e708cb92548 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 4ac480b3452..1af01e05ea2 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 13665876759..da34debf955 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 e447fc46aa4..c23d7fe5a53 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 34144f0c473..118bc9b5df1 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 4a069f26c05..79ae318d048 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 666b7bbbafe..96ea588bfa5 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 900b0028354..5d2cf519ecc 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 0777161a1f5..98355382062 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 c34c219882d..87b12ad4cf0 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 e75752adcc6..72e500db1cb 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 467973bc953..83c6dcb83d7 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 93d0b4edb58..8986c6a44bf 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 94014027fd6..1a6c99d6ed7 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 e0e3b987762..424888f99b2 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 b5ec8fa27a4..54a5b402db1 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 5a97aa220e7..18f8543a6a6 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 de543651ebf..61ae0cba5d3 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 c08dd83f99b..401b7fafba9 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 65df7d9bbe7..8d7d2600ce7 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 0bafce60d31..db9ad53a9fa 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 1105940f22f..4abed2e8c49 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 fbed7d4331d..24b61424e1c 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 70881820dd6..5b4909c2742 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 878f7b30190..4b494aeb5f0 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 10587947648..38c0d387101 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 f53b5b8f507..9d745b7b3a4 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 43274bc3f79..a6970ece687 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 0295d4f7fa9..067307320a8 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 2b12adb4a8c..ef3569b051d 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 aed7b0b5e83..348848c4476 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 cd5f4aa7c70..727ffa2874f 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 77f5a04c880..98fddc1c79a 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 f2377258db7..becb7abf1d0 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 59faaf1779c..e9182edeae6 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