Fixes hijacked shuttles not counting as escaped, cleans up associated code (#73623)

## About The Pull Request

Fixes #72240 

So, in the past, `onCentCom` ran a check at the end that said "if we're
on centcom z, in centcom area, or in shuttle that is endgame launched:
return TRUE"

Meanwhile its brother `onSyndieBase` did not need to run the same
checks, because it was also on the centcom z-level.

This meant that for the purposes of `considered_escaped`, `onCentCom`
pretty much entirely eclipsed `onSyndieBase`, only mattering for, well,
Nuke Ops

So the fix was simple - add the check for "in shuttle that is engame
launched" to `onSyndieBase`.

I took this opportunity to do a quick audit of associated "escaped" and
"alive" code. Did you know that hardcore random only checked that you
were on centcom to award survival points? Instead of any other checks
for escaped like stat?

Also the ancient "romerol zombies can't be used as an easy way to
greentext escape" was broken, because it checked the wrong species ID?

Bonus performance optimization: `in area` -> `in
area.get_contained_turfs()`

## Why It's Good For The Game

Hijack does not turn around to become an L

## Changelog

🆑 Melbert
fix: Hijacked shuttles now count as "escaping alive" once agian
fix: Hardcore random survival now actually checks that you've escaped
alive, and not just made it to centcom
fix: Intelligent zombies can now escape.
fix: Infectious zombies now don't count as escaped as intended. 
/🆑
This commit is contained in:
MrMelbert
2023-03-04 03:09:33 -05:00
committed by GitHub
parent e52683d387
commit 2fd2feec50
7 changed files with 85 additions and 34 deletions
+2 -3
View File
@@ -540,9 +540,8 @@
if(time_left <= 0)
//move each escape pod to its corresponding escape dock
for(var/A in SSshuttle.mobile_docking_ports)
var/obj/docking_port/mobile/M = A
M.on_emergency_dock()
for(var/obj/docking_port/mobile/port as anything in SSshuttle.mobile_docking_ports)
port.on_emergency_dock()
// now move the actual emergency shuttle to centcom
// unless the shuttle is "hijacked"
+2 -1
View File
@@ -1135,7 +1135,8 @@
//Called when emergency shuttle docks at centcom
/obj/docking_port/mobile/proc/on_emergency_dock()
//Mapping a new docking point for each ship mappers could potentially want docking with centcom would take up lots of space, just let them keep flying off into the sunset for their greentext
// Mapping a new docking point for each ship mappers could potentially want docking with centcom would take up lots of space,
// just let them keep flying off "into the sunset" for their greentext.
if(launch_status == ENDGAME_LAUNCHED)
launch_status = ENDGAME_TRANSIT