From 69b4651d81681c52d88956c7b56d469e8b4e8fbf Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 13 Dec 2021 11:40:07 +0100 Subject: [PATCH] [MIRROR] fugitives now poll for a fugitive role, instead of being based on traitors [MDB IGNORE] (#10051) * fugitives now poll for a fugitive role, instead of being based on traitors (#63339) Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> * fugitives now poll for a fugitive role, instead of being based on traitors Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> --- code/__DEFINES/role_preferences.dm | 5 ++-- code/modules/antagonists/fugitive/fugitive.dm | 25 +++++++++++++++++++ .../antagonists/fugitive/fugitive_outfits.dm | 7 ++++-- .../client/preferences/middleware/antags.dm | 1 + code/modules/events/fugitive_spawning.dm | 2 +- .../antagonists/antagonists/fugitive.ts | 16 ++++++++++++ 6 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/fugitive.ts diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index a691bc779bd..1f899547ed8 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -25,13 +25,14 @@ #define ROLE_BLOB "Blob" #define ROLE_BLOB_INFECTION "Blob Infection" #define ROLE_FAMILY_HEAD_ASPIRANT "Family Head Aspirant" +#define ROLE_FUGITIVE "Fugitive" #define ROLE_LONE_OPERATIVE "Lone Operative" #define ROLE_MALF_MIDROUND "Malf AI (Midround)" #define ROLE_NIGHTMARE "Nightmare" #define ROLE_NINJA "Space Ninja" -#define ROLE_REV_HEAD "Head Revolutionary" #define ROLE_OBSESSED "Obsessed" #define ROLE_OPERATIVE_MIDROUND "Operative (Midround)" +#define ROLE_REV_HEAD "Head Revolutionary" #define ROLE_SENTIENT_DISEASE "Sentient Disease" #define ROLE_SLEEPER_AGENT "Syndicate Sleeper Agent" #define ROLE_SPACE_DRAGON "Space Dragon" @@ -73,7 +74,6 @@ #define ROLE_SLAUGHTER_DEMON "Slaughter Demon" #define ROLE_MORPH "Morph" #define ROLE_SANTA "Santa" -#define ROLE_FUGITIVE "Fugitive" //Spawner roles #define ROLE_GHOST_ROLE "Ghost Role" @@ -124,6 +124,7 @@ GLOBAL_LIST_INIT(special_roles, list( ROLE_BLOB = 0, ROLE_BLOB_INFECTION = 0, ROLE_FAMILY_HEAD_ASPIRANT = 0, + ROLE_FUGITIVE = 0, ROLE_LONE_OPERATIVE = 14, ROLE_MALF_MIDROUND = 0, ROLE_NIGHTMARE = 0, diff --git a/code/modules/antagonists/fugitive/fugitive.dm b/code/modules/antagonists/fugitive/fugitive.dm index 2c535e47711..ed3a8b74618 100644 --- a/code/modules/antagonists/fugitive/fugitive.dm +++ b/code/modules/antagonists/fugitive/fugitive.dm @@ -2,15 +2,40 @@ /datum/antagonist/fugitive name = "Fugitive" roundend_category = "Fugitive" + job_rank = ROLE_FUGITIVE silent = TRUE //greet called by the event show_in_antagpanel = FALSE prevent_roundtype_conversion = FALSE antag_hud_name = "fugitive" suicide_cry = "FOR FREEDOM!!" + preview_outfit = /datum/outfit/prisoner var/datum/team/fugitive/fugitive_team var/is_captured = FALSE var/backstory = "error" +/datum/antagonist/fugitive/get_preview_icon() + //start with prisoner at the front + var/icon/final_icon = render_preview_outfit(preview_outfit) + + //then to the left add cultists of yalp elor + final_icon.Blend(make_background_fugitive_icon(/datum/outfit/yalp_cultist), ICON_UNDERLAY, -8, 0) + //to the right add waldo (we just had to, okay?) + final_icon.Blend(make_background_fugitive_icon(/datum/outfit/waldo), ICON_UNDERLAY, 8, 0) + + final_icon.Scale(64, 64) + + return finish_preview_icon(final_icon) + +/datum/antagonist/fugitive/proc/make_background_fugitive_icon(datum/outfit/fugitive_fit) + var/mob/living/carbon/human/dummy/consistent/fugitive = new + + var/icon/fugitive_icon = render_preview_outfit(fugitive_fit, fugitive) + fugitive_icon.ChangeOpacity(0.5) + qdel(fugitive) + + return fugitive_icon + + /datum/antagonist/fugitive/on_gain() forge_objectives() . = ..() diff --git a/code/modules/antagonists/fugitive/fugitive_outfits.dm b/code/modules/antagonists/fugitive/fugitive_outfits.dm index c4cae966838..6a8aec586ba 100644 --- a/code/modules/antagonists/fugitive/fugitive_outfits.dm +++ b/code/modules/antagonists/fugitive/fugitive_outfits.dm @@ -4,10 +4,13 @@ shoes = /obj/item/clothing/shoes/sneakers/orange r_pocket = /obj/item/knife/shiv -/datum/outfit/prisoner/post_equip(mob/living/carbon/human/H, visualsOnly=FALSE) +/datum/outfit/prisoner/post_equip(mob/living/carbon/human/prisoner, visualsOnly=FALSE) + // This outfit is used by the assets SS, which is ran before the atoms SS + if(SSatoms.initialized == INITIALIZATION_INSSATOMS) + prisoner.w_uniform?.update_greyscale() if(visualsOnly) return - H.fully_replace_character_name(null,"NTP #CC-0[rand(111,999)]") //same as the lavaland prisoner transport, but this time they are from CC, or CentCom + prisoner.fully_replace_character_name(null,"NTP #CC-0[rand(111,999)]") //same as the lavaland prisoner transport, but this time they are from CC, or CentCom /datum/outfit/yalp_cultist name = "Cultist of Yalp Elor" diff --git a/code/modules/client/preferences/middleware/antags.dm b/code/modules/client/preferences/middleware/antags.dm index 1e5bf6e0054..37a0f7eb471 100644 --- a/code/modules/client/preferences/middleware/antags.dm +++ b/code/modules/client/preferences/middleware/antags.dm @@ -112,6 +112,7 @@ /datum/asset/spritesheet/antagonists/register() // Antagonists that don't have a dynamic ruleset, but do have a preference var/static/list/non_ruleset_antagonists = list( + ROLE_FUGITIVE = /datum/antagonist/fugitive, ROLE_LONE_OPERATIVE = /datum/antagonist/nukeop/lone, ) diff --git a/code/modules/events/fugitive_spawning.dm b/code/modules/events/fugitive_spawning.dm index e20cd0cd749..fb6abf53c16 100644 --- a/code/modules/events/fugitive_spawning.dm +++ b/code/modules/events/fugitive_spawning.dm @@ -20,7 +20,7 @@ return MAP_ERROR var/turf/landing_turf = pick(possible_spawns) var/list/possible_backstories = list() - var/list/candidates = get_candidates(ROLE_TRAITOR, ROLE_TRAITOR) + var/list/candidates = get_candidates(ROLE_FUGITIVE, ROLE_FUGITIVE) if(candidates.len >= 1) //solo refugees if(prob(30)) possible_backstories.Add("waldo") //less common as it comes with magicks and is kind of immershun shattering diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/fugitive.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/fugitive.ts new file mode 100644 index 00000000000..23785c30544 --- /dev/null +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/fugitive.ts @@ -0,0 +1,16 @@ +import { Antagonist, Category } from "../base"; +import { multiline } from "common/string"; + +const Fugitive: Antagonist = { + key: "fugitive", + name: "Fugitive", + description: [ + multiline` + Wherever you come from, you're being hunted. You have 10 minutes to prepare + before fugitive hunters arrive and start hunting you and your friends down! + `, + ], + category: Category.Midround, +}; + +export default Fugitive;