mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Wait, this wasn't accessible anyways.
This commit is contained in:
@@ -175,84 +175,3 @@
|
|||||||
/obj/machinery/computer/shuttle_control/emergency/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/machinery/computer/shuttle_control/emergency/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
read_authorization(W)
|
read_authorization(W)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/computer/shuttle_control/emergency/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
|
||||||
var/data[0]
|
|
||||||
var/datum/shuttle/autodock/ferry/emergency/shuttle = SSshuttles.shuttles[shuttle_tag]
|
|
||||||
if (!istype(shuttle))
|
|
||||||
return
|
|
||||||
|
|
||||||
var/shuttle_state
|
|
||||||
switch(shuttle.moving_status)
|
|
||||||
if(SHUTTLE_IDLE) shuttle_state = "idle"
|
|
||||||
if(SHUTTLE_WARMUP) shuttle_state = "warmup"
|
|
||||||
if(SHUTTLE_INTRANSIT) shuttle_state = "in_transit"
|
|
||||||
|
|
||||||
var/shuttle_status
|
|
||||||
switch (shuttle.process_state)
|
|
||||||
if(IDLE_STATE)
|
|
||||||
if (shuttle.in_use)
|
|
||||||
shuttle_status = "Busy."
|
|
||||||
else if (!shuttle.location)
|
|
||||||
shuttle_status = "Standing by at [station_name()]."
|
|
||||||
else
|
|
||||||
shuttle_status = "Standing by at [using_map.dock_name]."
|
|
||||||
if(WAIT_LAUNCH, FORCE_LAUNCH)
|
|
||||||
shuttle_status = "Shuttle has received command and will depart shortly."
|
|
||||||
if(WAIT_ARRIVE)
|
|
||||||
shuttle_status = "Proceeding to destination."
|
|
||||||
if(WAIT_FINISH)
|
|
||||||
shuttle_status = "Arriving at destination now."
|
|
||||||
|
|
||||||
//build a list of authorizations
|
|
||||||
var/list/auth_list[req_authorizations]
|
|
||||||
|
|
||||||
if (!emagged)
|
|
||||||
var/i = 1
|
|
||||||
for (var/dna_hash in authorized)
|
|
||||||
auth_list[i++] = list("auth_name"=authorized[dna_hash], "auth_hash"=dna_hash)
|
|
||||||
|
|
||||||
while (i <= req_authorizations) //fill up the rest of the list with blank entries
|
|
||||||
auth_list[i++] = list("auth_name"="", "auth_hash"=null)
|
|
||||||
else
|
|
||||||
for (var/i = 1; i <= req_authorizations; i++)
|
|
||||||
auth_list[i] = list("auth_name"="<font color=\"red\">ERROR</font>", "auth_hash"=null)
|
|
||||||
|
|
||||||
var/has_auth = has_authorization()
|
|
||||||
|
|
||||||
data = list(
|
|
||||||
"shuttle_status" = shuttle_status,
|
|
||||||
"shuttle_state" = shuttle_state,
|
|
||||||
"has_docking" = shuttle.active_docking_controller? 1 : 0,
|
|
||||||
"docking_status" = shuttle.active_docking_controller? shuttle.active_docking_controller.get_docking_status() : null,
|
|
||||||
"docking_override" = shuttle.active_docking_controller? shuttle.active_docking_controller.override_enabled : null,
|
|
||||||
"can_launch" = shuttle.can_launch(src),
|
|
||||||
"can_cancel" = shuttle.can_cancel(src),
|
|
||||||
"can_force" = shuttle.can_force(src),
|
|
||||||
"auth_list" = auth_list,
|
|
||||||
"has_auth" = has_auth,
|
|
||||||
"user" = debug? user : null,
|
|
||||||
)
|
|
||||||
|
|
||||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
|
||||||
|
|
||||||
if (!ui)
|
|
||||||
ui = new(user, src, ui_key, "escape_shuttle_control_console.tmpl", "Shuttle Control", 470, 420)
|
|
||||||
ui.set_initial_data(data)
|
|
||||||
ui.open()
|
|
||||||
ui.set_auto_update(1)
|
|
||||||
|
|
||||||
/obj/machinery/computer/shuttle_control/emergency/Topic(href, href_list)
|
|
||||||
if(..())
|
|
||||||
return 1
|
|
||||||
|
|
||||||
if(href_list["removeid"])
|
|
||||||
var/dna_hash = href_list["removeid"]
|
|
||||||
authorized -= dna_hash
|
|
||||||
|
|
||||||
if(!emagged && href_list["scanid"])
|
|
||||||
//They selected an empty entry. Try to scan their id.
|
|
||||||
if (ishuman(usr))
|
|
||||||
var/mob/living/carbon/human/H = usr
|
|
||||||
if (!read_authorization(H.get_active_hand())) //try to read what's in their hand first
|
|
||||||
read_authorization(H.wear_id)
|
|
||||||
|
|||||||
@@ -1,84 +0,0 @@
|
|||||||
<h3>Shuttle Status</h3>
|
|
||||||
<div class="item" style="padding-top: 10px">
|
|
||||||
<div class="item">
|
|
||||||
{{:data.shuttle_status}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="item" style="padding-top: 10px">
|
|
||||||
<div class="item">
|
|
||||||
<div class="itemLabel">
|
|
||||||
Bluespace Drive:
|
|
||||||
</div>
|
|
||||||
<div class="itemContent">
|
|
||||||
{{if data.shuttle_state == "idle"}}
|
|
||||||
<span class="idle">IDLE</span>
|
|
||||||
{{else data.shuttle_state == "warmup"}}
|
|
||||||
<span style="font-weight: bold;color: #336699">SPINNING UP</span>
|
|
||||||
{{else data.shuttle_state == "in_transit"}}
|
|
||||||
<span style="font-weight: bold;color: #336699">ENGAGED</span>
|
|
||||||
{{else}}
|
|
||||||
<span class="bad">ERROR</span>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{if data.has_docking}}
|
|
||||||
<div class="item" style="padding-top: 10px">
|
|
||||||
<div class="item">
|
|
||||||
<div class="itemLabel">
|
|
||||||
Docking Status:
|
|
||||||
</div>
|
|
||||||
<div class="itemContent">
|
|
||||||
{{if data.docking_status == "docked"}}
|
|
||||||
<span class="good">DOCKED</span>
|
|
||||||
{{else data.docking_status == "docking"}}
|
|
||||||
{{if !data.docking_override}}
|
|
||||||
<span class="average">DOCKING</span>
|
|
||||||
{{else}}
|
|
||||||
<span class="average">DOCKING-MANUAL</span>
|
|
||||||
{{/if}}
|
|
||||||
{{else data.docking_status == "undocking"}}
|
|
||||||
{{if !data.docking_override}}
|
|
||||||
<span class="average">UNDOCKING</span>
|
|
||||||
{{else}}
|
|
||||||
<span class="average">UNDOCKING-MANUAL</span>
|
|
||||||
{{/if}}
|
|
||||||
{{else data.docking_status == "undocked"}}
|
|
||||||
<span class="idle">UNDOCKED</span>
|
|
||||||
{{else}}
|
|
||||||
<span class="bad">ERROR</span>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
<h3>Shuttle Authorization</h3>
|
|
||||||
<div class="item">
|
|
||||||
<div class="item">
|
|
||||||
{{if data.has_auth}}
|
|
||||||
Access Granted. Shuttle controls unlocked.
|
|
||||||
{{else}}
|
|
||||||
Additional authorization required.
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="item" style="padding-top: 10px">
|
|
||||||
{{for data.auth_list}}
|
|
||||||
{{if value.auth_hash}}
|
|
||||||
{{:helper.link(value.auth_name, 'eject', {'removeid' : value.auth_hash}, null, 'itemContentWide')}}
|
|
||||||
{{else}}
|
|
||||||
{{:helper.link("", 'eject', {'scanid' : 1}, null, 'itemContentWide')}}
|
|
||||||
{{/if}}
|
|
||||||
{{/for}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3>Shuttle Control</h3>
|
|
||||||
<div class="item" style="padding-top: 10px">
|
|
||||||
<div class="item">
|
|
||||||
<div class="itemContent" style="padding-top: 2px; width: 100%">
|
|
||||||
{{:helper.link('Launch Shuttle', 'arrowthickstop-1-e', {'move' : '1'}, data.can_launch ? null : 'disabled' , null)}}
|
|
||||||
{{:helper.link('Cancel Launch', 'cancel', {'cancel' : '1'}, data.can_cancel ? null : 'disabled' , null)}}
|
|
||||||
{{:helper.link('Force Launch', 'alert', {'force' : '1'}, data.can_force ? null : 'disabled' , data.can_force ? 'redButton' : null)}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
Reference in New Issue
Block a user