mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #5330 from mwerezak/emergency-shuttle
Updates emergency shuttle controller to use shuttle datums
This commit is contained in:
@@ -216,8 +216,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(ticker.mode:malf_mode_declared)
|
||||
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
|
||||
@@ -159,8 +159,8 @@
|
||||
stat(null, "Plasma Stored: [getPlasma()]/[max_plasma]")
|
||||
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
|
||||
@@ -171,8 +171,8 @@
|
||||
if(ticker.mode:malf_mode_declared)
|
||||
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ var/list/ai_list = list()
|
||||
call_shuttle_proc(src)
|
||||
|
||||
// hack to display shuttle timer
|
||||
if(emergency_shuttle.online)
|
||||
if(emergency_shuttle.online())
|
||||
var/obj/machinery/computer/communications/C = locate() in machines
|
||||
if(C)
|
||||
C.post_status("shuttle")
|
||||
|
||||
@@ -39,11 +39,9 @@
|
||||
callshuttle = 0
|
||||
|
||||
if(callshuttle == 3) //if all three conditions are met
|
||||
emergency_shuttle.incall(2)
|
||||
emergency_shuttle.call_evac()
|
||||
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
|
||||
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
|
||||
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
|
||||
world << sound('sound/AI/shuttlecalled.ogg')
|
||||
|
||||
if(explosive)
|
||||
spawn(10)
|
||||
|
||||
@@ -97,10 +97,11 @@
|
||||
|
||||
// this function displays the shuttles ETA in the status panel if the shuttle has been called
|
||||
/mob/living/silicon/proc/show_emergency_shuttle_eta()
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
|
||||
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
|
||||
|
||||
@@ -146,8 +146,8 @@
|
||||
statpanel("Status")
|
||||
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
|
||||
@@ -329,12 +329,13 @@
|
||||
dat += "Round Duration: [round(hours)]h [round(mins)]m<br>"
|
||||
|
||||
if(emergency_shuttle) //In case Nanotrasen decides reposess CentComm's shuttles.
|
||||
if(emergency_shuttle.direction == 2) //Shuttle is going to centcomm, not recalled
|
||||
if(emergency_shuttle.going_to_centcom()) //Shuttle is going to centcomm, not recalled
|
||||
dat += "<font color='red'><b>The station has been evacuated.</b></font><br>"
|
||||
if(emergency_shuttle.direction == 1 && emergency_shuttle.timeleft() < 300 && emergency_shuttle.alert == 0) // Emergency shuttle is past the point of no recall
|
||||
dat += "<font color='red'>The station is currently undergoing evacuation procedures.</font><br>"
|
||||
if(emergency_shuttle.direction == 1 && emergency_shuttle.alert == 1) // Crew transfer initiated
|
||||
dat += "<font color='red'>The station is currently undergoing crew transfer procedures.</font><br>"
|
||||
if(emergency_shuttle.online())
|
||||
if (emergency_shuttle.evac) // Emergency shuttle is past the point of no recall
|
||||
dat += "<font color='red'>The station is currently undergoing evacuation procedures.</font><br>"
|
||||
else // Crew transfer initiated
|
||||
dat += "<font color='red'>The station is currently undergoing crew transfer procedures.</font><br>"
|
||||
|
||||
dat += "Choose from the following open positions:<br>"
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
|
||||
Reference in New Issue
Block a user