From 091a53c4d817eb70515c577dd833e8a392b82c27 Mon Sep 17 00:00:00 2001 From: moxian Date: Thu, 7 Nov 2019 06:28:14 +0000 Subject: [PATCH 1/3] Fix hijack objective check. Corpses no longer count against it. Slaughter demons and other special roles don't count against it either. Instead of having a long list of roles that are allowed on the shuttle, it's easier to list *dis*allowed ones instead. --- code/modules/shuttle/emergency.dm | 57 ++++++++++++++----------------- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 953c0e6682c..7e758bb86c4 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -175,42 +175,35 @@ /obj/docking_port/mobile/emergency/proc/is_hijacked() for(var/mob/living/player in GLOB.player_list) if(player.mind) - if(player.stat != DEAD || !iszombie(player)) - if(issilicon(player)) //Borgs are technically dead anyways + if(player.stat == DEAD) // Corpses + continue + if(iszombie(player)) // Walking corpses + continue + if(issilicon(player)) //Borgs are technically dead anyways + continue + if(isanimal(player)) //Poly does not own the shuttle + continue + if(ishuman(player)) //hostages allowed on the shuttle, check for restraints + var/mob/living/carbon/human/H = player + if(!H.check_death_method() && H.health <= HEALTH_THRESHOLD_DEAD) //new crit users who are in hard crit are considered dead continue - if(isanimal(player)) //Poly does not own the shuttle + if(H.handcuffed) //cuffs continue - if(ishuman(player)) //hostages allowed on the shuttle, check for restraints - var/mob/living/carbon/human/H = player - if(!H.check_death_method() && H.health <= HEALTH_THRESHOLD_DEAD) //new crit users who are in hard crit are considered dead - continue - if(H.handcuffed) //cuffs - continue - if(H.wear_suit && H.wear_suit.breakouttime) //straight jacket - continue - if(istype(H.loc, /obj/structure/closet)) //locked/welded locker, all aboard the clown train honk honk - var/obj/structure/closet/C = H.loc - if(C.welded || C.locked) - continue - var/special_role = player.mind.special_role - if(special_role) - if(special_role == SPECIAL_ROLE_TRAITOR) // traitors can hijack the shuttle + if(H.wear_suit && H.wear_suit.breakouttime) //straight jacket + continue + if(istype(H.loc, /obj/structure/closet)) //locked/welded locker, all aboard the clown train honk honk + var/obj/structure/closet/C = H.loc + if(C.welded || C.locked) continue + var/special_role = player.mind.special_role + if(special_role) + // There's a long list of special roles, but almost all of them are antags anyway. + // If you manage to escape with a pet slaughter demon - go for it! Greentext well earned! + if(special_role != SPECIAL_ROLE_ERT && special_role != SPECIAL_ROLE_EVENTMISC) + continue - if(special_role == SPECIAL_ROLE_CHANGELING) // changelings as well - continue - - if(special_role == SPECIAL_ROLE_VAMPIRE || special_role == SPECIAL_ROLE_VAMPIRE_THRALL) // for traitorvamp - continue - - if(special_role == SPECIAL_ROLE_NUKEOPS) // so can nukeops, for the hell of it - continue - - if(special_role == SPECIAL_ROLE_SYNDICATE_DEATHSQUAD) // and the syndie deathsquad i guess - continue - - if(get_area(player) == areaInstance) - return FALSE + if(get_area(player) == areaInstance) + return FALSE return TRUE From 30139af05aaed126a64ba703f7e3aaa30f40c821 Mon Sep 17 00:00:00 2001 From: moxian Date: Thu, 7 Nov 2019 06:49:07 +0000 Subject: [PATCH 2/3] Death Squad are not syndies despite "Death" in the name. Derp. --- code/modules/shuttle/emergency.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 7e758bb86c4..c79fa4d2607 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -199,7 +199,7 @@ if(special_role) // There's a long list of special roles, but almost all of them are antags anyway. // If you manage to escape with a pet slaughter demon - go for it! Greentext well earned! - if(special_role != SPECIAL_ROLE_ERT && special_role != SPECIAL_ROLE_EVENTMISC) + if(special_role != SPECIAL_ROLE_EVENTMISC && special_role != SPECIAL_ROLE_ERT && special_role != SPECIAL_ROLE_DEATHSQUAD) continue if(get_area(player) == areaInstance) From 07e5740cefa7ffaf30e97d70c2232307e845d4d8 Mon Sep 17 00:00:00 2001 From: moxian Date: Thu, 7 Nov 2019 06:52:40 +0000 Subject: [PATCH 3/3] Remove one more level of indentation while at it. Uniformity, yay! --- code/modules/shuttle/emergency.dm | 51 ++++++++++++++++--------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index c79fa4d2607..5af2d472416 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -174,36 +174,37 @@ /obj/docking_port/mobile/emergency/proc/is_hijacked() for(var/mob/living/player in GLOB.player_list) - if(player.mind) - if(player.stat == DEAD) // Corpses + if(!player.mind) + continue + if(player.stat == DEAD) // Corpses + continue + if(iszombie(player)) // Walking corpses + continue + if(issilicon(player)) //Borgs are technically dead anyways + continue + if(isanimal(player)) //Poly does not own the shuttle + continue + if(ishuman(player)) //hostages allowed on the shuttle, check for restraints + var/mob/living/carbon/human/H = player + if(!H.check_death_method() && H.health <= HEALTH_THRESHOLD_DEAD) //new crit users who are in hard crit are considered dead continue - if(iszombie(player)) // Walking corpses + if(H.handcuffed) //cuffs continue - if(issilicon(player)) //Borgs are technically dead anyways + if(H.wear_suit && H.wear_suit.breakouttime) //straight jacket continue - if(isanimal(player)) //Poly does not own the shuttle + if(istype(H.loc, /obj/structure/closet)) //locked/welded locker, all aboard the clown train honk honk + var/obj/structure/closet/C = H.loc + if(C.welded || C.locked) + continue + var/special_role = player.mind.special_role + if(special_role) + // There's a long list of special roles, but almost all of them are antags anyway. + // If you manage to escape with a pet slaughter demon - go for it! Greentext well earned! + if(special_role != SPECIAL_ROLE_EVENTMISC && special_role != SPECIAL_ROLE_ERT && special_role != SPECIAL_ROLE_DEATHSQUAD) continue - if(ishuman(player)) //hostages allowed on the shuttle, check for restraints - var/mob/living/carbon/human/H = player - if(!H.check_death_method() && H.health <= HEALTH_THRESHOLD_DEAD) //new crit users who are in hard crit are considered dead - continue - if(H.handcuffed) //cuffs - continue - if(H.wear_suit && H.wear_suit.breakouttime) //straight jacket - continue - if(istype(H.loc, /obj/structure/closet)) //locked/welded locker, all aboard the clown train honk honk - var/obj/structure/closet/C = H.loc - if(C.welded || C.locked) - continue - var/special_role = player.mind.special_role - if(special_role) - // There's a long list of special roles, but almost all of them are antags anyway. - // If you manage to escape with a pet slaughter demon - go for it! Greentext well earned! - if(special_role != SPECIAL_ROLE_EVENTMISC && special_role != SPECIAL_ROLE_ERT && special_role != SPECIAL_ROLE_DEATHSQUAD) - continue - if(get_area(player) == areaInstance) - return FALSE + if(get_area(player) == areaInstance) + return FALSE return TRUE