Ports Bay's updated evacuation controller and bluespace jump. (#12445)

This commit is contained in:
Matt Atlas
2021-09-07 17:12:10 +02:00
committed by GitHub
parent 0b6631781a
commit b64224770c
59 changed files with 1137 additions and 597 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ var/list/global_webhooks = list()
emb["description"] += data["antags"]
if(data["survivours"] > 0)
emb["description"] += "There [data["survivours"]>1 ? "were **[data["survivours"]] survivors**" : "was **one survivor**"]"
emb["description"] += " ([data["escaped"]>0 ? data["escaped"] : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]) and **[data["ghosts"]] ghosts**."
emb["description"] += " ([data["escaped"]>0 ? data["escaped"] : "none"] [evacuation_controller.emergency_evacuation ? "escaped" : "transferred"]) and **[data["ghosts"]] ghosts**."
else
emb["description"] += "There were **no survivors** ([data["ghosts"]] ghosts)."
OutData["embeds"] = list(emb)
+4 -4
View File
@@ -61,11 +61,11 @@
data["character_name"] = user.client.prefs.real_name
var/shuttle_status = ""
if(emergency_shuttle) //In case Nanotrasen decides to reposess CentComm's shuttles.
if(emergency_shuttle.going_to_centcom()) //Shuttle is going to centcomm, not recalled
if(evacuation_controller) //In case Nanotrasen decides to reposess CentComm's shuttles.
if(evacuation_controller.has_evacuated()) //Shuttle is going to centcomm, not recalled
shuttle_status = "post-evac"
if(emergency_shuttle.online())
if (emergency_shuttle.evac) // Emergency shuttle is past the point of no recall
if(evacuation_controller.is_evacuating())
if (evacuation_controller.emergency_evacuation) // Emergency shuttle is past the point of no recall
shuttle_status = "evac"
else // Crew transfer initiated
shuttle_status = "transfer"
+41
View File
@@ -0,0 +1,41 @@
// Observer Pattern Implementation: Direction Set
// Registration type: /atom
//
// Raised when: An /atom changes dir using the set_dir() proc.
//
// Arguments that the called proc should expect:
// /atom/dir_changer: The instance that changed direction
// /old_dir: The dir before the change.
// /new_dir: The dir after the change.
var/datum/observ/dir_set/dir_set_event = new()
/datum/observ/dir_set
name = "Direction Set"
expected_type = /atom
/datum/observ/dir_set/register(var/atom/dir_changer, var/datum/listener, var/proc_call)
. = ..()
// Listen to the parent if possible.
if(. && istype(dir_changer.loc, /atom/movable)) // We don't care about registering to turfs.
register(dir_changer.loc, dir_changer, /atom/proc/recursive_dir_set)
/*********************
* Direction Handling *
*********************/
/atom/set_dir()
var/old_dir = dir
UNLINT(. = ..())
if(old_dir != dir)
dir_set_event.raise_event(src, old_dir, dir)
/atom/movable/Entered(var/atom/movable/am, atom/old_loc)
. = ..()
if(dir_set_event.has_listeners(am))
dir_set_event.register(src, am, /atom/proc/recursive_dir_set)
/atom/movable/Exited(var/atom/movable/am, atom/new_loc)
. = ..()
dir_set_event.unregister(src, am, /atom/proc/recursive_dir_set)
+8 -1
View File
@@ -11,4 +11,11 @@
/atom/movable/proc/move_to_loc_or_null(var/atom/movable/am, var/old_loc, var/new_loc)
if(new_loc != loc)
forceMove(new_loc)
forceMove(new_loc)
/atom/proc/recursive_dir_set(var/atom/a, var/old_dir, var/new_dir)
set_dir(new_dir)
// Sometimes you just want to end yourself
/datum/proc/qdel_self()
qdel(src)