From 91792b09c167917663dddea9b61ee1a90c59f895 Mon Sep 17 00:00:00 2001 From: datlo Date: Sat, 16 Feb 2019 15:09:25 +0000 Subject: [PATCH] Prevent objectives from targetting offstation roles also remove nukie flavor text and prevent golem targetting --- code/__DEFINES/gamemode.dm | 2 ++ code/datums/mind.dm | 1 + code/game/gamemodes/heist/heist.dm | 1 + .../gamemodes/miniantags/abduction/abduction.dm | 2 ++ code/game/gamemodes/nuclear/nuclear.dm | 2 ++ code/game/gamemodes/objective.dm | 5 +++++ code/game/jobs/job/central.dm | 14 +++++++++++++- code/game/jobs/job/syndicate.dm | 1 + code/modules/admin/verbs/gimmick_team.dm | 1 + code/modules/admin/verbs/honksquad.dm | 1 + .../admin/verbs/infiltratorteam_syndicate.dm | 1 + code/modules/admin/verbs/one_click_antag.dm | 2 +- code/modules/admin/verbs/striketeam.dm | 1 + code/modules/admin/verbs/striketeam_syndicate.dm | 1 + code/modules/events/traders.dm | 1 + 15 files changed, 34 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/gamemode.dm b/code/__DEFINES/gamemode.dm index b1186ce1e0d..83e7be22e84 100644 --- a/code/__DEFINES/gamemode.dm +++ b/code/__DEFINES/gamemode.dm @@ -4,6 +4,8 @@ #define TARGET_INVALID_DEAD 3 #define TARGET_INVALID_NOCKEY 4 #define TARGET_INVALID_UNREACHABLE 5 +#define TARGET_INVALID_GOLEM 6 +#define TARGET_INVALID_EVENT 7 //gamemode istype helpers #define GAMEMODE_IS_BLOB (ticker && istype(ticker.mode, /datum/game_mode/blob)) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 0e826d2da17..9774d56e23e 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -30,6 +30,7 @@ var/assigned_role //assigned role is what job you're assigned to when you join the station. var/special_role //special roles are typically reserved for antags or roles like ERT. If you want to avoid a character being automatically announced by the AI, on arrival (becuase they're an off station character or something); ensure that special_role and assigned_role are equal. + var/offstation_role = FALSE //set to true for ERT, deathsquad, abductors, etc, that can go from and to z2 at will and shouldn't be antag targets var/list/restricted_roles = list() var/list/spell_list = list() // Wizard mode & "Give Spell" badmin button. diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm index 4cbe909ef84..e8a3ff6c981 100644 --- a/code/game/gamemodes/heist/heist.dm +++ b/code/game/gamemodes/heist/heist.dm @@ -53,6 +53,7 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind' for(var/datum/mind/raider in raiders) raider.assigned_role = SPECIAL_ROLE_RAIDER raider.special_role = SPECIAL_ROLE_RAIDER + raider.offstation_role = TRUE ..() return 1 diff --git a/code/game/gamemodes/miniantags/abduction/abduction.dm b/code/game/gamemodes/miniantags/abduction/abduction.dm index 38f01278fe9..587c2b3d476 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction.dm @@ -76,10 +76,12 @@ scientist.assigned_role = SPECIAL_ROLE_ABDUCTOR_SCIENTIST scientist.special_role = SPECIAL_ROLE_ABDUCTOR_SCIENTIST + scientist.offstation_role = TRUE log_game("[key_name(scientist)] has been selected as an abductor team [team_number] scientist.") agent.assigned_role = SPECIAL_ROLE_ABDUCTOR_AGENT agent.special_role = SPECIAL_ROLE_ABDUCTOR_AGENT + agent.offstation_role = TRUE log_game("[key_name(agent)] has been selected as an abductor team [team_number] agent.") abductors |= agent diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 195629197c5..95849d31f65 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -54,6 +54,7 @@ proc/issyndicate(mob/living/M as mob) for(var/datum/mind/synd_mind in syndicates) synd_mind.assigned_role = SPECIAL_ROLE_NUKEOPS //So they aren't chosen for other jobs. synd_mind.special_role = SPECIAL_ROLE_NUKEOPS + synd_mind.offstation_role = TRUE return 1 @@ -172,6 +173,7 @@ proc/issyndicate(mob/living/M as mob) M.dna.species.create_organs(M) M.cleanSE() //No fat/blind/colourblind/epileptic/whatever ops. M.overeatduration = 0 + M.flavor_text = null var/obj/item/organ/external/head/head_organ = M.get_organ("head") var/hair_c = pick("#8B4513","#000000","#FF4500","#FFD700") // Brown, black, red, blonde diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index aa19a52fa42..0f59f234d49 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -35,6 +35,11 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu var/turf/current_location = get_turf(possible_target.current) if(current_location && !is_level_reachable(current_location.z)) return TARGET_INVALID_UNREACHABLE + if(isgolem(possible_target.current)) + return TARGET_INVALID_GOLEM + if(possible_target.offstation_role) + return TARGET_INVALID_EVENT + /datum/objective/proc/find_target() var/list/possible_targets = list() diff --git a/code/game/jobs/job/central.dm b/code/game/jobs/job/central.dm index 6f6ea6ca67a..1d6ae0162a2 100644 --- a/code/game/jobs/job/central.dm +++ b/code/game/jobs/job/central.dm @@ -39,6 +39,12 @@ /obj/item/organ/internal/cyberimp/chest/nutriment/plus ) +/datum/outfit/job/ntnavyofficer/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + . = ..() + if(visualsOnly) + return + H.mind.offstation_role = TRUE + // CC Officials who lead ERTs, Death Squads, etc. /datum/job/ntspecops title = "Special Operations Officer" @@ -88,4 +94,10 @@ /obj/item/organ/internal/cyberimp/brain/anti_stun, /obj/item/organ/internal/cyberimp/chest/nutriment/plus, /obj/item/organ/internal/cyberimp/arm/combat/centcom - ) \ No newline at end of file + ) + +/datum/outfit/job/ntspecops/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + . = ..() + if(visualsOnly) + return + H.mind.offstation_role = TRUE \ No newline at end of file diff --git a/code/game/jobs/job/syndicate.dm b/code/game/jobs/job/syndicate.dm index 6ef2c013806..b5757ffe37c 100644 --- a/code/game/jobs/job/syndicate.dm +++ b/code/game/jobs/job/syndicate.dm @@ -53,5 +53,6 @@ H.faction += "syndicate" var/datum/atom_hud/antag/opshud = huds[ANTAG_HUD_OPS] opshud.join_hud(H.mind.current) + H.mind.offstation_role = TRUE set_antag_hud(H.mind.current, "hudoperative") H.regenerate_icons() \ No newline at end of file diff --git a/code/modules/admin/verbs/gimmick_team.dm b/code/modules/admin/verbs/gimmick_team.dm index 9790a073401..081c820aaee 100644 --- a/code/modules/admin/verbs/gimmick_team.dm +++ b/code/modules/admin/verbs/gimmick_team.dm @@ -72,6 +72,7 @@ H.mind_initialize() H.mind.assigned_role = "Event Character" H.mind.special_role = "Event Character" + H.mind.offstation_role = TRUE H.key = thisplayer.key diff --git a/code/modules/admin/verbs/honksquad.dm b/code/modules/admin/verbs/honksquad.dm index 9636d311ddc..b4c0e6a05eb 100644 --- a/code/modules/admin/verbs/honksquad.dm +++ b/code/modules/admin/verbs/honksquad.dm @@ -93,6 +93,7 @@ var/global/sent_honksquad = 0 new_honksquad.mind_initialize() new_honksquad.mind.assigned_role = SPECIAL_ROLE_HONKSQUAD new_honksquad.mind.special_role = SPECIAL_ROLE_HONKSQUAD + new_honksquad.mind.offstation_role = TRUE new_honksquad.add_language("Clownish") ticker.mode.traitors |= new_honksquad.mind//Adds them to current traitor list. Which is really the extra antagonist list. new_honksquad.equip_honksquad(honk_leader_selected) diff --git a/code/modules/admin/verbs/infiltratorteam_syndicate.dm b/code/modules/admin/verbs/infiltratorteam_syndicate.dm index 346652c13cb..551076be62a 100644 --- a/code/modules/admin/verbs/infiltratorteam_syndicate.dm +++ b/code/modules/admin/verbs/infiltratorteam_syndicate.dm @@ -131,6 +131,7 @@ var/global/sent_syndicate_infiltration_team = 0 new_syndicate_infiltrator.mind_initialize() new_syndicate_infiltrator.mind.assigned_role = "Syndicate Infiltrator" new_syndicate_infiltrator.mind.special_role = "Syndicate Infiltrator" + new_syndicate_infiltrator.mind.offstation_role = TRUE //they can flee to z2 so make them inelligible as antag targets ticker.mode.traitors |= new_syndicate_infiltrator.mind //Adds them to extra antag list new_syndicate_infiltrator.equip_syndicate_infiltrator(syndicate_leader_selected, uplink_tc, is_mgmt) return new_syndicate_infiltrator diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 2133fbb26b2..4b3905f37e2 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -415,7 +415,7 @@ client/proc/one_click_antag() new_syndicate_commando.mind_initialize() new_syndicate_commando.mind.assigned_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD new_syndicate_commando.mind.special_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD - + new_syndicate_commando.mind.offstation_role = TRUE //Adds them to current traitor list. Which is really the extra antagonist list. ticker.mode.traitors += new_syndicate_commando.mind new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index e745f532af8..a23e6eea69c 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -85,6 +85,7 @@ var/global/sent_strike_team = 0 R.mind.original = R R.mind.assigned_role = SPECIAL_ROLE_DEATHSQUAD R.mind.special_role = SPECIAL_ROLE_DEATHSQUAD + R.mind.offstation_role = TRUE if(!(R.mind in ticker.minds)) ticker.minds += R.mind ticker.mode.traitors += R.mind diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 886315e465f..bf20d2b5503 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -116,6 +116,7 @@ var/global/sent_syndicate_strike_team = 0 new_syndicate_commando.mind_initialize() new_syndicate_commando.mind.assigned_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD new_syndicate_commando.mind.special_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD + new_syndicate_commando.mind.offstation_role = TRUE ticker.mode.traitors |= new_syndicate_commando.mind //Adds them to current traitor list. Which is really the extra antagonist list. new_syndicate_commando.equip_syndicate_commando(is_leader) qdel(spawn_location) diff --git a/code/modules/events/traders.dm b/code/modules/events/traders.dm index 2b49bd51bfc..04663f93152 100644 --- a/code/modules/events/traders.dm +++ b/code/modules/events/traders.dm @@ -47,6 +47,7 @@ var/global/list/unused_trade_stations = list("sol") M.equipOutfit(/datum/outfit/admin/sol_trader) M.dna.species.after_equip_job(null, M) M.mind.objectives += trader_objectives + M.mind.offstation_role = TRUE greet_trader(M) success_spawn = 1 if(success_spawn)