mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Adds docking support to shuttles, NanoUI
This commit is contained in:
@@ -11,10 +11,10 @@
|
||||
|
||||
var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
|
||||
|
||||
datum/shuttle_controller
|
||||
datum/shuttle_controller/emergency_shuttle
|
||||
var/alert = 0 //0 = emergency, 1 = crew cycle
|
||||
|
||||
var/location = 0 //0 = somewhere far away (in spess), 1 = at SS13, 2 = returned from SS13
|
||||
location = 0 //0 = somewhere far away (in spess), 1 = at SS13, 2 = returned from SS13
|
||||
var/online = 0
|
||||
var/direction = 1 //-1 = going back to central command, 1 = going to SS13, 2 = in transit to centcom (not recalled)
|
||||
|
||||
@@ -52,10 +52,10 @@ datum/shuttle_controller
|
||||
|
||||
return SHUTTLEARRIVETIME
|
||||
|
||||
datum/shuttle_controller/proc/shuttlealert(var/X)
|
||||
datum/shuttle_controller/emergency_shuttle/proc/shuttlealert(var/X)
|
||||
alert = X
|
||||
|
||||
datum/shuttle_controller/proc/recall()
|
||||
datum/shuttle_controller/emergency_shuttle/proc/recall()
|
||||
if(direction == 1)
|
||||
var/timeleft = timeleft()
|
||||
if(alert == 0)
|
||||
@@ -78,7 +78,7 @@ datum/shuttle_controller/proc/recall()
|
||||
|
||||
// returns the time (in seconds) before shuttle arrival
|
||||
// note if direction = -1, gives a count-up to SHUTTLEARRIVETIME
|
||||
datum/shuttle_controller/proc/timeleft()
|
||||
datum/shuttle_controller/emergency_shuttle/proc/timeleft()
|
||||
if(online)
|
||||
var/timeleft = round((endtime - world.timeofday)/10 ,1)
|
||||
if(direction == 1 || direction == 2)
|
||||
@@ -89,13 +89,13 @@ datum/shuttle_controller/proc/timeleft()
|
||||
return get_shuttle_arrive_time()
|
||||
|
||||
// sets the time left to a given delay (in seconds)
|
||||
datum/shuttle_controller/proc/settimeleft(var/delay)
|
||||
datum/shuttle_controller/emergency_shuttle/proc/settimeleft(var/delay)
|
||||
endtime = world.timeofday + delay * 10
|
||||
timelimit = delay
|
||||
|
||||
// sets the shuttle direction
|
||||
// 1 = towards SS13, -1 = back to centcom
|
||||
datum/shuttle_controller/proc/setdirection(var/dirn)
|
||||
datum/shuttle_controller/emergency_shuttle/proc/setdirection(var/dirn)
|
||||
if(direction == dirn)
|
||||
return
|
||||
direction = dirn
|
||||
@@ -104,7 +104,7 @@ datum/shuttle_controller/proc/setdirection(var/dirn)
|
||||
endtime = world.timeofday + (get_shuttle_arrive_time()*10 - ticksleft)
|
||||
return
|
||||
|
||||
datum/shuttle_controller/proc/process()
|
||||
datum/shuttle_controller/emergency_shuttle/proc/process()
|
||||
|
||||
datum/shuttle_controller/emergency_shuttle/process()
|
||||
if(!online)
|
||||
|
||||
Reference in New Issue
Block a user