mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-29 19:42:42 +00:00
Calling the emergency shuttle now requires a physical button (#3509)
The emergency shuttle can now be called by using a physical button in a protected case. The option to call the emergency shuttle has been removed from the command and communications app. Also adds a framework for physical buttons in a protected case. The emergency shuttle button needs to be mapped in.
This commit is contained in:
@@ -51,6 +51,17 @@
|
||||
nano_printer.stored_paper = 20
|
||||
card_slot = new/obj/item/weapon/computer_hardware/card_slot(src)
|
||||
|
||||
/obj/item/modular_computer/console/preset/captain/
|
||||
_app_preset_name = "captain"
|
||||
enrolled = 1
|
||||
|
||||
/obj/item/modular_computer/console/preset/captain/install_default_hardware()
|
||||
..()
|
||||
nano_printer = new/obj/item/weapon/computer_hardware/nano_printer(src)
|
||||
nano_printer.max_paper = 25
|
||||
nano_printer.stored_paper = 20
|
||||
card_slot = new/obj/item/weapon/computer_hardware/card_slot(src)
|
||||
|
||||
// Security
|
||||
/obj/item/modular_computer/console/preset/security/
|
||||
_app_preset_name = "security"
|
||||
|
||||
@@ -78,6 +78,25 @@
|
||||
)
|
||||
return _prg_list
|
||||
|
||||
/datum/modular_computer_app_presets/captain
|
||||
name = "captain"
|
||||
display_name = "Captain"
|
||||
description = "Contains the most important programs for the Captain."
|
||||
available = 0
|
||||
/datum/modular_computer_app_presets/captain/return_install_programs()
|
||||
var/list/_prg_list = list(
|
||||
new/datum/computer_file/program/filemanager(),
|
||||
new/datum/computer_file/program/chatclient(),
|
||||
new/datum/computer_file/program/card_mod(),
|
||||
new/datum/computer_file/program/comm(1,1),
|
||||
new/datum/computer_file/program/camera_monitor(),
|
||||
new/datum/computer_file/program/digitalwarrant(),
|
||||
new/datum/computer_file/program/civilian/cargocontrol(),
|
||||
new/datum/computer_file/program/civilian/cargoorder(),
|
||||
new/datum/computer_file/program/alarm_monitor()
|
||||
)
|
||||
return _prg_list
|
||||
|
||||
/datum/modular_computer_app_presets/security
|
||||
name = "security"
|
||||
display_name = "Security"
|
||||
|
||||
@@ -17,11 +17,13 @@
|
||||
network_destination = "station long-range communication array"
|
||||
var/datum/comm_message_listener/message_core = new
|
||||
var/intercept = 0
|
||||
var/can_call_shuttle = 0 //If calling the shuttle should be available from this console
|
||||
color = LIGHT_COLOR_BLUE
|
||||
|
||||
/datum/computer_file/program/comm/New(intercept_printing = 0)
|
||||
/datum/computer_file/program/comm/New(intercept_printing = 0, shuttle_call = 0)
|
||||
. = ..()
|
||||
intercept = intercept_printing
|
||||
can_call_shuttle = shuttle_call
|
||||
|
||||
/datum/computer_file/program/comm/clone()
|
||||
var/datum/computer_file/program/comm/temp = ..()
|
||||
@@ -65,6 +67,7 @@
|
||||
data["have_printer"] = 0
|
||||
data["message_printing_intercepts"] = 0
|
||||
|
||||
data["can_call_shuttle"] = can_call_shuttle()
|
||||
data["message_line1"] = msg_line1
|
||||
data["message_line2"] = msg_line2
|
||||
data["state"] = current_status
|
||||
@@ -112,6 +115,13 @@
|
||||
return P.message_core
|
||||
return global_message_listener
|
||||
|
||||
/datum/nano_module/program/comm/proc/can_call_shuttle()
|
||||
if(program)
|
||||
var/datum/computer_file/program/comm/P = program
|
||||
return P.can_call_shuttle
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/nano_module/program/comm/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
@@ -180,7 +190,7 @@
|
||||
spawn(300) //30 second cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
if("shuttle")
|
||||
if(is_autenthicated(user) && ntn_cont)
|
||||
if(is_autenthicated(user) && ntn_cont && can_call_shuttle())
|
||||
if(href_list["target"] == "call")
|
||||
var/confirm = alert("Are you sure you want to call the shuttle?", name, "No", "Yes")
|
||||
if(confirm == "Yes" && can_still_topic())
|
||||
@@ -325,17 +335,19 @@ Command action procs
|
||||
|
||||
frequency.post_signal(src, status_signal)
|
||||
|
||||
//Returns 1 if recalled 0 if not
|
||||
/proc/cancel_call_proc(var/mob/user)
|
||||
if (!(ROUND_IS_STARTED) || !emergency_shuttle.can_recall())
|
||||
return
|
||||
return 0
|
||||
if((SSticker.mode.name == "blob")||(SSticker.mode.name == "Meteor"))
|
||||
return
|
||||
return 0
|
||||
|
||||
if(!emergency_shuttle.going_to_centcom()) //check that shuttle isn't already heading to centcomm
|
||||
emergency_shuttle.recall()
|
||||
log_game("[key_name(user)] has recalled the shuttle.",key_name(user))
|
||||
message_admins("[key_name_admin(user)] has recalled the shuttle.", 1)
|
||||
return
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/proc/is_relay_online()
|
||||
@@ -344,44 +356,44 @@ Command action procs
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Returns 1 if called 0 if not
|
||||
/proc/call_shuttle_proc(var/mob/user)
|
||||
if ((!(ROUND_IS_STARTED) || !emergency_shuttle.location()))
|
||||
return
|
||||
return 0
|
||||
|
||||
if(!universe.OnShuttleCall(usr))
|
||||
user << "<span class='notice'>Cannot establish a bluespace connection.</span>"
|
||||
return
|
||||
return 0
|
||||
|
||||
if(deathsquad.deployed)
|
||||
user << "[boss_short] will not allow the shuttle to be called. Consider all contracts terminated."
|
||||
return
|
||||
return 0
|
||||
|
||||
if(emergency_shuttle.deny_shuttle)
|
||||
user << "The emergency shuttle may not be sent at this time. Please try again later."
|
||||
return
|
||||
return 0
|
||||
|
||||
if(world.time < 6000) // Ten minute grace period to let the game get going without lolmetagaming. -- TLE
|
||||
user << "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minute\s before trying again."
|
||||
return
|
||||
return 0
|
||||
|
||||
if(emergency_shuttle.going_to_centcom())
|
||||
user << "The emergency shuttle may not be called while returning to [boss_short]."
|
||||
return
|
||||
return 0
|
||||
|
||||
if(emergency_shuttle.online())
|
||||
user << "The emergency shuttle is already on its way."
|
||||
return
|
||||
return 0
|
||||
|
||||
if(SSticker.mode.name == "blob")
|
||||
user << "Under directive 7-10, [station_name()] is quarantined until further notice."
|
||||
return
|
||||
return 0
|
||||
|
||||
emergency_shuttle.call_evac()
|
||||
log_game("[key_name(user)] has called the shuttle.",ckey=key_name(user))
|
||||
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
|
||||
|
||||
|
||||
return
|
||||
return 1
|
||||
|
||||
/proc/init_shift_change(var/mob/user, var/force = 0)
|
||||
if ((!(ROUND_IS_STARTED) || !emergency_shuttle.location()))
|
||||
|
||||
Reference in New Issue
Block a user