From c33c7fff9d958974f8fd35edb96f93fa4c5023e9 Mon Sep 17 00:00:00 2001 From: tralezab Date: Mon, 27 May 2019 08:48:03 -0700 Subject: [PATCH] begone, badcode! --- .../game/objects/structures/fugitive_role_spawners.dm | 11 +++++++---- code/modules/antagonists/fugitive/hunter.dm | 4 ++-- code/modules/events/fugitive_spawning.dm | 9 +-------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/code/game/objects/structures/fugitive_role_spawners.dm b/code/game/objects/structures/fugitive_role_spawners.dm index 6d666b607a8..594a8644cdb 100644 --- a/code/game/objects/structures/fugitive_role_spawners.dm +++ b/code/game/objects/structures/fugitive_role_spawners.dm @@ -8,6 +8,7 @@ random = TRUE show_flavour = FALSE density = TRUE + var/back_story = "error" /obj/effect/mob_spawn/human/fugitive/Initialize(mapload) . = ..() @@ -15,8 +16,8 @@ /obj/effect/mob_spawn/human/fugitive/special(mob/living/new_spawn) var/datum/antagonist/fugitive_hunter/fughunter = new_spawn.mind.add_antag_datum(/datum/antagonist/fugitive_hunter) - fughunter.backstory = flavour_text - fughunter.greet(flavour_text) + fughunter.backstory = back_story + fughunter.greet() message_admins("[ADMIN_LOOKUPFLW(new_spawn)] has been made into a Fugitive Hunter by an event.") log_game("[key_name(new_spawn)] was spawned as a Fugitive Hunter by an event.") @@ -24,14 +25,16 @@ name = "police pod" desc = "A small sleeper typically used to put people to sleep for briefing on the mission." mob_name = "a spacepol officer" - flavour_text = "space cop" + flavour_text = "Justice has arrived. I am a member of the Spacepol!" + back_story = "space cop" outfit = /datum/outfit/spacepol icon = 'icons/obj/machines/sleeper.dmi' icon_state = "sleeper" /obj/effect/mob_spawn/human/fugitive/russian name = "russian pod" - flavour_text = "russian" + flavour_text = "Ay blyat. I am a space-russian smuggler! We were mid-flight when our cargo was beamed off our ship!" + back_story = "russian" desc = "A small sleeper typically used to make long distance travel a bit more bearable." mob_name = "russian" outfit = /datum/outfit/russiancorpse diff --git a/code/modules/antagonists/fugitive/hunter.dm b/code/modules/antagonists/fugitive/hunter.dm index 23de600d5f9..1fda5d06188 100644 --- a/code/modules/antagonists/fugitive/hunter.dm +++ b/code/modules/antagonists/fugitive/hunter.dm @@ -2,7 +2,7 @@ /datum/antagonist/fugitive_hunter name = "Fugitive Hunter" roundend_category = "Fugitive" - silent = TRUE //greet called by the event as well + silent = TRUE //greet called by the spawn var/datum/team/fugitive_hunters/hunter_team var/backstory = "error" @@ -24,7 +24,7 @@ capture.explanation_text = "Capture the fugitives in the station and put them into the bluespace capture machine on your ship." objectives += capture -/datum/antagonist/fugitive_hunter/greet(backstory) +/datum/antagonist/fugitive_hunter/greet() switch(backstory) if("space cop") to_chat(owner, "Justice has arrived. I am a member of the Spacepol!") diff --git a/code/modules/events/fugitive_spawning.dm b/code/modules/events/fugitive_spawning.dm index 935c6ea7486..993d49bca46 100644 --- a/code/modules/events/fugitive_spawning.dm +++ b/code/modules/events/fugitive_spawning.dm @@ -14,7 +14,7 @@ /datum/round_event/ghost_role/fugitives/spawn_role() var/list/possible_spawns = list()//Some xeno spawns are in some spots that will instantly kill the refugees, like atmos for(var/turf/X in GLOB.xeno_spawn) - if(istype(X, /area/maintenance)) + if(istype(X.loc, /area/maintenance)) possible_spawns += X if(!possible_spawns.len) message_admins("No valid spawn locations found, aborting...") @@ -117,10 +117,3 @@ if(!ship.load(T)) CRASH("Loading hunter ship failed!") priority_announce("Unidentified armed ship detected near the station.") - for(var/turf/A in ship.get_affected_turfs(T)) - for(var/obj/structure/chair/chair in A) //every chair gets a spawner on it. - switch(backstory) - if("space cop") - new /obj/effect/mob_spawn/human/fugitive/spacepol(get_turf(chair)) - if("russian") - new /obj/effect/mob_spawn/human/fugitive/russian(get_turf(chair))