From 7bb9ca6ec2485ad15e3a2e24e38a0377b58a3bea Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Mon, 13 Jul 2015 17:15:10 +0930 Subject: [PATCH] Fixes #10129 --- code/datums/datacore.dm | 2 +- code/datums/mind.dm | 2 +- code/game/antagonist/_antagonist_setup.dm | 2 ++ code/game/antagonist/antagonist_print.dm | 2 +- code/game/antagonist/outsider/raider.dm | 18 +++++++++--------- code/game/gamemodes/game_mode.dm | 2 +- code/game/gamemodes/gameticker.dm | 2 +- code/game/gamemodes/objective.dm | 2 +- code/game/jobs/job_controller.dm | 1 - code/modules/admin/verbs/randomverbs.dm | 2 +- code/modules/events/ion_storm.dm | 2 +- 11 files changed, 19 insertions(+), 18 deletions(-) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 8bc6cc0580c..8fcbc85dd8a 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 && (H.mind.assigned_role != "MODE")) + if(H.mind && !player_is_antag(H.mind)) 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 0e7e42d1523..7a5713749d9 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -223,7 +223,7 @@ 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 [new_target:mind:assigned_role=="MODE" ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]." + 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)]." 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 ecfe15a2372..f1079379131 100644 --- a/code/game/antagonist/_antagonist_setup.dm +++ b/code/game/antagonist/_antagonist_setup.dm @@ -76,4 +76,6 @@ var/global/list/antag_names_to_ids = list() var/datum/antagonist/antag = all_antag_types[antag_type] if(player in antag.current_antagonists) return 1 + if(player in antag.pending_antagonists) + return 1 return 0 diff --git a/code/game/antagonist/antagonist_print.dm b/code/game/antagonist/antagonist_print.dm index e56017691b9..90d61ddbb04 100644 --- a/code/game/antagonist/antagonist_print.dm +++ b/code/game/antagonist/antagonist_print.dm @@ -47,7 +47,7 @@ return text /datum/antagonist/proc/print_player_lite(var/datum/mind/ply) - var/role = ply.assigned_role == "MODE" ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]" + var/role = ply.special_role ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]" var/text = "
[ply.name] ([ply.key]) as \a [role] (" if(ply.current) if(ply.current.stat == DEAD) diff --git a/code/game/antagonist/outsider/raider.dm b/code/game/antagonist/outsider/raider.dm index b6adfb82f11..95335de7d9a 100644 --- a/code/game/antagonist/outsider/raider.dm +++ b/code/game/antagonist/outsider/raider.dm @@ -9,8 +9,8 @@ var/datum/antagonist/raider/raiders landmark_id = "voxstart" welcome_text = "Use :H to talk on your encrypted channel." flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE | ANTAG_HAS_LEADER - max_antags = 6 - max_antags_round = 10 + max_antags = 1 + max_antags_round = 1 id_type = /obj/item/weapon/card/id/syndicate // Heist overrides check_victory() and doesn't need victory or loss strings/tags. @@ -86,7 +86,7 @@ var/datum/antagonist/raider/raiders /obj/item/weapon/gun/projectile/revolver, /obj/item/weapon/gun/projectile/pirate ) - + var/list/raider_holster = list( /obj/item/clothing/accessory/holster/armpit, /obj/item/clothing/accessory/holster/waist, @@ -207,7 +207,7 @@ var/datum/antagonist/raider/raiders //If equipping shoes failed, fall back to equipping sandals var/fallback_type = pick(/obj/item/clothing/shoes/sandal, /obj/item/clothing/shoes/jackboots/unathi) player.equip_to_slot_or_del(new fallback_type(player), slot_shoes) - + player.equip_to_slot_or_del(new new_uniform(player),slot_w_uniform) player.equip_to_slot_or_del(new new_glasses(player),slot_glasses) player.equip_to_slot_or_del(new new_helmet(player),slot_head) @@ -229,10 +229,10 @@ var/datum/antagonist/raider/raiders var/new_gun = pick(raider_guns) var/new_holster = pick(raider_holster) //raiders don't start with any backpacks, so let's be nice and give them a holster if they can use it. var/turf/T = get_turf(player) - + var/obj/item/primary = new new_gun(T) var/obj/item/clothing/accessory/holster/holster = null - + //Give some of the raiders a pirate gun as a secondary if(prob(60)) var/obj/item/secondary = new /obj/item/weapon/gun/projectile/pirate(T) @@ -242,7 +242,7 @@ var/datum/antagonist/raider/raiders secondary.loc = holster else player.equip_to_slot_or_del(secondary, slot_belt) - + if(primary.slot_flags & SLOT_HOLSTER) holster = new new_holster(T) holster.holstered = primary @@ -253,10 +253,10 @@ var/datum/antagonist/raider/raiders player.equip_to_slot_or_del(primary, slot_back) else player.put_in_any_hand_if_possible(primary) - + //If they got a projectile gun, give them a little bit of spare ammo equip_ammo(player, primary) - + if(holster) var/obj/item/clothing/under/uniform = player.w_uniform if(istype(uniform) && uniform.can_attach_accessory(holster)) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index eaa7e67e5fa..c38b30dea8f 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(M.mind.assigned_role == "MODE") + if(player_is_antag(M.mind)) continue switch(rand(1, 100)) if(1 to 50) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 0b1f24121a7..55f7ccce4f8 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.mind.assigned_role != "MODE") + if(!player_is_antag(player.mind)) job_master.EquipRank(player, player.mind.assigned_role, 0) UpdateFactionList(player) equip_custom_items(player) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 0ad6e7fc5fb..16d50cee4d0 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -703,7 +703,7 @@ datum/objective/heist/kidnap var/list/priority_targets = list() for(var/datum/mind/possible_target in ticker.minds) - if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (possible_target.assigned_role != "MODE")) + if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (!possible_target.special_role)) possible_targets += possible_target for(var/role in roles) if(possible_target.assigned_role == role) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index b83da181b9e..447e82d3b64 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -348,7 +348,6 @@ var/global/datum/controller/occupations/job_master proc/EquipRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0) - if(!H) return null var/datum/job/job = GetJob(rank) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 918bd78055e..a10481aa83f 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&&new_character.mind.assigned_role!="MODE")//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)) //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 8241190d68a..871984f79b4 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.mind.assigned_role == "MODE" || player.client.inactivity > MinutesToTicks(10)) + if( !player.mind || player_is_antag(player.mind) || player.client.inactivity > MinutesToTicks(10)) continue players += player.real_name