From 495e861cbf83e72289e912223281b173ea812e32 Mon Sep 17 00:00:00 2001 From: Gboster-0 <82319946+Gboster-0@users.noreply.github.com> Date: Sat, 4 Jan 2025 22:34:04 +0100 Subject: [PATCH] adds the prevention to other methods aswell --- .../tegu_items/rcorp/objective.dm | 46 +++++++++++-------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/ModularTegustation/tegu_items/rcorp/objective.dm b/ModularTegustation/tegu_items/rcorp/objective.dm index 8e5048440eb8..1546fa7fd086 100644 --- a/ModularTegustation/tegu_items/rcorp/objective.dm +++ b/ModularTegustation/tegu_items/rcorp/objective.dm @@ -162,19 +162,24 @@ GLOBAL_VAR_INIT(rcorp_payload, null) light_on = FALSE update_light() - //Round End Effects - SSticker.SetRoundEndSound('sound/abnormalities/donttouch/end.ogg') - SSticker.force_ending = 1 - for(var/mob/M in GLOB.player_list) - to_chat(M, span_userdanger("[uppertext(user.real_name)] has collected the bough!")) - - switch(GLOB.rcorp_wincondition) - if(0) - to_chat(M, span_userdanger("R-CORP MAJOR VICTORY.")) - if(1) - to_chat(M, span_userdanger("R-CORP MINOR VICTORY.")) - if(2) - to_chat(M, span_userdanger("R-CORP SUPREME VICTORY.")) + if(!SSticker.force_ending) + //Round End Effects + SSticker.SetRoundEndSound('sound/abnormalities/donttouch/end.ogg') + SSticker.force_ending = 1 + for(var/mob/M in GLOB.player_list) + to_chat(M, span_userdanger("[uppertext(user.real_name)] has collected the bough!")) + + switch(GLOB.rcorp_wincondition) + if(0) + to_chat(M, span_userdanger("R-CORP MAJOR VICTORY.")) + if(1) + to_chat(M, span_userdanger("R-CORP MINOR VICTORY.")) + if(2) + to_chat(M, span_userdanger("R-CORP SUPREME VICTORY.")) + else + var/turf/turf = get_turf(src) + new /obj/effect/decal/cleanable/confetti(turf) + playsound(turf, 'sound/misc/sadtrombone.ogg', 100) else user.gib() //lol, idiot. @@ -191,11 +196,16 @@ GLOBAL_VAR_INIT(rcorp_payload, null) /mob/living/simple_animal/hostile/shrimp_vip/death(gibbed) - for(var/mob/M in GLOB.player_list) - to_chat(M, span_userdanger("THE VIP HAS BEEN SLAIN.")) - to_chat(M, span_userdanger("R-CORP MAJOR VICTORY.")) - SSticker.force_ending = 1 - ..() + if(!SSticker.force_ending) + for(var/mob/M in GLOB.player_list) + to_chat(M, span_userdanger("THE VIP HAS BEEN SLAIN.")) + to_chat(M, span_userdanger("R-CORP MAJOR VICTORY.")) + SSticker.force_ending = 1 + else + var/turf/turf = get_turf(src) + new /obj/effect/decal/cleanable/confetti(turf) + playsound(turf, 'sound/misc/sadtrombone.ogg', 100) + return ..() //Arbiter /obj/effect/mob_spawn/human/arbiter/rcorp