Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes the emergency shuttle and status display process timed to the second #36388

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions code/controllers/shuttle_controller.dm
SECBATON-GRIFFON marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ var/global/datum/emergency_shuttle/emergency_shuttle

online = 0

/datum/emergency_shuttle/proc/process()
/datum/emergency_shuttle/proc/process(tick)
if(!online || shutdown)
return

Expand All @@ -346,6 +346,11 @@ var/global/datum/emergency_shuttle/emergency_shuttle
if(timeleft < 0) // Sanity
timeleft = 0


for(var/obj/machinery/status_display/S in status_displays)
if(S.mode == 1)
S.update()

if(timeleft > 6)
warmup_sound = 0

Expand All @@ -354,9 +359,10 @@ var/global/datum/emergency_shuttle/emergency_shuttle

/* --- Shuttle is in transit toward centcom --- */
if(direction == 2)
for(var/obj/structure/shuttle/engine/propulsion/P in shuttle.linked_area)
spawn()
P.shoot_exhaust(backward = 3)
if(tick % 2 == 0)
for(var/obj/structure/shuttle/engine/propulsion/P in shuttle.linked_area)
spawn()
P.shoot_exhaust(backward = 3)

var/collision_imminent = FALSE
for(var/datum/shuttle/escape/pod/pod in escape_pods)
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/subsystem/emergency_shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var/datum/subsystem/emergency_shuttle/SSemergency_shuttle
/datum/subsystem/emergency_shuttle
name = "Emergency Shuttle"
init_order = SS_INIT_EMERGENCY_SHUTTLE
wait = 2 SECONDS
SECBATON-GRIFFON marked this conversation as resolved.
Show resolved Hide resolved
wait = 1 SECONDS
flags = SS_KEEP_TIMING | SS_NO_TICK_CHECK


Expand All @@ -20,4 +20,4 @@ var/datum/subsystem/emergency_shuttle/SSemergency_shuttle


/datum/subsystem/emergency_shuttle/fire(resumed = FALSE)
emergency_shuttle.process()
emergency_shuttle.process(times_fired)
4 changes: 4 additions & 0 deletions code/controllers/subsystem/supply_shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ var/datum/subsystem/supply_shuttle/SSsupply_shuttle
centcomm_last_order = world.time
centcomm_order_cooldown = rand(modified_min,modified_max)

for(var/obj/machinery/status_display/supply/S in supply_displays)
if(S.mode == 4)
S.update()

/datum/supply_order
var/ordernum
var/datum/supply_packs/object = null
Expand Down
28 changes: 19 additions & 9 deletions code/game/machinery/status_display.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
#define MODE_IMAGE 3
#define MODE_CARGO_TIMER 4

var/global/list/status_displays = list() //This list contains both normal status displays, and AI status dispays
var/global/list/status_displays = list() //This list contains both normal status displays, and AI status displays
var/global/list/supply_displays = list()

/obj/machinery/status_display
icon = 'icons/obj/status_display.dmi'
Expand Down Expand Up @@ -62,6 +63,10 @@ var/global/list/status_displays = list() //This list contains both normal status
if (ticker && ticker.current_state == GAME_STATE_PLAYING)
initialize()

/obj/machinery/status_display/supply/New()
..()
supply_displays |= src

/obj/machinery/status_display/initialize()
..()
if(radio_controller)
Expand All @@ -71,16 +76,14 @@ var/global/list/status_displays = list() //This list contains both normal status
.=..()
status_displays -= src

/obj/machinery/status_display/supply/Destroy()
.=..()
supply_displays -= src

// timed process
/obj/machinery/status_display/process()
if(stat & (FORCEDISABLE|NOPOWER))
remove_display()
return
if(spookymode)
spookymode = 0
remove_display()
return
update()
if(mode != MODE_SHUTTLE_TIMER && mode != MODE_CARGO_TIMER) // handled in their subsystems
jwhitak marked this conversation as resolved.
Show resolved Hide resolved
update()

/obj/machinery/status_display/attack_ai(mob/user)
if(spookymode)
Expand Down Expand Up @@ -131,6 +134,13 @@ var/global/list/status_displays = list() //This list contains both normal status
// set what is displayed

/obj/machinery/status_display/proc/update()
if(stat & (FORCEDISABLE|NOPOWER))
remove_display()
return
if(spookymode)
spookymode = 0
remove_display()
return
if(friendc && mode!=4) //Makes all status displays except supply shuttle timer display the eye -- Urist
set_picture("ai_friend")
return
Expand Down
Loading