mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-12 08:27:13 +01:00
a small addition
This commit is contained in:
@@ -7,15 +7,15 @@
|
||||
required_access_run = access_change_ids
|
||||
required_access_download = access_change_ids
|
||||
usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP
|
||||
requires_ntnet = 0
|
||||
requires_ntnet = FALSE
|
||||
size = 8
|
||||
color = LIGHT_COLOR_BLUE
|
||||
|
||||
/datum/nano_module/program/card_mod
|
||||
name = "ID card modification program"
|
||||
var/mod_mode = 1
|
||||
var/is_centcom = 0
|
||||
var/show_assignments = 0
|
||||
var/mod_mode = TRUE
|
||||
var/is_centcom = FALSE
|
||||
var/show_assignments = FALSE
|
||||
|
||||
/datum/nano_module/program/card_mod/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||
var/list/data = host.initial_data()
|
||||
@@ -24,12 +24,12 @@
|
||||
data["station_name"] = station_name()
|
||||
data["manifest"] = SSrecords.get_manifest()
|
||||
data["assignments"] = show_assignments
|
||||
if(program && program.computer)
|
||||
if(program?.computer)
|
||||
data["have_id_slot"] = !!program.computer.card_slot
|
||||
data["have_printer"] = !!program.computer.nano_printer
|
||||
data["authenticated"] = program.can_run(user)
|
||||
if(!program.computer.card_slot)
|
||||
mod_mode = 0 //We can't modify IDs when there is no card reader
|
||||
mod_mode = FALSE //We can't modify IDs when there is no card reader
|
||||
else
|
||||
data["have_id_slot"] = 0
|
||||
data["have_printer"] = 0
|
||||
@@ -86,7 +86,7 @@
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "identification_computer.tmpl", name, 600, 700, state = state)
|
||||
ui.auto_update_layout = 1
|
||||
ui.auto_update_layout = TRUE
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
/datum/computer_file/program/card_mod/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
var/mob/user = usr
|
||||
var/obj/item/card/id/user_id_card = user.GetIdCard()
|
||||
@@ -116,16 +116,16 @@
|
||||
switch(href_list["action"])
|
||||
if("switchm")
|
||||
if(href_list["target"] == "mod")
|
||||
module.mod_mode = 1
|
||||
module.mod_mode = TRUE
|
||||
else if (href_list["target"] == "manifest")
|
||||
module.mod_mode = 0
|
||||
module.mod_mode = FALSE
|
||||
if("togglea")
|
||||
if(module.show_assignments)
|
||||
module.show_assignments = 0
|
||||
module.show_assignments = FALSE
|
||||
else
|
||||
module.show_assignments = 1
|
||||
module.show_assignments = TRUE
|
||||
if("print")
|
||||
if(computer && computer.nano_printer) //This option should never be called if there is no printer
|
||||
if(computer?.nano_printer) //This option should never be called if there is no printer
|
||||
if(module.mod_mode)
|
||||
if(can_run(user, 1))
|
||||
var/contents = {"<h4>Access Report</h4>
|
||||
@@ -144,20 +144,20 @@
|
||||
contents += " [get_access_desc(A)]"
|
||||
|
||||
if(!computer.nano_printer.print_text(contents,"access report"))
|
||||
to_chat(usr, "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>")
|
||||
to_chat(usr, SPAN_WARNING("Hardware error: Printer was unable to print the file. It may be out of paper."))
|
||||
return
|
||||
else
|
||||
computer.visible_message("<span class='notice'>\The [computer] prints out paper.</span>")
|
||||
computer.visible_message(SPAN_NOTICE("\The [computer] prints out paper."))
|
||||
else
|
||||
var/contents = {"<h4>Crew Manifest</h4>
|
||||
<br>
|
||||
[SSrecords.get_manifest(1)]
|
||||
"}
|
||||
if(!computer.nano_printer.print_text(contents,text("crew manifest ([])", worldtime2text())))
|
||||
to_chat(usr, "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>")
|
||||
to_chat(usr, SPAN_WARNING(">Hardware error: Printer was unable to print the file. It may be out of paper."))
|
||||
return
|
||||
else
|
||||
computer.visible_message("<span class='notice'>\The [computer] prints out paper.</span>")
|
||||
computer.visible_message(SPAN_NOTICE("\The [computer] prints out paper."))
|
||||
if("eject")
|
||||
if(computer && computer.card_slot)
|
||||
if(id_card)
|
||||
@@ -210,7 +210,7 @@
|
||||
jobdatum = J
|
||||
break
|
||||
if(!jobdatum)
|
||||
to_chat(usr, "<span class='warning'>No log exists for this job: [t1]</span>")
|
||||
to_chat(usr, SPAN_WARNING("No log exists for this job: [t1]"))
|
||||
return
|
||||
|
||||
access = jobdatum.get_access(t1)
|
||||
@@ -233,10 +233,10 @@
|
||||
id_card.name = text("[id_card.registered_name]'s ID Card ([id_card.assignment])")
|
||||
|
||||
SSnanoui.update_uis(NM)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/card_mod/proc/remove_nt_access(var/obj/item/card/id/id_card)
|
||||
id_card.access -= get_access_ids(ACCESS_TYPE_STATION|ACCESS_TYPE_CENTCOM)
|
||||
|
||||
/datum/computer_file/program/card_mod/proc/apply_access(var/obj/item/card/id/id_card, var/list/accesses)
|
||||
id_card.access |= accesses
|
||||
id_card.access |= accesses
|
||||
@@ -12,16 +12,16 @@
|
||||
extended_desc = "Used to command and control the station. Can relay long-range communications."
|
||||
required_access_run = access_heads
|
||||
required_access_download = access_heads
|
||||
requires_ntnet = 1
|
||||
requires_ntnet = TRUE
|
||||
size = 12
|
||||
usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP
|
||||
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
|
||||
var/intercept = FALSE
|
||||
var/can_call_shuttle = FALSE //If calling the shuttle should be available from this console
|
||||
color = LIGHT_COLOR_BLUE
|
||||
|
||||
/datum/computer_file/program/comm/New(intercept_printing = 0, shuttle_call = 0)
|
||||
/datum/computer_file/program/comm/New(intercept_printing = FALSE, shuttle_call = FALSE)
|
||||
. = ..()
|
||||
intercept = intercept_printing
|
||||
can_call_shuttle = shuttle_call
|
||||
@@ -39,16 +39,16 @@
|
||||
var/msg_line1 = ""
|
||||
var/msg_line2 = ""
|
||||
var/centcomm_message_cooldown = 0
|
||||
var/announcment_cooldown = 0
|
||||
var/announcement_cooldown = 0
|
||||
var/datum/announcement/priority/crew_announcement = new
|
||||
var/current_viewing_message_id = 0
|
||||
var/current_viewing_message = null
|
||||
|
||||
/datum/nano_module/program/comm/New()
|
||||
..()
|
||||
crew_announcement.newscast = 1
|
||||
crew_announcement.newscast = TRUE
|
||||
|
||||
/datum/nano_module/program/comm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||
/datum/nano_module/program/comm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = TRUE, var/datum/topic_state/state = default_state)
|
||||
var/list/data = host.initial_data()
|
||||
|
||||
if(program)
|
||||
@@ -60,20 +60,20 @@
|
||||
if(program.computer)
|
||||
data["have_printer"] = !!program.computer.nano_printer
|
||||
else
|
||||
data["have_printer"] = 0
|
||||
data["have_printer"] = FALSE
|
||||
else
|
||||
data["emagged"] = 0
|
||||
data["net_comms"] = 1
|
||||
data["net_syscont"] = 1
|
||||
data["have_printer"] = 0
|
||||
data["message_printing_intercepts"] = 0
|
||||
data["emagged"] = FALSE
|
||||
data["net_comms"] = TRUE
|
||||
data["net_syscont"] = TRUE
|
||||
data["have_printer"] = FALSE
|
||||
data["message_printing_intercepts"] = FALSE
|
||||
|
||||
data["can_call_shuttle"] = can_call_shuttle()
|
||||
data["message_line1"] = msg_line1
|
||||
data["message_line2"] = msg_line2
|
||||
data["state"] = current_status
|
||||
data["isAI"] = issilicon(usr)
|
||||
data["authenticated"] = is_autenthicated(user)
|
||||
data["authenticated"] = is_authenticated(user)
|
||||
data["boss_short"] = current_map.boss_short
|
||||
data["current_security_level"] = security_level
|
||||
data["current_security_level_title"] = num2seclevel(security_level)
|
||||
@@ -92,25 +92,25 @@
|
||||
data["message_current"] = current_viewing_message
|
||||
|
||||
if(emergency_shuttle.location())
|
||||
data["have_shuttle"] = 1
|
||||
data["have_shuttle"] = TRUE
|
||||
if(emergency_shuttle.online())
|
||||
data["have_shuttle_called"] = 1
|
||||
data["have_shuttle_called"] = TRUE
|
||||
else
|
||||
data["have_shuttle_called"] = 0
|
||||
data["have_shuttle_called"] = FALSE
|
||||
else
|
||||
data["have_shuttle"] = 0
|
||||
data["have_shuttle"] = FALSE
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "communication.tmpl", name, 550, 420, state = state)
|
||||
ui.auto_update_layout = 1
|
||||
ui.auto_update_layout = TRUE
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/datum/nano_module/program/comm/proc/is_autenthicated(var/mob/user)
|
||||
/datum/nano_module/program/comm/proc/is_authenticated(var/mob/user)
|
||||
if(program)
|
||||
return program.can_run(user)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/nano_module/program/comm/proc/obtain_message_listener()
|
||||
if(program)
|
||||
@@ -123,11 +123,17 @@
|
||||
var/datum/computer_file/program/comm/P = program
|
||||
return P.can_call_shuttle
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/nano_module/program/comm/proc/set_announcement_cooldown(var/cooldown)
|
||||
announcement_cooldown = cooldown
|
||||
|
||||
/datum/nano_module/program/comm/proc/set_centcomm_message_cooldown(var/cooldown)
|
||||
centcomm_message_cooldown = cooldown
|
||||
|
||||
/datum/nano_module/program/comm/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
return TRUE
|
||||
var/mob/user = usr
|
||||
var/ntn_comm = !!program.get_signal(NTNET_COMMUNICATION)
|
||||
var/ntn_cont = !!program.get_signal(NTNET_SYSTEMCONTROL)
|
||||
@@ -136,7 +142,7 @@
|
||||
if("sw_menu")
|
||||
current_status = text2num(href_list["target"])
|
||||
if("emergencymaint")
|
||||
if(is_autenthicated(user) && !issilicon(user))
|
||||
if(is_authenticated(user) && !issilicon(user))
|
||||
if(maint_all_access)
|
||||
revoke_maint_all_access()
|
||||
feedback_inc("alert_comms_maintRevoke",1)
|
||||
@@ -146,13 +152,13 @@
|
||||
feedback_inc("alert_comms_maintGrant",1)
|
||||
log_and_message_admins("enabled emergency maintenance access")
|
||||
if("announce")
|
||||
if(is_autenthicated(user) && !issilicon(usr) && ntn_comm)
|
||||
if(is_authenticated(user) && !issilicon(usr) && ntn_comm)
|
||||
if(user)
|
||||
var/obj/item/card/id/id_card = user.GetIdCard()
|
||||
crew_announcement.announcer = GetNameAndAssignmentFromId(id_card)
|
||||
else
|
||||
crew_announcement.announcer = "Unknown"
|
||||
if(announcment_cooldown)
|
||||
if(announcement_cooldown)
|
||||
to_chat(usr, "Please allow at least one minute to pass between announcements")
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
@@ -161,15 +167,14 @@
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
crew_announcement.Announce(input)
|
||||
announcment_cooldown = 1
|
||||
spawn(600)//One minute cooldown
|
||||
announcment_cooldown = 0
|
||||
set_announcement_cooldown(TRUE)
|
||||
addtimer(CALLBACK(src, .proc/set_announcement_cooldown, FALSE), 600) //One minute cooldown
|
||||
if("message")
|
||||
if(href_list["target"] == "emagged")
|
||||
if(program)
|
||||
if(is_autenthicated(user) && program.computer_emagged && !issilicon(usr) && ntn_comm)
|
||||
if(is_authenticated(user) && program.computer_emagged && !issilicon(usr) && ntn_comm)
|
||||
if(centcomm_message_cooldown)
|
||||
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
||||
to_chat(usr, SPAN_WARNING("Arrays recycling. Please stand by."))
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "") as null|text)
|
||||
@@ -177,19 +182,18 @@
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
Syndicate_announce(input, usr)
|
||||
to_chat(usr, "<span class='notice'>Message transmitted.</span>")
|
||||
log_say("[key_name(usr)] has made an illegal announcement: [input]",ckey=key_name(usr))
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(300)//30 second cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
to_chat(usr, SPAN_NOTICE("Message successfully transmitted."))
|
||||
log_say("[key_name(usr)] has sent a message to the syndicate: [input]", ckey = key_name(usr))
|
||||
centcomm_message_cooldown = TRUE
|
||||
addtimer(CALLBACK(src, .proc/set_centcomm_message_cooldown, FALSE), 300) // thirty second cooldown
|
||||
else if(href_list["target"] == "regular")
|
||||
if(is_autenthicated(user) && !issilicon(usr) && ntn_comm)
|
||||
if(is_authenticated(user) && !issilicon(usr) && ntn_comm)
|
||||
if(centcomm_message_cooldown)
|
||||
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
||||
to_chat(usr, SPAN_WARNING("Arrays recycling. Please stand by."))
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
if(!is_relay_online())//Contact Centcom has a check, Syndie doesn't to allow for Traitor funs.
|
||||
to_chat(usr, "<span class='warning'>No Emergency Bluespace Relay detected. Unable to transmit message.</span>")
|
||||
to_chat(usr, SPAN_WARNING("No Emergency Bluespace Relay detected. Unable to transmit message."))
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
var/input = sanitize(input("Please choose a message to transmit to [current_map.boss_short] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "") as null|text)
|
||||
@@ -197,13 +201,12 @@
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
Centcomm_announce(input, usr)
|
||||
to_chat(usr, "<span class='notice'>Message transmitted.</span>")
|
||||
log_say("[key_name(usr)] has made an IA [current_map.boss_short] announcement: [input]",ckey=key_name(usr))
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(300) //30 second cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
to_chat(usr, SPAN_NOTICE("Message successfully transmitted."))
|
||||
log_say("[key_name(usr)] has sent a message to [current_map.boss_short]: [input]", ckey = key_name(usr))
|
||||
centcomm_message_cooldown = TRUE
|
||||
addtimer(CALLBACK(src, .proc/set_centcomm_message_cooldown, FALSE), 300) // thirty second cooldown
|
||||
if("shuttle")
|
||||
if(is_autenthicated(user) && ntn_cont && can_call_shuttle())
|
||||
if(is_authenticated(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())
|
||||
@@ -213,7 +216,7 @@
|
||||
if(confirm == "Yes" && can_still_topic())
|
||||
cancel_call_proc(usr)
|
||||
if("setstatus")
|
||||
if(is_autenthicated(user) && ntn_cont)
|
||||
if(is_authenticated(user) && ntn_cont)
|
||||
switch(href_list["target"])
|
||||
if("line1")
|
||||
var/linput = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", msg_line1) as text|null, 40), 40)
|
||||
@@ -231,17 +234,20 @@
|
||||
post_display_status(href_list["target"])
|
||||
|
||||
if("setalert")
|
||||
if(is_autenthicated(user) && !issilicon(usr) && ntn_cont && ntn_comm)
|
||||
if(is_authenticated(user) && !issilicon(usr) && ntn_cont && ntn_comm)
|
||||
var/current_level = text2num(href_list["target"])
|
||||
var/confirm = alert("Are you sure you want to change alert level to [num2seclevel(current_level)]?", name, "No", "Yes")
|
||||
if(confirm == "Yes" && can_still_topic())
|
||||
var/old_level = security_level
|
||||
if(!current_level) current_level = SEC_LEVEL_GREEN
|
||||
if(current_level < SEC_LEVEL_GREEN) current_level = SEC_LEVEL_GREEN
|
||||
if(current_level > SEC_LEVEL_BLUE) current_level = SEC_LEVEL_BLUE
|
||||
if(!current_level)
|
||||
current_level = SEC_LEVEL_GREEN
|
||||
if(current_level < SEC_LEVEL_GREEN)
|
||||
current_level = SEC_LEVEL_GREEN
|
||||
if(current_level > SEC_LEVEL_BLUE)
|
||||
current_level = SEC_LEVEL_BLUE
|
||||
set_security_level(current_level)
|
||||
if(security_level != old_level)
|
||||
log_game("[key_name(usr)] has changed the security level to [get_security_level()].",ckey=key_name(usr))
|
||||
log_game("[key_name(usr)] has changed the security level to [get_security_level()].", ckey = key_name(usr))
|
||||
message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].")
|
||||
switch(security_level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
@@ -251,29 +257,29 @@
|
||||
if(SEC_LEVEL_YELLOW)
|
||||
feedback_inc("alert_comms_yellow",1)
|
||||
else
|
||||
to_chat(usr, "You press button, but red light flashes and nothing happens.") //This should never happen)
|
||||
to_chat(usr, SPAN_WARNING("You press the button, but a red light flashes and nothing happens.")) //This should never happen
|
||||
current_status = STATE_DEFAULT
|
||||
if("viewmessage")
|
||||
if(is_autenthicated(user) && ntn_comm)
|
||||
if(is_authenticated(user) && ntn_comm)
|
||||
current_viewing_message_id = text2num(href_list["target"])
|
||||
for(var/list/m in l.messages)
|
||||
if(m["id"] == current_viewing_message_id)
|
||||
current_viewing_message = m
|
||||
current_status = STATE_VIEWMESSAGE
|
||||
if("delmessage")
|
||||
if(is_autenthicated(user) && ntn_comm && l != global_message_listener)
|
||||
if(is_authenticated(user) && ntn_comm && l != global_message_listener)
|
||||
l.Remove(current_viewing_message)
|
||||
current_status = STATE_MESSAGELIST
|
||||
if("printmessage")
|
||||
if(is_autenthicated(user) && ntn_comm)
|
||||
if(is_authenticated(user) && ntn_comm)
|
||||
if(program && program.computer && program.computer.nano_printer)
|
||||
if(!program.computer.nano_printer.print_text(current_viewing_message["contents"],current_viewing_message["title"]))
|
||||
to_chat(usr, "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>")
|
||||
to_chat(usr, SPAN_WARNING("Hardware error: Printer was unable to print the file. It may be out of paper."))
|
||||
else
|
||||
program.computer.visible_message("<span class='notice'>\The [program.computer] prints out paper.</span>")
|
||||
program.computer.visible_message(SPAN_NOTICE("\The [program.computer] prints out paper."))
|
||||
if("toggleintercept")
|
||||
if(is_autenthicated(user) && ntn_comm)
|
||||
if(program && program.computer && program.computer.nano_printer)
|
||||
if(is_authenticated(user) && ntn_comm)
|
||||
if(program?.computer?.nano_printer)
|
||||
var/datum/computer_file/program/comm/P = program
|
||||
P.intercept = !P.intercept
|
||||
|
||||
@@ -306,9 +312,9 @@ var/last_message_id = 0
|
||||
l.Add(message)
|
||||
|
||||
for (var/obj/item/modular_computer/computer in get_listeners_by_type(LISTENER_MODULAR_COMPUTER, /obj/item/modular_computer))
|
||||
if(computer && computer.working && !!computer.nano_printer)
|
||||
if(computer?.working && !!computer.nano_printer)
|
||||
var/datum/computer_file/program/comm/C = locate(/datum/computer_file/program/comm) in computer.hard_drive.stored_files
|
||||
if(C && C.intercept)
|
||||
if(C?.intercept)
|
||||
computer.nano_printer.print_text(message_text, message_title, "#deebff")
|
||||
|
||||
|
||||
@@ -329,14 +335,14 @@ var/last_message_id = 0
|
||||
Command action procs
|
||||
*/
|
||||
/proc/post_display_status(var/command, var/data1, var/data2)
|
||||
|
||||
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
|
||||
|
||||
if(!frequency) return
|
||||
if(!frequency)
|
||||
return
|
||||
|
||||
|
||||
var/datum/signal/status_signal = new
|
||||
status_signal.transmission_method = 1
|
||||
status_signal.transmission_method = TRUE
|
||||
status_signal.data["command"] = command
|
||||
|
||||
switch(command)
|
||||
@@ -351,98 +357,98 @@ Command action procs
|
||||
|
||||
//Returns 1 if recalled 0 if not
|
||||
/proc/cancel_call_proc(var/mob/user)
|
||||
if (!(ROUND_IS_STARTED) || !emergency_shuttle.can_recall())
|
||||
return 0
|
||||
if(!(ROUND_IS_STARTED) || !emergency_shuttle.can_recall())
|
||||
return FALSE
|
||||
if((SSticker.mode.name == "blob")||(SSticker.mode.name == "Meteor"))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
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))
|
||||
log_game("[key_name(user)] has recalled the shuttle.", key_name(user))
|
||||
message_admins("[key_name_admin(user)] has recalled the shuttle.", 1)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
/proc/is_relay_online()
|
||||
for(var/obj/machinery/bluespacerelay/M in SSmachinery.all_machines)
|
||||
if(M.stat == 0)
|
||||
return 1
|
||||
return 0
|
||||
for(var/obj/machinery/bluespacerelay/M in SSmachinery.all_machines)
|
||||
if(M.stat == 0)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//Returns 1 if called 0 if not
|
||||
/proc/call_shuttle_proc(var/mob/user)
|
||||
if ((!(ROUND_IS_STARTED) || !emergency_shuttle.location()))
|
||||
return 0
|
||||
if((!(ROUND_IS_STARTED) || !emergency_shuttle.location()))
|
||||
return FALSE
|
||||
|
||||
if(!universe.OnShuttleCall(usr))
|
||||
to_chat(user, "<span class='notice'>Cannot establish a bluespace connection.</span>")
|
||||
return 0
|
||||
to_chat(user, SPAN_WARNING("Cannot establish a bluespace connection."))
|
||||
return FALSE
|
||||
|
||||
if(emergency_shuttle.deny_shuttle)
|
||||
to_chat(user, "The emergency shuttle may not be sent at this time. Please try again later.")
|
||||
return 0
|
||||
to_chat(user, SPAN_WARNING("The emergency shuttle cannot be sent at this time. Please try again later."))
|
||||
return FALSE
|
||||
|
||||
if(world.time < 6000) // Ten minute grace period to let the game get going without lolmetagaming. -- TLE
|
||||
to_chat(user, "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minute\s before trying again.")
|
||||
to_chat(user, SPAN_WARNING("The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minute\s before trying again."))
|
||||
return 0
|
||||
|
||||
if(emergency_shuttle.going_to_centcom())
|
||||
to_chat(user, "The emergency shuttle may not be called while returning to [current_map.boss_short].")
|
||||
to_chat(user, SPAN_WARNING("The emergency shuttle cannot be called while returning to [current_map.boss_short]."))
|
||||
return 0
|
||||
|
||||
if(emergency_shuttle.online())
|
||||
to_chat(user, "The emergency shuttle is already on its way.")
|
||||
to_chat(user, SPAN_WARNING("The emergency shuttle is already on its way."))
|
||||
return 0
|
||||
|
||||
if(SSticker.mode.name == "blob")
|
||||
to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.")
|
||||
return 0
|
||||
to_chat(user, SPAN_WARNING("Under directive 7-10, [station_name()] is quarantined until further notice."))
|
||||
return FALSE
|
||||
|
||||
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 1
|
||||
return TRUE
|
||||
|
||||
/proc/init_shift_change(var/mob/user, var/force = 0)
|
||||
/proc/init_shift_change(var/mob/user, var/force = FALSE)
|
||||
if ((!(ROUND_IS_STARTED) || !emergency_shuttle.location()))
|
||||
return
|
||||
|
||||
if(emergency_shuttle.going_to_centcom())
|
||||
to_chat(user, "The shuttle may not be called while returning to [current_map.boss_short].")
|
||||
to_chat(user, SPAN_WARNING("The shuttle cannot be called while returning to [current_map.boss_short]."))
|
||||
return
|
||||
|
||||
if(emergency_shuttle.online())
|
||||
to_chat(user, "The shuttle is already on its way.")
|
||||
to_chat(user, SPAN_WARNING("The shuttle is already on its way."))
|
||||
return
|
||||
|
||||
// if force is 0, some things may stop the shuttle call
|
||||
if(!force)
|
||||
if(emergency_shuttle.deny_shuttle)
|
||||
to_chat(user, "[current_map.boss_short] does not currently have a shuttle available in your sector. Please try again later.")
|
||||
to_chat(user, SPAN_WARNING("[current_map.boss_short] does not currently have a shuttle available in your sector. Please try again later."))
|
||||
return
|
||||
|
||||
if(world.time < 54000) // 30 minute grace period to let the game get going
|
||||
to_chat(user, "The shuttle is refueling. Please wait another [round((54000-world.time)/60)] minutes before trying again.")
|
||||
to_chat(user, SPAN_WARNING("The shuttle is refueling. Please wait another [round((54000-world.time)/60)] minutes before trying again."))
|
||||
return
|
||||
|
||||
if(SSticker.mode.auto_recall_shuttle)
|
||||
//New version pretends to call the shuttle but cause the shuttle to return after a random duration.
|
||||
emergency_shuttle.auto_recall = 1
|
||||
emergency_shuttle.auto_recall = TRUE
|
||||
|
||||
if(SSticker.mode.name == "blob" || SSticker.mode.name == "epidemic")
|
||||
to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.")
|
||||
to_chat(user, SPAN_WARNING("Under directive 7-10, [station_name()] is quarantined until further notice."))
|
||||
return
|
||||
|
||||
emergency_shuttle.call_transfer()
|
||||
|
||||
//delay events in case of an autotransfer
|
||||
if (!user)
|
||||
if(!user)
|
||||
SSevents.delay_events(EVENT_LEVEL_MODERATE, 10200) //17 minutes
|
||||
SSevents.delay_events(EVENT_LEVEL_MAJOR, 10200)
|
||||
|
||||
log_game("[user? key_name(user) : "Autotransfer"] has called the shuttle.")
|
||||
message_admins("[user? key_name_admin(user) : "Autotransfer"] has called the shuttle.", 1)
|
||||
|
||||
return
|
||||
return
|
||||
Reference in New Issue
Block a user