mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Merge pull request #7271 from Incoming5643/Maybe_it_ran_out_of_gas
Shuttle Stranding
This commit is contained in:
@@ -30,5 +30,6 @@
|
||||
#define SHUTTLE_RECALL 1
|
||||
#define SHUTTLE_CALL 2
|
||||
#define SHUTTLE_DOCKED 3
|
||||
#define SHUTTLE_ESCAPE 4
|
||||
#define SHUTTLE_ENDGAME 5
|
||||
#define SHUTTLE_STRANDED 4
|
||||
#define SHUTTLE_ESCAPE 5
|
||||
#define SHUTTLE_ENDGAME 6
|
||||
|
||||
@@ -15,8 +15,7 @@ var/datum/subsystem/shuttle/SSshuttle
|
||||
var/emergencyDockTime = 1800 //time taken for emergency shuttle to leave again once it has docked (in deciseconds)
|
||||
var/emergencyEscapeTime = 1200 //time taken for emergency shuttle to reach a safe distance after leaving station (in deciseconds)
|
||||
var/area/emergencyLastCallLoc
|
||||
var/emergencyAlwaysFakeRecall
|
||||
var/emergencyFakeRecall
|
||||
var/emergencyNoEscape
|
||||
|
||||
//supply shuttle stuff
|
||||
var/obj/docking_port/mobile/supply/supply
|
||||
@@ -104,6 +103,9 @@ var/datum/subsystem/shuttle/SSshuttle
|
||||
if(SHUTTLE_ESCAPE)
|
||||
user << "The emergency shuttle is moving away to a safe distance."
|
||||
return
|
||||
if(SHUTTLE_STRANDED)
|
||||
user << "The emergency shuttle has been disabled by Centcom."
|
||||
return
|
||||
|
||||
call_reason = strip_html_properly(trim(call_reason))
|
||||
|
||||
|
||||
@@ -47,13 +47,6 @@
|
||||
|
||||
priority_announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communcations console." : "" ]", null, 'sound/AI/shuttlecalled.ogg', "Priority")
|
||||
|
||||
if(SSshuttle.emergencyAlwaysFakeRecall)
|
||||
if((seclevel2num(get_security_level()) == SEC_LEVEL_RED))
|
||||
SSshuttle.emergencyFakeRecall = rand(2, 5) * 0.1
|
||||
else
|
||||
SSshuttle.emergencyFakeRecall = rand(5, 8) * 0.1
|
||||
|
||||
|
||||
/obj/docking_port/mobile/emergency/cancel(area/signalOrigin)
|
||||
if(mode != SHUTTLE_CALL)
|
||||
return
|
||||
@@ -84,10 +77,7 @@
|
||||
mode = SHUTTLE_IDLE
|
||||
timer = 0
|
||||
if(SHUTTLE_CALL)
|
||||
if(time_left < SSshuttle.emergencyFakeRecall * SSshuttle.emergencyCallTime) //recall due to fake recalls
|
||||
cancel()
|
||||
SSshuttle.emergencyFakeRecall = 0
|
||||
else if(time_left <= 0)
|
||||
if(time_left <= 0)
|
||||
//move emergency shuttle to station
|
||||
if(dock(SSshuttle.getDock("emergency_home")))
|
||||
setTimer(20)
|
||||
@@ -97,7 +87,10 @@
|
||||
send2irc("Server", "The Emergency Shuttle has docked with the station.")
|
||||
priority_announce("The Emergency Shuttle has docked with the station. You have [timeLeft(600)] minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
|
||||
if(SHUTTLE_DOCKED)
|
||||
if(time_left <= 0)
|
||||
if(time_left <= 0 && SSshuttle.emergencyNoEscape)
|
||||
priority_announce("Hostile enviroment detected. Departure has been postponed indefinitely pending conflict resolution.", null, 'sound/misc/notice1.ogg', "Priority")
|
||||
mode = SHUTTLE_STRANDED
|
||||
if(time_left <= 0 && !SSshuttle.emergencyNoEscape)
|
||||
//move each escape pod to its corresponding transit dock
|
||||
for(var/obj/docking_port/mobile/pod/M in SSshuttle.mobile)
|
||||
M.enterTransit()
|
||||
|
||||
@@ -99,7 +99,7 @@ var/list/blob_nodes = list()
|
||||
for(var/datum/mind/blob in infected_crew)
|
||||
greet_blob(blob)
|
||||
|
||||
SSshuttle.emergencyAlwaysFakeRecall = 1
|
||||
SSshuttle.emergencyNoEscape = 1
|
||||
|
||||
// Disable the blob event for this round.
|
||||
var/datum/round_event_control/blob/B = locate() in SSevent.control
|
||||
|
||||
@@ -77,13 +77,14 @@
|
||||
AI_mind.special_role = "malfunction"
|
||||
|
||||
AI_mind.current.verbs += /datum/game_mode/malfunction/proc/takeover
|
||||
AI_mind.current.verbs += /mob/living/silicon/ai/proc/ai_cancel_call
|
||||
|
||||
/* AI_mind.current.icon_state = "ai-malf"
|
||||
spawn(10)
|
||||
if(alert(AI_mind.current,"Do you want to use an alternative sprite for your real core?",,"Yes","No")=="Yes")
|
||||
AI_mind.current.icon_state = "ai-malf2"
|
||||
*/
|
||||
SSshuttle.emergencyAlwaysFakeRecall = 1
|
||||
SSshuttle.emergencyNoEscape = 1
|
||||
..()
|
||||
|
||||
|
||||
@@ -146,7 +147,11 @@
|
||||
return 1
|
||||
if (is_malf_ai_dead())
|
||||
if(config.continuous_round_malf)
|
||||
SSshuttle.emergencyAlwaysFakeRecall = 0
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
|
||||
SSshuttle.emergency.mode = SHUTTLE_DOCKED
|
||||
SSshuttle.emergency.timer = world.time
|
||||
priority_announce("Hostile enviroment resolved. You have 3 minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
|
||||
SSshuttle.emergencyNoEscape = 0
|
||||
malf_mode_declared = 0
|
||||
else
|
||||
return 1
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
for(var/datum/mind/rev_mind in head_revolutionaries)
|
||||
greet_revolutionary(rev_mind)
|
||||
modePlayer += head_revolutionaries
|
||||
SSshuttle.emergencyAlwaysFakeRecall = 1
|
||||
SSshuttle.emergencyNoEscape = 1
|
||||
..()
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
/datum/game_mode/revolution/check_finished()
|
||||
if(config.continuous_round_rev)
|
||||
if(finished != 0)
|
||||
SSshuttle.emergencyAlwaysFakeRecall = 0
|
||||
SSshuttle.emergencyNoEscape = 0
|
||||
return ..()
|
||||
if(finished != 0)
|
||||
return 1
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
/datum/game_mode/sandbox/post_setup()
|
||||
..()
|
||||
SSshuttle.emergencyAlwaysFakeRecall = 1
|
||||
SSshuttle.emergencyNoEscape = 1
|
||||
|
||||
@@ -91,6 +91,9 @@
|
||||
line1 = "-ETD-"
|
||||
if(SHUTTLE_ESCAPE)
|
||||
line1 = "-ESC-"
|
||||
if(SHUTTLE_STRANDED)
|
||||
line1 = "-ERR-"
|
||||
line2 = "??:??"
|
||||
if(length(line2) > CHARS_PER_LINE)
|
||||
line2 = "Error!"
|
||||
update_display(line1, line2)
|
||||
|
||||
@@ -681,13 +681,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes") return
|
||||
|
||||
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "confliction")
|
||||
var/choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
|
||||
if(choice == "Confirm")
|
||||
SSshuttle.emergencyFakeRecall = rand(5,9) * 0.1
|
||||
else
|
||||
return
|
||||
|
||||
SSshuttle.emergency.request()
|
||||
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.")
|
||||
|
||||
@@ -318,7 +318,7 @@ var/list/ai_list = list()
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_cancel_call()
|
||||
set category = "AI Commands"
|
||||
set category = "Malfunction"
|
||||
if(src.stat == 2)
|
||||
src << "You can't send the shuttle back because you are dead!"
|
||||
return
|
||||
|
||||
@@ -705,6 +705,8 @@ var/list/slot_equipment_priority = list( \
|
||||
ETA = "ETD"
|
||||
if(SHUTTLE_ESCAPE)
|
||||
ETA = "ESC"
|
||||
if(SHUTTLE_STRANDED)
|
||||
ETA = "ERR"
|
||||
if(ETA)
|
||||
var/timeleft = SSshuttle.emergency.timeLeft()
|
||||
stat(null, "[ETA]-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
Reference in New Issue
Block a user