Shuttle automatically called if round lasts 8 hours (#32751)

* Shuttle automatically called if round lasts 8 hours

* Plural

Co-authored-by: kanef <kanef9x@protonmail.com>
This commit is contained in:
kane-f
2022-06-10 00:28:48 +01:00
committed by GitHub
parent 0ac97d1c9f
commit d92a442845
4 changed files with 14 additions and 10 deletions

View File

@@ -423,7 +423,7 @@ var/global/datum/emergency_shuttle/emergency_shuttle
else
return 1
/proc/shuttle_autocall()
/proc/shuttle_autocall(var/reason = "None")
if (emergency_shuttle.departed)
return
@@ -431,7 +431,7 @@ var/global/datum/emergency_shuttle/emergency_shuttle
return
emergency_shuttle.incall(2)
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
log_game("[reason]. Shuttle called.")
message_admins("[reason]. Shuttle called.", 1)
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes. Justification: [reason]")
world << sound('sound/AI/shuttlecalled.ogg')

View File

@@ -47,6 +47,7 @@ var/stacking_limit = 90
var/list/dead_players = list()
var/list/list_observers = list()
var/last_time_of_population = 0
var/last_time_of_late_shuttle_call = 0
var/latejoin_injection_cooldown = 0
var/midround_injection_cooldown = 0
@@ -663,6 +664,9 @@ var/stacking_limit = 90
last_time_of_population = world.time
else if(last_time_of_population && world.time - last_time_of_population > 5 MINUTES && world.time > 15 MINUTES) //if enough time has passed without it
ticker.station_nolife_cinematic()
if(world.time > (7 HOURS + 40 MINUTES) && world.time - last_time_of_late_shuttle_call > 1 HOURS && emergency_shuttle.direction == 0) // 8 hour work shift, with time for shuttle to arrive and leave. If recalled, do every hour
shuttle_autocall("Shift due to end")
last_time_of_late_shuttle_call = world.time
/datum/gamemode/dynamic/proc/GetInjectionChance()
var/chance = 0

View File

@@ -729,7 +729,7 @@ var/list/shuttle_log = list()
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction")
return ..()
shuttle_autocall()
shuttle_autocall("All the AIs, comm consoles and boards are destroyed")
..()
// -- Blob defcon 1 things
@@ -831,6 +831,6 @@ var/list/shuttle_log = list()
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction")
return ..()
shuttle_autocall()
shuttle_autocall("All the AIs, comm consoles and boards are destroyed")
..()

View File

@@ -42,7 +42,7 @@
callshuttle = 0
if(callshuttle == 3) //if all three conditions are met
shuttle_autocall()
shuttle_autocall("All the AIs, comm consoles and boards are destroyed")
if(explosive && !gibbed && !istype(loc, /obj/machinery/power/apc))
visible_message("<span class='danger'>[name] begins to spark violently!</span>")