From 2a90568b9ab2bb8586edbecded83141ddbb852e1 Mon Sep 17 00:00:00 2001 From: Capsandi <38051413+Capsandi@users.noreply.github.com> Date: Sat, 8 Mar 2025 15:15:13 -0500 Subject: [PATCH] Adds a step_trigger what forces on outfits for event maps (#89908) ## About The Pull Request /obj/effect/step_trigger/outfitter it deletes existing equipment and forces on an outfit for any human intended for event maps wherein you want location-dependent loadouts(like what im working on now) code is tested btw ## Why It's Good For The Game Events are good for the game(I think), and administrative overhead is bad for events --- code/game/objects/effects/step_triggers.dm | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index 0920b8e8b72..b1574d1f8b9 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -202,7 +202,7 @@ var/volume = 100 var/freq_vary = 1 //Should the frequency of the sound vary? var/extra_range = 0 // eg World.view = 7, extra_range = 1, 7+1 = 8, 8 turfs radius - var/happens_once = 0 + var/happens_once = FALSE var/triggerer_only = 0 //Whether the triggerer is the only person who hears this @@ -222,7 +222,25 @@ qdel(src) /obj/effect/step_trigger/sound_effect/lavaland_cult_altar - happens_once = 1 + happens_once = TRUE name = "a grave mistake"; sound = 'sound/effects/hallucinations/i_see_you1.ogg' triggerer_only = 1 + +/// Forces a given outfit onto any carbon which crosses it, for event maps +/obj/effect/step_trigger/outfitter + mobs_only = TRUE + ///outfit to equip + var/datum/outfit/outfit_to_equip + var/happens_once = FALSE + +/obj/effect/step_trigger/outfitter/Trigger(atom/movable/A) + if(!ishuman(A)) + return + + var/mob/living/carbon/human/fellow = A + fellow.delete_equipment() + fellow.equipOutfit(outfit_to_equip,FALSE) + + if(happens_once) + qdel(src)