From b1bf22acf40d66502fa13a6c7988befdf3eec108 Mon Sep 17 00:00:00 2001 From: further-reading Date: Thu, 1 Oct 2020 21:08:44 +0100 Subject: [PATCH] [orion trail] Styling issues + refactor https://github.com/ParadiseSS13/Paradise/pull/14503 --- code/game/machinery/computer/arcade.dm | 33 +++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 6299d331a23..adbed5f15eb 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -571,24 +571,25 @@ event = null else if(href_list["killcrew"]) //shoot a crewmember - if(settlers.len > 0 || alive > 0) - var/sheriff = remove_crewmember() //I shot the sheriff - playsound(loc,'sound/weapons/gunshots/gunshot.ogg', 100, 1) + if(length(settlers) <= 0 || alive <= 0) + return + var/sheriff = remove_crewmember() //I shot the sheriff + playsound(loc, 'sound/weapons/gunshots/gunshot.ogg', 100, 1) - if(settlers.len == 0 || alive == 0) - atom_say("The last crewmember [sheriff], shot themselves, GAME OVER!") - if(emagged) - usr.death(0) - emagged = 0 - gameover = 1 - event = null - else if(emagged) - if(usr.name == sheriff) - atom_say("The crew of the ship chose to kill [usr.name]!") - usr.death(0) + if(length(settlers) == 0 || alive == 0) + atom_say("The last crewmember [sheriff], shot themselves, GAME OVER!") + if(emagged) + usr.death(FALSE) + emagged = FALSE + gameover = TRUE + event = null + else if(emagged) + if(usr.name == sheriff) + atom_say("The crew of the ship chose to kill [usr.name]!") + usr.death(FALSE) - if(event == ORION_TRAIL_LING) //only ends the ORION_TRAIL_LING event, since you can do this action in multiple places - event = null + if(event == ORION_TRAIL_LING) //only ends the ORION_TRAIL_LING event, since you can do this action in multiple places + event = null //Spaceport specific interactions //they get a header because most of them don't reset event (because it's a shop, you leave when you want to)