From efe6dc810e2fc1ff2724cde944f745e32759a958 Mon Sep 17 00:00:00 2001 From: Tourte-Yaya <50141998+Tourte-Yaya@users.noreply.github.com> Date: Wed, 13 Sep 2023 22:12:26 +0200 Subject: [PATCH] Makes admin outfits set offstation_role to true and give syndicate factions to SIT and SST. (#22169) * Update outfit_admin.dm * add trailing newline * GDN suggestion * Update code/datums/outfits/outfit_admin.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/datums/outfits/outfit_admin.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/datums/outfits/outfit_admin.dm Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com> * Contrabang suggestion * Update code/modules/mob/living/carbon/human/human_mob.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/modules/mob/living/carbon/human/human_mob.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --------- Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --- code/__DEFINES/dcs/signals.dm | 2 ++ code/datums/outfits/outfit_admin.dm | 24 +++++++++++++------ .../mob/living/carbon/human/human_login.dm | 1 + .../mob/living/carbon/human/human_mob.dm | 4 ++++ 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 5e761f64eef..541d89f293e 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -311,6 +311,8 @@ ///from base of /mob/Login(): () #define COMSIG_MOB_LOGIN "mob_login" +///called in human/login +#define COMSIG_HUMAN_LOGIN "human_login" ///from base of /mob/Logout(): () #define COMSIG_MOB_LOGOUT "mob_logout" ///from base of mob/death(): (gibbed) diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm index 88e63e9539c..7d69c82ae3b 100644 --- a/code/datums/outfits/outfit_admin.dm +++ b/code/datums/outfits/outfit_admin.dm @@ -7,6 +7,17 @@ H.mind.assigned_role = name H.job = name +/datum/outfit/admin/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + . = ..() + + if(visualsOnly) + return + + if(H.mind) + H.mind.offstation_role = TRUE + else + H.RegisterSignal(H, COMSIG_HUMAN_LOGIN, TYPE_PROC_REF(/mob/living/carbon/human, apply_offstation_roles)) + /proc/apply_to_card(obj/item/card/id/I, mob/living/carbon/human/H, list/access = list(), rank, special_icon) if(!istype(I) || !istype(H)) @@ -71,7 +82,7 @@ /datum/outfit/admin/syndicate_infiltrator/equip(mob/living/carbon/human/H, visualsOnly = FALSE) . = H.equip_syndicate_infiltrator(0, 20, FALSE) H.sec_hud_set_ID() - + H.faction |= "syndicate" /datum/outfit/admin/syndicate/operative name = "Syndicate Nuclear Operative" @@ -115,8 +126,8 @@ name = "Syndicate Strike Team" /datum/outfit/admin/syndicate_strike_team/equip(mob/living/carbon/human/H, visualsOnly = FALSE) - return H.equip_syndicate_commando(FALSE, TRUE) - + . = H.equip_syndicate_commando(FALSE, TRUE) + H.faction |= "syndicate" /datum/outfit/admin/syndicate/spy name = "Syndicate Spy" @@ -975,7 +986,7 @@ name = "Tournament Standard Green" uniform = /obj/item/clothing/under/color/green -/datum/outfit/admin/tournament_gangster //gangster are supposed to fight each other. --rastaf0 +/datum/outfit/admin/tournament/tournament_gangster //gangster are supposed to fight each other. --rastaf0 name = "Tournament Gangster" uniform = /obj/item/clothing/under/rank/security/detective @@ -986,7 +997,7 @@ l_pocket = /obj/item/ammo_box/a357 r_hand = /obj/item/gun/projectile/automatic/proto -/datum/outfit/admin/tournament_chef //Steven Seagal FTW +/datum/outfit/admin/tournament/tournament_chef //Steven Seagal FTW name = "Tournament Chef" uniform = /obj/item/clothing/under/rank/civilian/chef @@ -998,7 +1009,7 @@ l_hand = /obj/item/kitchen/knife r_hand = /obj/item/kitchen/rollingpin -/datum/outfit/admin/tournament_janitor +/datum/outfit/admin/tournament/tournament_janitor name = "Tournament Janitor" uniform = /obj/item/clothing/under/rank/civilian/janitor @@ -1178,7 +1189,6 @@ var/datum/antagonist/vampire/V = H.mind.has_antag_datum(/datum/antagonist/vampire) V.bloodusable = 9999 V.bloodtotal = 9999 - H.mind.offstation_role = TRUE V.add_subclass(SUBCLASS_ANCIENT, FALSE) H.dna.SetSEState(GLOB.jumpblock, TRUE) singlemutcheck(H, GLOB.jumpblock, MUTCHK_FORCED) diff --git a/code/modules/mob/living/carbon/human/human_login.dm b/code/modules/mob/living/carbon/human/human_login.dm index 7db9afdc9c3..7bbc5b41bfd 100644 --- a/code/modules/mob/living/carbon/human/human_login.dm +++ b/code/modules/mob/living/carbon/human/human_login.dm @@ -7,4 +7,5 @@ to_chat(src, "You can ventcrawl! Use alt+click on vents to quickly travel about the station.") update_pipe_vision() regenerate_icons() + SEND_SIGNAL(src, COMSIG_HUMAN_LOGIN) return diff --git a/code/modules/mob/living/carbon/human/human_mob.dm b/code/modules/mob/living/carbon/human/human_mob.dm index b52bfb95734..f9ceb08ff1a 100644 --- a/code/modules/mob/living/carbon/human/human_mob.dm +++ b/code/modules/mob/living/carbon/human/human_mob.dm @@ -2179,3 +2179,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X set category = "IC" update_flavor_text() + +/mob/living/carbon/human/proc/apply_offstation_roles(source) + SIGNAL_HANDLER + mind.offstation_role = TRUE