Skip to content

Commit

Permalink
[MIRROR] fixes brig timer ui [MDB IGNORE] (#3422)
Browse files Browse the repository at this point in the history
* fixes brig timer ui

* Update brigdoors.dm

* Update brigdoors.dm

* Woops

---------

Co-authored-by: jimmyl <[email protected]>
Co-authored-by: SomeRandomOwl <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed Jul 1, 2024
1 parent bb49d33 commit 2835e8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/game/machinery/doors/brigdoors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,21 +177,21 @@
* * seconds - Return the time in seconds if TRUE, else deciseconds.
*/
/obj/machinery/status_display/door_timer/proc/time_left(seconds = FALSE)
. = max(0, timer_duration + activation_time - REALTIMEOFDAY) // NOVA EDIT CHANGE, Original: . = max(0, timer_duration + activation_time - world.time)
. = max(0, timer_duration + (activation_time ? activation_time - REALTIMEOFDAY : 0)) // NOVA EDIT CHANGE, Original: . = max(0, timer_duration + (activation_time ? activation_time - world.time : 0))
if(seconds)
. /= (1 SECONDS)

/**
* Set the timer. Does NOT automatically start counting down, but does update the display.
*
* returns TRUE if no change occurred
* returns FALSE if no change occurred
*
* Arguments:
* value - time in deciseconds to set the timer for.
*/
/obj/machinery/status_display/door_timer/proc/set_timer(value)
var/new_time = clamp(value, 0, MAX_TIMER + REALTIMEOFDAY - activation_time) // NOVA EDIT CHANGE, Original: var/new_time = clamp(value, 0, MAX_TIMER + world.time - activation_time)
. = new_time == timer_duration //return 1 on no change
var/new_time = clamp(value, 0, MAX_TIMER)
. = new_time != timer_duration //return 1 on change
timer_duration = new_time
update_content()

Expand Down

0 comments on commit 2835e8e

Please sign in to comment.