mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 18:11:47 +00:00
Merge pull request #4814 from Ikarrus/handholdingspoonfeeding
Shuttle Call/Recall Tracing in Announcements
This commit is contained in:
@@ -37,16 +37,19 @@ var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
|
||||
// call the shuttle
|
||||
// if not called before, set the endtime to T+600 seconds
|
||||
// otherwise if outgoing, switch to incoming
|
||||
/datum/shuttle_controller/proc/incall(coeff = 1, var/signal_origin)
|
||||
/datum/shuttle_controller/proc/incall(coeff = 1, var/signal_origin, var/emergency_reason, var/red_alert)
|
||||
|
||||
if(endtime)
|
||||
if(direction == -1)
|
||||
setdirection(1)
|
||||
else
|
||||
if(signal_origin && prob(60)) //40% chance the signal tracing will fail
|
||||
if(recall_count > 2 && signal_origin && prob(70)) //30% chance the signal tracing will fail
|
||||
last_call_loc = signal_origin
|
||||
else
|
||||
last_call_loc = null
|
||||
|
||||
priority_announce("The emergency shuttle has been called. [red_alert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.[emergency_reason][emergency_shuttle.last_call_loc ? "\n\nCall signal traced. Results can be viewed on any communcations console." : "" ]", null, 'sound/AI/shuttlecalled.ogg', "Priority")
|
||||
|
||||
settimeleft(SHUTTLEARRIVETIME*coeff)
|
||||
online = 1
|
||||
if(always_fake_recall)
|
||||
@@ -67,15 +70,15 @@ var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
|
||||
|
||||
recall_count ++
|
||||
|
||||
if(recall_count > 2 && signal_origin && prob(60)) //40% chance the signal tracing will fail
|
||||
if(recall_count > 2 && signal_origin && prob(70)) //30% chance the signal tracing will fail
|
||||
last_call_loc = signal_origin
|
||||
else
|
||||
last_call_loc = null
|
||||
|
||||
if(recall_count == 2)
|
||||
priority_announce("The emergency shuttle has been recalled.\n\nExcessive number of emergency shuttle calls detected. We will attempt to trace all future calls and recalls to their source. Tracing results can be viewed on any communications console.", null, 'sound/AI/shuttlerecalled.ogg')
|
||||
priority_announce("The emergency shuttle has been recalled.\n\nExcessive number of emergency shuttle calls detected. We will attempt to trace all future calls and recalls to their source. Tracing results may be viewed on any communications console.", null, 'sound/AI/shuttlerecalled.ogg')
|
||||
else
|
||||
priority_announce("The emergency shuttle has been recalled.", null, 'sound/AI/shuttlerecalled.ogg', "Priority")
|
||||
priority_announce("The emergency shuttle has been recalled.[last_call_loc ? " Recall signal traced. Results can be viewed on any communcations console." : "" ]", null, 'sound/AI/shuttlerecalled.ogg', "Priority")
|
||||
setdirection(-1)
|
||||
online = 1
|
||||
|
||||
@@ -134,7 +137,6 @@ var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
|
||||
incall(SHUTTLEAUTOCALLTIMER) //X minutes! If they want to recall, they have X-(X-5) minutes to do so
|
||||
log_game("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
|
||||
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.", 1)
|
||||
priority_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.", null, 'sound/AI/shuttlecalled.ogg', "Priority")
|
||||
|
||||
/datum/shuttle_controller/proc/move_shuttles()
|
||||
var/datum/shuttle_manager/s
|
||||
|
||||
@@ -332,7 +332,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
var/dat = ""
|
||||
if (emergency_shuttle.online && emergency_shuttle.location==0)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]<BR>"
|
||||
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||
|
||||
|
||||
var/datum/browser/popup = new(user, "communications", "Communications Console", 400, 500)
|
||||
@@ -354,10 +354,11 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
if (src.authenticated)
|
||||
if(emergency_shuttle.recall_count > 1)
|
||||
if(emergency_shuttle.last_call_loc)
|
||||
dat += "<BR>Last emergency shuttle call/recall traced to: <b>[format_text(emergency_shuttle.last_call_loc.name)]</b>.<BR>"
|
||||
dat += "<BR>Most recent shuttle call/recall traced to: <b>[format_text(emergency_shuttle.last_call_loc.name)]</b>"
|
||||
else
|
||||
dat += "<BR>Last emergency shuttle call/recall trace failed.<BR>"
|
||||
dat += "Logged in as: [auth_id]"
|
||||
dat += "<BR>Unable to trace most recent shuttle call/recall signal."
|
||||
dat += "<BR>Logged in as: [auth_id]"
|
||||
dat += "<BR>"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=logout'>Log Out</A> \]<BR>"
|
||||
dat += "<BR><B>General Functions</B>"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=messagelist'>Message List</A> \]"
|
||||
@@ -593,11 +594,9 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
var/area/signal_origin = get_area(user)
|
||||
var/emergency_reason = "\nNature of emergency:\n\n[call_reason]"
|
||||
if (seclevel2num(get_security_level()) == SEC_LEVEL_RED) // There is a serious threat we gotta move no time to give them five minutes.
|
||||
emergency_shuttle.incall(0.6, signal_origin)
|
||||
priority_announce("The emergency shuttle has been called. Red Alert state confirmed: Dispatching priority shuttle. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.[emergency_reason]", null, 'sound/AI/shuttlecalled.ogg', "Priority")
|
||||
emergency_shuttle.incall(0.6, signal_origin, emergency_reason, 1)
|
||||
else
|
||||
emergency_shuttle.incall(1, signal_origin)
|
||||
priority_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.[emergency_reason]", null, 'sound/AI/shuttlecalled.ogg', "Priority")
|
||||
emergency_shuttle.incall(1, signal_origin, emergency_reason, 0)
|
||||
|
||||
log_game("[key_name(user)] has called the shuttle.")
|
||||
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
|
||||
|
||||
@@ -180,7 +180,6 @@
|
||||
if ((!( ticker ) || emergency_shuttle.location))
|
||||
return
|
||||
emergency_shuttle.incall()
|
||||
priority_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.", null,'sound/AI/shuttlecalled.ogg', "Priority")
|
||||
log_admin("[key_name(usr)] called the Emergency Shuttle")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>", 1)
|
||||
|
||||
@@ -190,7 +189,6 @@
|
||||
switch(emergency_shuttle.direction)
|
||||
if(-1)
|
||||
emergency_shuttle.incall()
|
||||
priority_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.", null, 'sound/AI/shuttlerecalled.ogg', "Priority")
|
||||
log_admin("[key_name(usr)] called the Emergency Shuttle")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>", 1)
|
||||
if(1)
|
||||
|
||||
@@ -690,7 +690,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
emergency_shuttle.incall()
|
||||
priority_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.", null, 'sound/AI/shuttlecalled.ogg', "Priority")
|
||||
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-called the emergency shuttle.</span>", 1)
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
if(A)
|
||||
notify_ghosts("Nar-Sie has risen in \the [A.name]. Reach out to the Geometer to be given a new shell for your soul.")
|
||||
|
||||
sleep(70)
|
||||
if(emergency_shuttle)
|
||||
emergency_shuttle.incall(0.3) // Cannot recall
|
||||
|
||||
@@ -158,4 +159,4 @@
|
||||
consume(X)
|
||||
// if(defer_powernet_rebuild != 2)
|
||||
// defer_powernet_rebuild = 0
|
||||
return
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user