diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index 8fcbc85dd8..4859ce2239 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -37,7 +37,7 @@
if(PDA_Manifest.len)
PDA_Manifest.Cut()
- if(H.mind && !player_is_antag(H.mind))
+ if(H.mind && !player_is_antag(H.mind, only_offstation_roles = 1))
var/assignment
if(H.mind.role_alt_title)
assignment = H.mind.role_alt_title
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 7a5713749d..b8260825c9 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -213,7 +213,8 @@
if (!new_target) return
var/objective_path = text2path("/datum/objective/[new_obj_type]")
- if (new_target == "Free objective")
+ var/mob/living/M = new_target
+ if (!istype(M) || !M.mind || new_target == "Free objective")
new_objective = new objective_path
new_objective.owner = src
new_objective:target = null
@@ -221,9 +222,8 @@
else
new_objective = new objective_path
new_objective.owner = src
- new_objective:target = new_target:mind
- //Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
- new_objective.explanation_text = "[objective_type] [new_target:real_name], the [player_is_antag(new_target:mind) ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]."
+ new_objective:target = M.mind
+ new_objective.explanation_text = "[objective_type] [M.real_name], the [M.mind.special_role ? M.mind:special_role : M.mind:assigned_role]."
if ("prevent")
new_objective = new /datum/objective/block
diff --git a/code/game/antagonist/_antagonist_setup.dm b/code/game/antagonist/_antagonist_setup.dm
index f107937913..fa99f001f3 100644
--- a/code/game/antagonist/_antagonist_setup.dm
+++ b/code/game/antagonist/_antagonist_setup.dm
@@ -71,9 +71,11 @@ var/global/list/antag_names_to_ids = list()
return antag.current_antagonists
return list()
-/proc/player_is_antag(var/datum/mind/player)
+/proc/player_is_antag(var/datum/mind/player, var/only_offstation_roles = 0)
for(var/antag_type in all_antag_types)
var/datum/antagonist/antag = all_antag_types[antag_type]
+ if(only_offstation_roles && !(antag.flags & ANTAG_OVERRIDE_JOB))
+ continue
if(player in antag.current_antagonists)
return 1
if(player in antag.pending_antagonists)
diff --git a/code/game/antagonist/antagonist_add.dm b/code/game/antagonist/antagonist_add.dm
index e3c653a4e5..c16ea0a7c9 100644
--- a/code/game/antagonist/antagonist_add.dm
+++ b/code/game/antagonist/antagonist_add.dm
@@ -10,7 +10,8 @@
current_antagonists |= player
if(flags & ANTAG_OVERRIDE_JOB)
- player.assigned_role = "MODE"
+ player.assigned_role = role_text
+ player.special_role = role_text
if(istype(player.current, /mob/dead))
create_default(player.current)
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index c38b30dea8..e8962eb294 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -470,7 +470,7 @@ var/global/list/additional_antag_types = list()
suspects += man
for(var/mob/M in suspects)
- if(player_is_antag(M.mind))
+ if(player_is_antag(M.mind, only_offstation_roles = 1))
continue
switch(rand(1, 100))
if(1 to 50)
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 55f7ccce4f..7a27f4f7c5 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -288,7 +288,7 @@ var/global/datum/controller/gameticker/ticker
if(player && player.mind && player.mind.assigned_role)
if(player.mind.assigned_role == "Captain")
captainless=0
- if(!player_is_antag(player.mind))
+ if(!player_is_antag(player.mind, only_offstation_roles = 1))
job_master.EquipRank(player, player.mind.assigned_role, 0)
UpdateFactionList(player)
equip_custom_items(player)
diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm
index 2ee0fe7d91..cf54a37db2 100644
--- a/code/game/gamemodes/intercept_report.dm
+++ b/code/game/gamemodes/intercept_report.dm
@@ -88,29 +88,6 @@
else
return null
-// NOTE: Commentted out was the code which showed the chance of someone being an antag. If you want to re-add it, just uncomment the code.
-
-/*
-/datum/intercept_text/proc/pick_mob()
- var/list/dudes = list()
- for(var/mob/living/carbon/human/man in player_list)
- if (!man.mind) continue
- if (man.mind.assigned_role=="MODE") continue
- dudes += man
- if(dudes.len==0)
- return null
- return pick(dudes)
-
-
-/datum/intercept_text/proc/pick_fingerprints()
- var/mob/living/carbon/human/dude = src.pick_mob()
- //if (!dude) return pick_fingerprints() //who coded that is totally crasy or just a traitor. -- rastaf0
- if(dude)
- return num2text(md5(dude.dna.uni_identity))
- else
- return num2text(md5(num2text(rand(1,10000))))
-*/
-
/datum/intercept_text/proc/get_suspect()
var/list/dudes = list()
for(var/mob/living/carbon/human/man in player_list) if(man.client && man.client.prefs.nanotrasen_relation == "Opposed")
@@ -205,32 +182,6 @@
var/cname = pick(src.changeling_names)
var/orgname1 = pick(src.org_names_1)
var/orgname2 = pick(src.org_names_2)
- /*
- var/changeling_name
- var/changeling_job
- var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
- var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher)
- if(prob(prob_right_job))
- if(correct_person)
- if(correct_person:assigned_role=="MODE")
- changeling_job = pick(joblist)
- else
- changeling_job = correct_person:assigned_role
- else
- changeling_job = pick(joblist)
- if(prob(prob_right_dude) && ticker.mode == "changeling")
- if(correct_person:assigned_role=="MODE")
- changeling_name = correct_person:current
- else
- changeling_name = src.pick_mob()
- else
- changeling_name = src.pick_mob()
- */
-
src.text += "
We have received a report that a dangerous alien lifeform known only as \"[cname]\" may have infiltrated your crew. "
- /*
- src.text += "Our intelligence suggests a [prob_right_job]% chance that a [changeling_job] on board your station has been replaced by the alien. "
- src.text += "Additionally, the report indicates a [prob_right_dude]% chance that [changeling_name] may have been in contact with the lifeform at a recent social gathering. "
- */
src.text += "These lifeforms are assosciated with the [orgname1] [orgname2] and may be attempting to acquire sensitive materials on their behalf. "
src.text += "Please take care not to alarm the crew, as [cname] may take advantage of a panic situation. Remember, they can be anybody, suspect everybody!"
diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm
index afc576ed4f..030dad6d3f 100644
--- a/code/game/verbs/suicide.dm
+++ b/code/game/verbs/suicide.dm
@@ -11,15 +11,7 @@
src << "You can't commit suicide before the game starts!"
return
-
- var/permitted = 0
- var/list/allowed = list("Syndicate","traitor","Wizard","Head Revolutionary","Cultist","Changeling")
- for(var/T in allowed)
- if(mind.special_role == T)
- permitted = 1
- break
-
- if(!permitted)
+ if(!player_is_antag(mind))
message_admins("[ckey] has tried to suicide, but they were not permitted due to not being antagonist as human.", 1)
src << "No. Adminhelp if there is a legitimate reason."
return
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index a10481aa83..e1ce028c13 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -441,7 +441,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Announces the character on all the systems, based on the record.
if(!issilicon(new_character))//If they are not a cyborg/AI.
- if(!record_found && !player_is_antag(new_character.mind)) //If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
+ if(!record_found && !player_is_antag(new_character.mind, only_offstation_roles = 1)) //If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
//Power to the user!
if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
data_core.manifest_inject(new_character)
diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm
index 871984f79b..68567edc3c 100644
--- a/code/modules/events/ion_storm.dm
+++ b/code/modules/events/ion_storm.dm
@@ -8,7 +8,7 @@
endWhen = rand(500, 1500)
// command_alert("The station has entered an ion storm. Monitor all electronic equipment for malfunctions", "Anomaly Alert")
for (var/mob/living/carbon/human/player in player_list)
- if( !player.mind || player_is_antag(player.mind) || player.client.inactivity > MinutesToTicks(10))
+ if( !player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > MinutesToTicks(10))
continue
players += player.real_name