mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Adds docking support to shuttles, NanoUI
This commit is contained in:
@@ -275,7 +275,6 @@
|
|||||||
#include "code\game\jobs\job\silicon.dm"
|
#include "code\game\jobs\job\silicon.dm"
|
||||||
#include "code\game\machinery\adv_med.dm"
|
#include "code\game\machinery\adv_med.dm"
|
||||||
#include "code\game\machinery\ai_slipper.dm"
|
#include "code\game\machinery\ai_slipper.dm"
|
||||||
#include "code\game\machinery\airlock_control.dm"
|
|
||||||
#include "code\game\machinery\alarm.dm"
|
#include "code\game\machinery\alarm.dm"
|
||||||
#include "code\game\machinery\atmo_control.dm"
|
#include "code\game\machinery\atmo_control.dm"
|
||||||
#include "code\game\machinery\autolathe.dm"
|
#include "code\game\machinery\autolathe.dm"
|
||||||
@@ -375,6 +374,7 @@
|
|||||||
#include "code\game\machinery\computer\station_alert.dm"
|
#include "code\game\machinery\computer\station_alert.dm"
|
||||||
#include "code\game\machinery\computer\syndicate_specops_shuttle.dm"
|
#include "code\game\machinery\computer\syndicate_specops_shuttle.dm"
|
||||||
#include "code\game\machinery\doors\airlock.dm"
|
#include "code\game\machinery\doors\airlock.dm"
|
||||||
|
#include "code\game\machinery\doors\airlock_control.dm"
|
||||||
#include "code\game\machinery\doors\airlock_electronics.dm"
|
#include "code\game\machinery\doors\airlock_electronics.dm"
|
||||||
#include "code\game\machinery\doors\alarmlock.dm"
|
#include "code\game\machinery\doors\alarmlock.dm"
|
||||||
#include "code\game\machinery\doors\brigdoors.dm"
|
#include "code\game\machinery\doors\brigdoors.dm"
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
|
|
||||||
var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
|
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/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/online = 0
|
||||||
var/direction = 1 //-1 = going back to central command, 1 = going to SS13, 2 = in transit to centcom (not recalled)
|
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
|
return SHUTTLEARRIVETIME
|
||||||
|
|
||||||
datum/shuttle_controller/proc/shuttlealert(var/X)
|
datum/shuttle_controller/emergency_shuttle/proc/shuttlealert(var/X)
|
||||||
alert = X
|
alert = X
|
||||||
|
|
||||||
datum/shuttle_controller/proc/recall()
|
datum/shuttle_controller/emergency_shuttle/proc/recall()
|
||||||
if(direction == 1)
|
if(direction == 1)
|
||||||
var/timeleft = timeleft()
|
var/timeleft = timeleft()
|
||||||
if(alert == 0)
|
if(alert == 0)
|
||||||
@@ -78,7 +78,7 @@ datum/shuttle_controller/proc/recall()
|
|||||||
|
|
||||||
// returns the time (in seconds) before shuttle arrival
|
// returns the time (in seconds) before shuttle arrival
|
||||||
// note if direction = -1, gives a count-up to SHUTTLEARRIVETIME
|
// note if direction = -1, gives a count-up to SHUTTLEARRIVETIME
|
||||||
datum/shuttle_controller/proc/timeleft()
|
datum/shuttle_controller/emergency_shuttle/proc/timeleft()
|
||||||
if(online)
|
if(online)
|
||||||
var/timeleft = round((endtime - world.timeofday)/10 ,1)
|
var/timeleft = round((endtime - world.timeofday)/10 ,1)
|
||||||
if(direction == 1 || direction == 2)
|
if(direction == 1 || direction == 2)
|
||||||
@@ -89,13 +89,13 @@ datum/shuttle_controller/proc/timeleft()
|
|||||||
return get_shuttle_arrive_time()
|
return get_shuttle_arrive_time()
|
||||||
|
|
||||||
// sets the time left to a given delay (in seconds)
|
// 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
|
endtime = world.timeofday + delay * 10
|
||||||
timelimit = delay
|
timelimit = delay
|
||||||
|
|
||||||
// sets the shuttle direction
|
// sets the shuttle direction
|
||||||
// 1 = towards SS13, -1 = back to centcom
|
// 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)
|
if(direction == dirn)
|
||||||
return
|
return
|
||||||
direction = dirn
|
direction = dirn
|
||||||
@@ -104,7 +104,7 @@ datum/shuttle_controller/proc/setdirection(var/dirn)
|
|||||||
endtime = world.timeofday + (get_shuttle_arrive_time()*10 - ticksleft)
|
endtime = world.timeofday + (get_shuttle_arrive_time()*10 - ticksleft)
|
||||||
return
|
return
|
||||||
|
|
||||||
datum/shuttle_controller/proc/process()
|
datum/shuttle_controller/emergency_shuttle/proc/process()
|
||||||
|
|
||||||
datum/shuttle_controller/emergency_shuttle/process()
|
datum/shuttle_controller/emergency_shuttle/process()
|
||||||
if(!online)
|
if(!online)
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
for(var/obj/machinery/door/door in T.contents)
|
for(var/obj/machinery/door/door in T.contents)
|
||||||
spawn(1)
|
spawn(1)
|
||||||
if(istype(door,/obj/machinery/door/airlock))
|
if(istype(door,/obj/machinery/door/airlock))
|
||||||
door:locked = 0
|
door:unlock(1) //forced because it's magic!
|
||||||
door.open()
|
door.open()
|
||||||
return
|
return
|
||||||
@@ -158,7 +158,7 @@ datum/game_mode/mutiny
|
|||||||
|
|
||||||
proc/unbolt_vault_door()
|
proc/unbolt_vault_door()
|
||||||
var/obj/machinery/door/airlock/vault = locate(/obj/machinery/door/airlock/vault)
|
var/obj/machinery/door/airlock/vault = locate(/obj/machinery/door/airlock/vault)
|
||||||
vault.locked = 0
|
vault.lock()
|
||||||
|
|
||||||
proc/make_secret_transcript()
|
proc/make_secret_transcript()
|
||||||
var/obj/machinery/computer/telecomms/server/S = locate(/obj/machinery/computer/telecomms/server)
|
var/obj/machinery/computer/telecomms/server/S = locate(/obj/machinery/computer/telecomms/server)
|
||||||
|
|||||||
@@ -93,8 +93,7 @@
|
|||||||
if(specialfunctions & IDSCAN)
|
if(specialfunctions & IDSCAN)
|
||||||
D.aiDisabledIdScanner = 1
|
D.aiDisabledIdScanner = 1
|
||||||
if(specialfunctions & BOLTS)
|
if(specialfunctions & BOLTS)
|
||||||
D.locked = 1
|
D.lock()
|
||||||
D.update_icon()
|
|
||||||
if(specialfunctions & SHOCK)
|
if(specialfunctions & SHOCK)
|
||||||
D.secondsElectrified = -1
|
D.secondsElectrified = -1
|
||||||
if(specialfunctions & SAFE)
|
if(specialfunctions & SAFE)
|
||||||
@@ -104,8 +103,7 @@
|
|||||||
D.aiDisabledIdScanner = 0
|
D.aiDisabledIdScanner = 0
|
||||||
if(specialfunctions & BOLTS)
|
if(specialfunctions & BOLTS)
|
||||||
if(!D.isWireCut(4) && D.arePowerSystemsOn())
|
if(!D.isWireCut(4) && D.arePowerSystemsOn())
|
||||||
D.locked = 0
|
D.unlock()
|
||||||
D.update_icon()
|
|
||||||
if(specialfunctions & SHOCK)
|
if(specialfunctions & SHOCK)
|
||||||
D.secondsElectrified = 0
|
D.secondsElectrified = 0
|
||||||
if(specialfunctions & SAFE)
|
if(specialfunctions & SAFE)
|
||||||
|
|||||||
@@ -386,17 +386,10 @@ About the new airlock wires panel:
|
|||||||
//one wire for door bolts. Sending a pulse through this drops door bolts if they're not down (whether power's on or not),
|
//one wire for door bolts. Sending a pulse through this drops door bolts if they're not down (whether power's on or not),
|
||||||
//raises them if they are down (only if power's on)
|
//raises them if they are down (only if power's on)
|
||||||
if(!src.locked)
|
if(!src.locked)
|
||||||
src.locked = 1
|
src.lock()
|
||||||
for(var/mob/M in range(1,src))
|
|
||||||
M << "You hear a click from the bottom of the door."
|
|
||||||
src.updateUsrDialog()
|
|
||||||
else
|
else
|
||||||
if(src.arePowerSystemsOn()) //only can raise bolts if power's on
|
src.unlock()
|
||||||
src.locked = 0
|
|
||||||
for(var/mob/M in range(1,src))
|
|
||||||
M << "You hear a click from the bottom of the door."
|
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
update_icon()
|
|
||||||
|
|
||||||
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||||
//two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter).
|
//two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter).
|
||||||
@@ -460,9 +453,7 @@ About the new airlock wires panel:
|
|||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
if(AIRLOCK_WIRE_DOOR_BOLTS)
|
if(AIRLOCK_WIRE_DOOR_BOLTS)
|
||||||
//Cutting this wire also drops the door bolts, and mending it does not raise them. (This is what happens now, except there are a lot more wires going to door bolts at present)
|
//Cutting this wire also drops the door bolts, and mending it does not raise them. (This is what happens now, except there are a lot more wires going to door bolts at present)
|
||||||
if(src.locked!=1)
|
src.lock()
|
||||||
src.locked = 1
|
|
||||||
update_icon()
|
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||||
//Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user.
|
//Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user.
|
||||||
@@ -720,7 +711,7 @@ About the new airlock wires panel:
|
|||||||
t1 += text("Backup Power Output wire is cut.<br>\n")
|
t1 += text("Backup Power Output wire is cut.<br>\n")
|
||||||
|
|
||||||
if(src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
if(src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
||||||
t1 += text("Door bolt drop wire is cut.<br>\n")
|
t1 += text("Door bolt control wire is cut.<br>\n")
|
||||||
else if(!src.locked)
|
else if(!src.locked)
|
||||||
t1 += text("Door bolts are up. <A href='?src=\ref[];aiDisable=4'>Drop them?</a><br>\n", src)
|
t1 += text("Door bolts are up. <A href='?src=\ref[];aiDisable=4'>Drop them?</a><br>\n", src)
|
||||||
else
|
else
|
||||||
@@ -1000,9 +991,8 @@ About the new airlock wires panel:
|
|||||||
//drop door bolts
|
//drop door bolts
|
||||||
if(src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
if(src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
||||||
usr << "You can't drop the door bolts - The door bolt control wire has been cut."
|
usr << "You can't drop the door bolts - The door bolt control wire has been cut."
|
||||||
else if(src.locked!=1)
|
else
|
||||||
src.locked = 1
|
src.lock()
|
||||||
update_icon()
|
|
||||||
if(5)
|
if(5)
|
||||||
//un-electrify door
|
//un-electrify door
|
||||||
if(src.isWireCut(AIRLOCK_WIRE_ELECTRIFY))
|
if(src.isWireCut(AIRLOCK_WIRE_ELECTRIFY))
|
||||||
@@ -1068,15 +1058,11 @@ About the new airlock wires panel:
|
|||||||
if(4)
|
if(4)
|
||||||
//raise door bolts
|
//raise door bolts
|
||||||
if(src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
if(src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
|
||||||
usr << text("The door bolt drop wire is cut - you can't raise the door bolts.<br>\n")
|
usr << text("The door bolt control wire is cut - you can't raise the door bolts.<br>\n")
|
||||||
else if(!src.locked)
|
else if(!src.locked)
|
||||||
usr << text("The door bolts are already up.<br>\n")
|
usr << text("The door bolts are already up.<br>\n")
|
||||||
else
|
else
|
||||||
if(src.arePowerSystemsOn())
|
src.unlock()
|
||||||
src.locked = 0
|
|
||||||
update_icon()
|
|
||||||
else
|
|
||||||
usr << text("Cannot raise door bolts due to power failure.<br>\n")
|
|
||||||
|
|
||||||
if(5)
|
if(5)
|
||||||
//electrify door for 30 seconds
|
//electrify door for 30 seconds
|
||||||
@@ -1330,6 +1316,23 @@ About the new airlock wires panel:
|
|||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/obj/machinery/door/airlock/proc/lock(var/forced=0)
|
||||||
|
if (src.locked) return
|
||||||
|
|
||||||
|
src.locked = 1
|
||||||
|
for(var/mob/M in range(1,src))
|
||||||
|
M.show_message("You hear a click from the bottom of the door.", 2)
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
/obj/machinery/door/airlock/proc/unlock(var/forced=0)
|
||||||
|
if (!src.locked) return
|
||||||
|
|
||||||
|
if(forced || src.arePowerSystemsOn()) //only can raise bolts if power's on
|
||||||
|
src.locked = 0
|
||||||
|
for(var/mob/M in range(1,src))
|
||||||
|
M.show_message("You hear a click from the bottom of the door.", 2)
|
||||||
|
update_icon()
|
||||||
|
|
||||||
/obj/machinery/door/airlock/New()
|
/obj/machinery/door/airlock/New()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -1357,7 +1360,7 @@ About the new airlock wires panel:
|
|||||||
airlockWireColorToIndex = wire_assignments[4]
|
airlockWireColorToIndex = wire_assignments[4]
|
||||||
|
|
||||||
/obj/machinery/door/airlock/proc/prison_open()
|
/obj/machinery/door/airlock/proc/prison_open()
|
||||||
src.locked = 0
|
src.unlock()
|
||||||
src.open()
|
src.open()
|
||||||
src.locked = 1
|
src.lock()
|
||||||
return
|
return
|
||||||
@@ -8,49 +8,53 @@ obj/machinery/door/airlock
|
|||||||
var/datum/radio_frequency/radio_connection
|
var/datum/radio_frequency/radio_connection
|
||||||
explosion_resistance = 15
|
explosion_resistance = 15
|
||||||
|
|
||||||
|
obj/machinery/door/airlock/proc/can_radio()
|
||||||
|
if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_AI_CONTROL) )
|
||||||
|
return 0
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||||
|
if (!can_radio()) return
|
||||||
|
|
||||||
if(!signal || signal.encryption) return
|
if(!signal || signal.encryption) return
|
||||||
|
|
||||||
if(id_tag != signal.data["tag"] || !signal.data["command"]) return
|
if(id_tag != signal.data["tag"] || !signal.data["command"]) return
|
||||||
|
|
||||||
switch(signal.data["command"])
|
switch(signal.data["command"])
|
||||||
if("open")
|
if("open")
|
||||||
open(1)
|
open()
|
||||||
|
|
||||||
if("close")
|
if("close")
|
||||||
close(1)
|
close()
|
||||||
|
|
||||||
if("unlock")
|
if("unlock")
|
||||||
locked = 0
|
unlock()
|
||||||
update_icon()
|
|
||||||
|
|
||||||
if("lock")
|
if("lock")
|
||||||
locked = 1
|
lock()
|
||||||
update_icon()
|
|
||||||
|
|
||||||
if("secure_open")
|
if("secure_open")
|
||||||
locked = 0
|
unlock()
|
||||||
update_icon()
|
|
||||||
|
|
||||||
sleep(2)
|
sleep(2)
|
||||||
open(1)
|
open()
|
||||||
|
|
||||||
locked = 1
|
lock()
|
||||||
update_icon()
|
|
||||||
|
|
||||||
if("secure_close")
|
if("secure_close")
|
||||||
locked = 0
|
unlock()
|
||||||
close(1)
|
close()
|
||||||
|
|
||||||
locked = 1
|
lock()
|
||||||
sleep(2)
|
sleep(2)
|
||||||
update_icon()
|
|
||||||
|
|
||||||
send_status()
|
send_status()
|
||||||
|
|
||||||
|
|
||||||
obj/machinery/door/airlock/proc/send_status()
|
obj/machinery/door/airlock/proc/send_status()
|
||||||
|
if (!can_radio()) return
|
||||||
|
|
||||||
if(radio_connection)
|
if(radio_connection)
|
||||||
var/datum/signal/signal = new
|
var/datum/signal/signal = new
|
||||||
signal.transmission_method = 1 //radio signal
|
signal.transmission_method = 1 //radio signal
|
||||||
@@ -192,10 +192,13 @@
|
|||||||
response_sent = 0
|
response_sent = 0
|
||||||
override_enabled = 0
|
override_enabled = 0
|
||||||
|
|
||||||
//returns 1 if we are saftely undocked (and the shuttle can leave)
|
|
||||||
/datum/computer/file/embedded_program/docking/proc/undocked()
|
/datum/computer/file/embedded_program/docking/proc/undocked()
|
||||||
return (dock_state == STATE_UNDOCKED)
|
return (dock_state == STATE_UNDOCKED)
|
||||||
|
|
||||||
|
//returns 1 if we are saftely undocked (and the shuttle can leave)
|
||||||
|
/datum/computer/file/embedded_program/docking/proc/can_launch()
|
||||||
|
return undocked()
|
||||||
|
|
||||||
/datum/computer/file/embedded_program/docking/proc/send_docking_command(var/recipient, var/command)
|
/datum/computer/file/embedded_program/docking/proc/send_docking_command(var/recipient, var/command)
|
||||||
var/datum/signal/signal = new
|
var/datum/signal/signal = new
|
||||||
signal.data["tag"] = id_tag
|
signal.data["tag"] = id_tag
|
||||||
|
|||||||
@@ -1928,7 +1928,7 @@
|
|||||||
feedback_inc("admin_secrets_fun_used",1)
|
feedback_inc("admin_secrets_fun_used",1)
|
||||||
feedback_add_details("admin_secrets_fun_used","ShA")
|
feedback_add_details("admin_secrets_fun_used","ShA")
|
||||||
|
|
||||||
var/shuttle_tag = input("Which shuttle do you want to call?") as null|anything in shuttles.locations
|
var/shuttle_tag = input("Which shuttle do you want to call?") as null|anything in shuttles.location
|
||||||
|
|
||||||
if(shuttle_tag && !shuttles.moving[shuttle_tag])
|
if(shuttle_tag && !shuttles.moving[shuttle_tag])
|
||||||
shuttles.jump_shuttle(shuttle_tag)
|
shuttles.jump_shuttle(shuttle_tag)
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
//These lists are populated in /datum/shuttle_controller/New()
|
//These lists are populated in /datum/shuttle_controller/New()
|
||||||
//Shuttle controller is instantiated in master_controller.dm.
|
//Shuttle controller is instantiated in master_controller.dm.
|
||||||
|
|
||||||
#define STATUS_IDLE
|
#define SHUTTLE_IDLE 0
|
||||||
#define STATUS_WARMUP
|
#define SHUTTLE_WARMUP 1
|
||||||
#define STATUS_INTRANSIT
|
#define SHUTTLE_INTRANSIT 2
|
||||||
|
|
||||||
var/global/datum/shuttle_controller/shuttles
|
var/global/datum/shuttle_controller/shuttles
|
||||||
|
|
||||||
/datum/shuttle_controller //This isn't really a controller...
|
/datum/shuttle_controller //This isn't really a controller...
|
||||||
var/list/locations = list()
|
var/list/location = list()
|
||||||
var/list/warmup = list()
|
var/list/warmup = list()
|
||||||
var/list/moving = list()
|
var/list/moving = list()
|
||||||
var/list/areas_offsite = list()
|
var/list/areas_offsite = list()
|
||||||
@@ -26,53 +26,53 @@ var/global/datum/shuttle_controller/shuttles
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
//Supply and escape shuttles.
|
//Supply and escape shuttles.
|
||||||
locations["Supply"] = 1
|
location["Supply"] = 1
|
||||||
warmup["Supply"] = 0
|
warmup["Supply"] = 0
|
||||||
moving["Supply"] = STATUS_IDLE
|
moving["Supply"] = SHUTTLE_IDLE
|
||||||
areas_offsite["Supply"] = locate(/area/supply/dock)
|
areas_offsite["Supply"] = locate(/area/supply/dock)
|
||||||
areas_station["Supply"] = locate(/area/supply/station)
|
areas_station["Supply"] = locate(/area/supply/station)
|
||||||
docking_targets["Supply"] = list(null, null)
|
docking_targets["Supply"] = list(null, null)
|
||||||
|
|
||||||
// Admin shuttles.
|
// Admin shuttles.
|
||||||
locations["Centcom"] = 1
|
location["Centcom"] = 1
|
||||||
warmup["Centcom"] = 0
|
warmup["Centcom"] = 0
|
||||||
moving["Centcom"] = STATUS_IDLE
|
moving["Centcom"] = SHUTTLE_IDLE
|
||||||
areas_offsite["Centcom"] = locate(/area/shuttle/transport1/centcom)
|
areas_offsite["Centcom"] = locate(/area/shuttle/transport1/centcom)
|
||||||
areas_station["Centcom"] = locate(/area/shuttle/transport1/station)
|
areas_station["Centcom"] = locate(/area/shuttle/transport1/station)
|
||||||
docking_targets["Centcom"] = list(null, null)
|
docking_targets["Centcom"] = list(null, null)
|
||||||
|
|
||||||
locations["Administration"] = 1
|
location["Administration"] = 1
|
||||||
warmup["Administration"] = 0
|
warmup["Administration"] = 0
|
||||||
moving["Administration"] = STATUS_IDLE
|
moving["Administration"] = SHUTTLE_IDLE
|
||||||
areas_offsite["Administration"] = locate(/area/shuttle/administration/centcom)
|
areas_offsite["Administration"] = locate(/area/shuttle/administration/centcom)
|
||||||
areas_station["Administration"] = locate(/area/shuttle/administration/station)
|
areas_station["Administration"] = locate(/area/shuttle/administration/station)
|
||||||
docking_targets["Administration"] = list(null, null)
|
docking_targets["Administration"] = list(null, null)
|
||||||
|
|
||||||
locations["Alien"] = 0
|
location["Alien"] = 0
|
||||||
warmup["Alien"] = 0
|
warmup["Alien"] = 0
|
||||||
moving["Alien"] = STATUS_IDLE
|
moving["Alien"] = SHUTTLE_IDLE
|
||||||
areas_offsite["Alien"] = locate(/area/shuttle/alien/base)
|
areas_offsite["Alien"] = locate(/area/shuttle/alien/base)
|
||||||
areas_station["Alien"] = locate(/area/shuttle/alien/mine)
|
areas_station["Alien"] = locate(/area/shuttle/alien/mine)
|
||||||
docking_targets["Alien"] = list(null, null)
|
docking_targets["Alien"] = list(null, null)
|
||||||
|
|
||||||
// Public shuttles.
|
// Public shuttles.
|
||||||
locations["Engineering"] = 1
|
location["Engineering"] = 1
|
||||||
warmup["Engineering"] = 10
|
warmup["Engineering"] = 10
|
||||||
moving["Engineering"] = STATUS_IDLE
|
moving["Engineering"] = SHUTTLE_IDLE
|
||||||
areas_offsite["Engineering"] = locate(/area/shuttle/constructionsite/site)
|
areas_offsite["Engineering"] = locate(/area/shuttle/constructionsite/site)
|
||||||
areas_station["Engineering"] = locate(/area/shuttle/constructionsite/station)
|
areas_station["Engineering"] = locate(/area/shuttle/constructionsite/station)
|
||||||
docking_targets["Engineering"] = list(null, null)
|
docking_targets["Engineering"] = list(null, null)
|
||||||
|
|
||||||
locations["Mining"] = 0
|
location["Mining"] = 0
|
||||||
warmup["Mining"] = 10
|
warmup["Mining"] = 10
|
||||||
moving["Mining"] = STATUS_IDLE
|
moving["Mining"] = SHUTTLE_IDLE
|
||||||
areas_offsite["Mining"] = locate(/area/shuttle/mining/outpost)
|
areas_offsite["Mining"] = locate(/area/shuttle/mining/outpost)
|
||||||
areas_station["Mining"] = locate(/area/shuttle/mining/station)
|
areas_station["Mining"] = locate(/area/shuttle/mining/station)
|
||||||
docking_targets["Mining"] = list(null, null)
|
docking_targets["Mining"] = list(null, null)
|
||||||
|
|
||||||
locations["Research"] = 0
|
location["Research"] = 0
|
||||||
warmup["Research"] = 10
|
warmup["Research"] = 10
|
||||||
moving["Research"] = STATUS_IDLE
|
moving["Research"] = SHUTTLE_IDLE
|
||||||
areas_offsite["Research"] = locate(/area/shuttle/research/outpost)
|
areas_offsite["Research"] = locate(/area/shuttle/research/outpost)
|
||||||
areas_station["Research"] = locate(/area/shuttle/research/station)
|
areas_station["Research"] = locate(/area/shuttle/research/station)
|
||||||
docking_targets["Research"] = list("research_dock_airlock", "research_dock_airlock")
|
docking_targets["Research"] = list("research_dock_airlock", "research_dock_airlock")
|
||||||
@@ -95,9 +95,9 @@ var/global/datum/shuttle_controller/shuttles
|
|||||||
VS.interim = /area/vox_station/transit
|
VS.interim = /area/vox_station/transit
|
||||||
|
|
||||||
multi_shuttles["Vox Skipjack"] = VS
|
multi_shuttles["Vox Skipjack"] = VS
|
||||||
locations["Vox Skipjack"] = 1
|
location["Vox Skipjack"] = 1
|
||||||
warmup["Vox Skipjack"] = 10
|
warmup["Vox Skipjack"] = 10
|
||||||
moving["Vox Skipjack"] = STATUS_IDLE
|
moving["Vox Skipjack"] = SHUTTLE_IDLE
|
||||||
|
|
||||||
//Nuke Ops shuttle.
|
//Nuke Ops shuttle.
|
||||||
var/datum/multi_shuttle/MS = new
|
var/datum/multi_shuttle/MS = new
|
||||||
@@ -120,24 +120,24 @@ var/global/datum/shuttle_controller/shuttles
|
|||||||
MS.interim = /area/syndicate_station/transit
|
MS.interim = /area/syndicate_station/transit
|
||||||
|
|
||||||
multi_shuttles["Syndicate"] = MS
|
multi_shuttles["Syndicate"] = MS
|
||||||
locations["Syndicate"] = 1
|
location["Syndicate"] = 1
|
||||||
warmup["Syndicate"] = 10
|
warmup["Syndicate"] = 10
|
||||||
moving["Syndicate"] = STATUS_IDLE
|
moving["Syndicate"] = SHUTTLE_IDLE
|
||||||
|
|
||||||
|
|
||||||
/datum/shuttle_controller/proc/jump_shuttle(var/shuttle_tag,var/area/origin,var/area/destination)
|
/datum/shuttle_controller/proc/jump_shuttle(var/shuttle_tag,var/area/origin,var/area/destination)
|
||||||
if(moving[shuttle_tag] != STATUS_IDLE) return
|
if(moving[shuttle_tag] != SHUTTLE_IDLE) return
|
||||||
|
|
||||||
moving[shuttle_tag] = STATUS_WARMUP
|
moving[shuttle_tag] = SHUTTLE_WARMUP
|
||||||
spawn(warmup[shuttle_tag]*10)
|
spawn(warmup[shuttle_tag]*10)
|
||||||
move_shuttle(shuttle_tag, origin, destination)
|
move_shuttle(shuttle_tag, origin, destination)
|
||||||
moving[shuttle_tag] = STATUS_IDLE
|
moving[shuttle_tag] = SHUTTLE_IDLE
|
||||||
|
|
||||||
//This is for shuttles with a timer before arrival such as the vox skipjack and the escape shuttle.
|
//This is for shuttles with a timer before arrival such as the vox skipjack and the escape shuttle.
|
||||||
/datum/shuttle_controller/proc/jump_shuttle_long(var/shuttle_tag,var/area/departing,var/area/destination,var/area/interim,var/travel_time)
|
/datum/shuttle_controller/proc/jump_shuttle_long(var/shuttle_tag,var/area/departing,var/area/destination,var/area/interim,var/travel_time)
|
||||||
if(moving[shuttle_tag] != STATUS_IDLE) return
|
if(moving[shuttle_tag] != SHUTTLE_IDLE) return
|
||||||
|
|
||||||
moving[shuttle_tag] = STATUS_WARMUP
|
moving[shuttle_tag] = SHUTTLE_WARMUP
|
||||||
|
|
||||||
spawn(warmup[shuttle_tag]*10)
|
spawn(warmup[shuttle_tag]*10)
|
||||||
move_shuttle(shuttle_tag,locate(departing),locate(interim))
|
move_shuttle(shuttle_tag,locate(departing),locate(interim))
|
||||||
@@ -146,7 +146,7 @@ var/global/datum/shuttle_controller/shuttles
|
|||||||
|
|
||||||
move_shuttle(shuttle_tag,locate(interim),locate(destination))
|
move_shuttle(shuttle_tag,locate(interim),locate(destination))
|
||||||
|
|
||||||
moving[shuttle_tag] = STATUS_IDLE
|
moving[shuttle_tag] = SHUTTLE_IDLE
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ var/global/datum/shuttle_controller/shuttles
|
|||||||
/datum/shuttle_controller/proc/move_shuttle(var/shuttle_tag,var/area/origin,var/area/destination)
|
/datum/shuttle_controller/proc/move_shuttle(var/shuttle_tag,var/area/origin,var/area/destination)
|
||||||
|
|
||||||
//world << "move_shuttle() called for [shuttle_tag] leaving [origin] en route to [destination]."
|
//world << "move_shuttle() called for [shuttle_tag] leaving [origin] en route to [destination]."
|
||||||
if(!shuttle_tag || isnull(locations[shuttle_tag]))
|
if(!shuttle_tag || isnull(location[shuttle_tag]))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/area/area_going_to
|
var/area/area_going_to
|
||||||
@@ -163,16 +163,16 @@ var/global/datum/shuttle_controller/shuttles
|
|||||||
//world << "Using supplied destination [destination]."
|
//world << "Using supplied destination [destination]."
|
||||||
area_going_to = destination
|
area_going_to = destination
|
||||||
else
|
else
|
||||||
//world << "Using controller value [(locations[shuttle_tag] == 1 ? areas_station[shuttle_tag] : areas_offsite[shuttle_tag])]."
|
//world << "Using controller value [(location[shuttle_tag] == 1 ? areas_station[shuttle_tag] : areas_offsite[shuttle_tag])]."
|
||||||
area_going_to = (locations[shuttle_tag] == 1 ? areas_station[shuttle_tag] : areas_offsite[shuttle_tag])
|
area_going_to = (location[shuttle_tag] == 1 ? areas_station[shuttle_tag] : areas_offsite[shuttle_tag])
|
||||||
|
|
||||||
var/area/area_coming_from
|
var/area/area_coming_from
|
||||||
if(origin)
|
if(origin)
|
||||||
//world << "Using supplied origin [origin]."
|
//world << "Using supplied origin [origin]."
|
||||||
area_coming_from = origin
|
area_coming_from = origin
|
||||||
else
|
else
|
||||||
//world << "Using controller value [(locations[shuttle_tag] == 1 ? areas_offsite[shuttle_tag] : areas_station[shuttle_tag])]."
|
//world << "Using controller value [(location[shuttle_tag] == 1 ? areas_offsite[shuttle_tag] : areas_station[shuttle_tag])]."
|
||||||
area_coming_from = (locations[shuttle_tag] == 1 ? areas_offsite[shuttle_tag] : areas_station[shuttle_tag])
|
area_coming_from = (location[shuttle_tag] == 1 ? areas_offsite[shuttle_tag] : areas_station[shuttle_tag])
|
||||||
|
|
||||||
//world << "area_coming_from: [area_coming_from]"
|
//world << "area_coming_from: [area_coming_from]"
|
||||||
//world << "area_going_to: [area_going_to]"
|
//world << "area_going_to: [area_going_to]"
|
||||||
@@ -181,7 +181,7 @@ var/global/datum/shuttle_controller/shuttles
|
|||||||
//world << "cancelling move, shuttle will overlap."
|
//world << "cancelling move, shuttle will overlap."
|
||||||
return
|
return
|
||||||
|
|
||||||
moving[shuttle_tag] = STATUS_INTRANSIT
|
moving[shuttle_tag] = SHUTTLE_INTRANSIT
|
||||||
|
|
||||||
var/list/dstturfs = list()
|
var/list/dstturfs = list()
|
||||||
var/throwy = world.maxy
|
var/throwy = world.maxy
|
||||||
@@ -206,7 +206,7 @@ var/global/datum/shuttle_controller/shuttles
|
|||||||
|
|
||||||
area_coming_from.move_contents_to(area_going_to)
|
area_coming_from.move_contents_to(area_going_to)
|
||||||
|
|
||||||
locations[shuttle_tag] = !locations[shuttle_tag]
|
location[shuttle_tag] = !location[shuttle_tag]
|
||||||
|
|
||||||
for(var/mob/M in area_going_to)
|
for(var/mob/M in area_going_to)
|
||||||
if(M.client)
|
if(M.client)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/obj/machinery/computer/shuttle_control
|
/obj/machinery/computer/shuttle_control
|
||||||
name = "shuttle console"
|
name = "shuttle control console"
|
||||||
icon = 'icons/obj/computer.dmi'
|
icon = 'icons/obj/computer.dmi'
|
||||||
icon_state = "shuttle"
|
icon_state = "shuttle"
|
||||||
req_access = list(access_engine)
|
req_access = list(access_engine)
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
var/datum/computer/file/embedded_program/docking/docking_controller //the controller itself
|
var/datum/computer/file/embedded_program/docking/docking_controller //the controller itself
|
||||||
var/hacked = 0 // Has been emagged, no access restrictions.
|
var/hacked = 0 // Has been emagged, no access restrictions.
|
||||||
var/waiting = 0
|
var/wait_for_launch = 0
|
||||||
|
|
||||||
/obj/machinery/computer/shuttle_control/initialize()
|
/obj/machinery/computer/shuttle_control/initialize()
|
||||||
//search for our controller, if we have one.
|
//search for our controller, if we have one.
|
||||||
@@ -20,11 +20,21 @@
|
|||||||
if (C.id_tag == docking_controller_tag && istype(C.program, /datum/computer/file/embedded_program/docking))
|
if (C.id_tag == docking_controller_tag && istype(C.program, /datum/computer/file/embedded_program/docking))
|
||||||
docking_controller = C.program
|
docking_controller = C.program
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/process()
|
||||||
|
if (wait_for_launch)
|
||||||
|
if (docking_controller && docking_controller.can_launch())
|
||||||
|
shuttles.jump_shuttle(shuttle_tag)
|
||||||
|
wait_for_launch = 0
|
||||||
|
|
||||||
|
/*
|
||||||
/obj/machinery/computer/shuttle_control/attack_hand(user as mob)
|
/obj/machinery/computer/shuttle_control/attack_hand(user as mob)
|
||||||
|
|
||||||
if(..(user))
|
if(..(user))
|
||||||
return
|
return
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
|
|
||||||
|
//ui_interact()
|
||||||
|
|
||||||
var/dat
|
var/dat
|
||||||
|
|
||||||
dat = "<center>[shuttle_tag] Shuttle Control<hr>"
|
dat = "<center>[shuttle_tag] Shuttle Control<hr>"
|
||||||
@@ -32,12 +42,47 @@
|
|||||||
if(waiting || shuttles.moving[shuttle_tag])
|
if(waiting || shuttles.moving[shuttle_tag])
|
||||||
dat += "Location: <font color='red'>Moving</font> <br>"
|
dat += "Location: <font color='red'>Moving</font> <br>"
|
||||||
else
|
else
|
||||||
dat += "Location: [shuttles.locations[shuttle_tag] ? "Offsite" : "Station"] <br>"
|
dat += "Location: [shuttles.location[shuttle_tag] ? "Offsite" : "Station"] <br>"
|
||||||
|
|
||||||
dat += "<b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>"
|
dat += "<b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>"
|
||||||
|
|
||||||
|
|
||||||
user << browse("[dat]", "window=[shuttle_tag]shuttlecontrol;size=200x150")
|
user << browse("[dat]", "window=[shuttle_tag]shuttlecontrol;size=200x150")
|
||||||
|
*/
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||||
|
var/data[0]
|
||||||
|
|
||||||
|
var/shuttle_state
|
||||||
|
switch(shuttles.moving[shuttle_tag])
|
||||||
|
if(SHUTTLE_IDLE) shuttle_state = "idle"
|
||||||
|
if(SHUTTLE_WARMUP) shuttle_state = "warmup"
|
||||||
|
if(SHUTTLE_INTRANSIT) shuttle_state = "in_transit"
|
||||||
|
|
||||||
|
if (docking_controller)
|
||||||
|
data = list(
|
||||||
|
"shuttle_state" = shuttle_state,
|
||||||
|
"shuttle_loc" = shuttles.location[shuttle_tag],
|
||||||
|
"has_docking" = 1,
|
||||||
|
"docking_status" = docking_controller.get_docking_status(),
|
||||||
|
"override_enabled" = docking_controller.override_enabled,
|
||||||
|
)
|
||||||
|
else
|
||||||
|
data = list(
|
||||||
|
"shuttle_state" = shuttle_state,
|
||||||
|
"shuttle_loc" = shuttles.location[shuttle_tag],
|
||||||
|
"has_docking" = 0,
|
||||||
|
"docking_status" = null,
|
||||||
|
"override_enabled" = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||||
|
|
||||||
|
if (!ui)
|
||||||
|
ui = new(user, src, ui_key, "shuttle_control_console.tmpl", "[shuttle_tag] Shuttle Control", 470, 290)
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
ui.set_auto_update(1)
|
||||||
|
|
||||||
/obj/machinery/computer/shuttle_control/Topic(href, href_list)
|
/obj/machinery/computer/shuttle_control/Topic(href, href_list)
|
||||||
if(..())
|
if(..())
|
||||||
@@ -48,7 +93,7 @@
|
|||||||
if(href_list["move"])
|
if(href_list["move"])
|
||||||
if (!shuttles.moving[shuttle_tag])
|
if (!shuttles.moving[shuttle_tag])
|
||||||
usr << "\blue [shuttle_tag] Shuttle recieved message and will be sent shortly."
|
usr << "\blue [shuttle_tag] Shuttle recieved message and will be sent shortly."
|
||||||
shuttles.move_shuttle(shuttle_tag)
|
wait_for_launch = 1
|
||||||
else
|
else
|
||||||
usr << "\blue [shuttle_tag] Shuttle is already moving."
|
usr << "\blue [shuttle_tag] Shuttle is already moving."
|
||||||
|
|
||||||
@@ -70,7 +115,7 @@
|
|||||||
var/list/setup_complete = list() //so we dont setup the same shuttle repeatedly
|
var/list/setup_complete = list() //so we dont setup the same shuttle repeatedly
|
||||||
|
|
||||||
for (var/obj/machinery/computer/shuttle_control/S in machines)
|
for (var/obj/machinery/computer/shuttle_control/S in machines)
|
||||||
var/location = shuttles.locations[S.shuttle_tag]
|
var/location = shuttles.location[S.shuttle_tag]
|
||||||
var/dock_target = shuttles.docking_targets[S.shuttle_tag][location+1] //damned byond is 1-indexed - don't forget
|
var/dock_target = shuttles.docking_targets[S.shuttle_tag][location+1] //damned byond is 1-indexed - don't forget
|
||||||
|
|
||||||
if (!(S.shuttle_tag in setup_complete) && S.docking_controller && dock_target)
|
if (!(S.shuttle_tag in setup_complete) && S.docking_controller && dock_target)
|
||||||
|
|||||||
@@ -177,6 +177,12 @@ h4 {
|
|||||||
color: #ee0000;
|
color: #ee0000;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.idle {
|
||||||
|
color: #272727;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.redBackground {
|
.redBackground {
|
||||||
background: #ea0000;
|
background: #ea0000;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{else docking_status == "undocked"}}
|
{{else docking_status == "undocked"}}
|
||||||
<span class="dark" style="font-weight: bold">NOT IN USE</span>
|
<span class="idle">NOT IN USE</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="bad">ERROR</span>
|
<span class="bad">ERROR</span>
|
||||||
{{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, airlock_disabled ? null : 'redBackground')}}
|
{{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, airlock_disabled ? null : 'redBackground')}}
|
||||||
|
|||||||
74
nano/templates/shuttle_control_console.tmpl
Normal file
74
nano/templates/shuttle_control_console.tmpl
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<h3>Shuttle Status</h3>
|
||||||
|
<div class="item" style="padding-top: 10px">
|
||||||
|
<div class="item">
|
||||||
|
<div class="itemLabel">
|
||||||
|
Shuttle Location:
|
||||||
|
</div>
|
||||||
|
<div class="itemContent">
|
||||||
|
{{if !shuttle_loc}}
|
||||||
|
At station
|
||||||
|
{{else}}
|
||||||
|
Offsite
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item" style="padding-top: 10px">
|
||||||
|
<div class="item">
|
||||||
|
<div class="itemLabel">
|
||||||
|
Bluespace Drive:
|
||||||
|
</div>
|
||||||
|
<div class="itemContent">
|
||||||
|
{{if shuttle_state == "idle"}}
|
||||||
|
<span style="idle">IDLE</span>
|
||||||
|
{{else shuttle_state == "warmup"}}
|
||||||
|
<span style="font-weight: bold;color: blue">SPINNING UP</span>
|
||||||
|
{{else shuttle_state == "in_transit"}}
|
||||||
|
<span style="font-weight: bold;color: blue">ENGAGED</span>
|
||||||
|
{{else}}
|
||||||
|
<span style="bad">ERROR</span>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{if has_docking}}
|
||||||
|
<div class="item" style="padding-top: 10px">
|
||||||
|
<div class="item">
|
||||||
|
<div class="itemLabel">
|
||||||
|
Docking Status:
|
||||||
|
</div>
|
||||||
|
<div class="itemContent">
|
||||||
|
{{if docking_status == "docked"}}
|
||||||
|
<span class="good">DOCKED</span>
|
||||||
|
{{else docking_status == "docking"}}
|
||||||
|
<span class="average">DOCKING</span>
|
||||||
|
{{else docking_status == "undocking"}}
|
||||||
|
<span class="average">UNDOCKING</span>
|
||||||
|
{{else docking_status == "undocked"}}
|
||||||
|
<span class="idle">UNDOCKED</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="bad">ERROR</span>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item" style="padding-top: 10px">
|
||||||
|
<div class="item">
|
||||||
|
<div class="itemLabel">
|
||||||
|
Docking Override:
|
||||||
|
</div>
|
||||||
|
<div class="itemContent">
|
||||||
|
<span class="good">SAFE</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<h3>Shuttle Control</h3>
|
||||||
|
<div class="item" style="padding-top: 10px">
|
||||||
|
<div class="item">
|
||||||
|
<div class="itemContent" style="padding-top: 2px; width: 100%">
|
||||||
|
{{:~link('Launch Shuttle', 'alert', {'move' : '1'}, null : null)}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -1,36 +1,49 @@
|
|||||||
<div class="item" style="padding-top: 10px">
|
<div class="item" style="padding-top: 10px">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="itemLabel">
|
<div class="itemLabel">
|
||||||
Chamber Pressure:
|
Docking Port Status:
|
||||||
</div>
|
</div>
|
||||||
<div class="itemContent">
|
<div class="itemContent">
|
||||||
{{:~displayBar(chamber_pressure, 0, 200, chamber_pressure < 80 || chamber_pressure > 120 ? 'bad' : chamber_pressure < 95 || chamber_pressure > 110 ? 'average' : 'good')}}
|
{{if docking_status == "docked"}}
|
||||||
<div class="statusValue">
|
{{if !override_enabled}}
|
||||||
{{:chamber_pressure}} kPa
|
<span class="good">DOCKED</span>
|
||||||
</div>
|
{{else}}
|
||||||
|
<span class="bad">DOCKED-OVERRIDE ENABLED</span>
|
||||||
|
{{/if}}
|
||||||
|
{{else docking_status == "docking"}}
|
||||||
|
{{if !override_enabled}}
|
||||||
|
<span class="average">DOCKING</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="bad">DOCKING-OVERRIDE ENABLED</span>
|
||||||
|
{{/if}}
|
||||||
|
{{else docking_status == "undocking"}}
|
||||||
|
{{if !override_enabled}}
|
||||||
|
<span class="average">UNDOCKING</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="bad">UNDOCKING-OVERRIDE ENABLED</span>
|
||||||
|
{{/if}}
|
||||||
|
{{else docking_status == "undocked"}}
|
||||||
|
{{if !override_enabled}}
|
||||||
|
<span class="dark" style="font-weight: bold">UNDOCKED</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="bad">UNDOCKED-OVERRIDE ENABLED</span>
|
||||||
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<span class="bad">ERROR</span>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" style="padding-top: 10px">
|
<div class="item" style="padding-top: 10px">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="itemContent" style="width: 100%">
|
|
||||||
{{:~link('Cycle to Exterior', 'arrowthickstop-1-w', {'command' : 'cycle_ext'}, processing ? 'disabled' : null)}}
|
|
||||||
{{:~link('Cycle to Interior', 'arrowthickstop-1-e', {'command' : 'cycle_int'}, processing ? 'disabled' : null)}}
|
|
||||||
</div>
|
|
||||||
<div class="itemContent" style="padding-top: 2px; width: 100%">
|
<div class="itemContent" style="padding-top: 2px; width: 100%">
|
||||||
{{if interior_status.state == "open"}}
|
{{if docking_status == "docked"}}
|
||||||
{{:~link('Force exterior door', 'alert', {'command' : 'force_ext'}, null, 'redBackground')}}
|
{{:~link('Force exterior door', 'alert', {'command' : 'force_door'}, override_enabled ? null : 'disabled', null)}}
|
||||||
|
{{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, override_enabled ? 'redBackground' : null)}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:~link('Force exterior door', 'alert', {'command' : 'force_ext'}, null, processing ? 'yellowBackground' : null)}}
|
{{:~link('Force exterior door', 'alert', {'command' : 'force_door'}, override_enabled ? null : 'disabled', override_enabled? 'redBackground' : null)}}
|
||||||
{{/if}}
|
{{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, override_enabled ? 'redBackground' : 'yellowBackground')}}
|
||||||
{{if exterior_status.state == "open"}}
|
|
||||||
{{:~link('Force interior door', 'alert', {'command' : 'force_int'}, null, 'redBackground')}}
|
|
||||||
{{else}}
|
|
||||||
{{:~link('Force interior door', 'alert', {'command' : 'force_int'}, null, processing ? 'yellowBackground' : null)}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" style="padding-top: 10px; width: 100%">
|
|
||||||
{{:~link('Abort', 'cancel', {'command' : 'abort'}, processing ? null : 'disabled', processing ? 'redBackground' : null)}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{else docking_status == "undocked"}}
|
{{else docking_status == "undocked"}}
|
||||||
{{if !override_enabled}}
|
{{if !override_enabled}}
|
||||||
<span class="dark" style="font-weight: bold">UNDOCKED</span>
|
<span class="idle">UNDOCKED</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="bad">UNDOCKED-OVERRIDE ENABLED</span>
|
<span class="bad">UNDOCKED-OVERRIDE ENABLED</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
Reference in New Issue
Block a user