Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes round-end not auto-triggering when a player dies on combat maps because of pinocchio + R-corp round-end improvements #2667

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 44 additions & 30 deletions ModularTegustation/tegu_items/rcorp/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -239,15 +249,19 @@ GLOBAL_VAR_INIT(rcorp_payload, null)
resistance_flags &= ~INDESTRUCTIBLE

/obj/structure/rcorpcomms/deconstruct(disassembled = TRUE)
for(var/mob/M in GLOB.player_list)
to_chat(M, span_userdanger("RCORP'S COMMUNICATIONS HAVE BEEN DESTROYED."))
switch(GLOB.rcorp_wincondition)
if(0)
to_chat(M, span_userdanger("ABNORMALITY MAJOR VICTORY."))
if(1)
to_chat(M, span_userdanger("ABNORMALITY SUPREME VICTORY."))
if(2)
to_chat(M, span_userdanger("ABNORMALITY MINOR VICTORY."))
SSticker.force_ending = 1
..()

if(!SSticker.force_ending)
for(var/mob/M in GLOB.player_list)
to_chat(M, span_userdanger("RCORP'S COMMUNICATIONS HAVE BEEN DESTROYED."))
switch(GLOB.rcorp_wincondition)
if(0)
to_chat(M, span_userdanger("ABNORMALITY MAJOR VICTORY."))
if(1)
to_chat(M, span_userdanger("ABNORMALITY SUPREME VICTORY."))
if(2)
to_chat(M, span_userdanger("ABNORMALITY MINOR 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 ..()
4 changes: 2 additions & 2 deletions code/game/gamemodes/management/event/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ GLOBAL_VAR_INIT(wcorp_enemy_faction, "") //decides which faction WCorp will be u
/// Automatically ends the shift if no humanoid players are alive
/datum/game_mode/combat/proc/CheckLiving()
for(var/mob/living/carbon/human/hooman in GLOB.human_list)
if(hooman.stat != DEAD && hooman.ckey)
if(hooman.stat != DEAD && hooman.ckey && !istype(hooman, /mob/living/carbon/human/species/pinocchio))
return

if(SSticker.force_ending == TRUE) // they lost another way before we could do it, how rude.
Expand Down Expand Up @@ -134,7 +134,7 @@ GLOBAL_VAR_INIT(wcorp_enemy_faction, "") //decides which faction WCorp will be u
//Gamemode stuff
/datum/game_mode/combat/proc/counterincrease()
addtimer(CALLBACK(src, PROC_REF(counterincrease)), 1 MINUTES)
GLOB.combat_counter+=1
GLOB.combat_counter++
if(SSmaptype.maptype == "wcorp")
for(var/mob/living/carbon/human/H in GLOB.human_list)
if(H.stat == DEAD)
Expand Down
Loading