mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Renames delta time to be a more obvious name (#74654)
This tracks the seconds per tick of a subsystem, however note that it is not completely accurate, as subsystems can be delayed, however it's useful to have this number as a multiplier or ratio, so that if in future someone changes the subsystem wait time code correctly adjusts how fast it applies effects regexes used git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i 's/DT_PROB/SPT_PROB/g' git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i 's/delta_time/seconds_per_tick/g'
This commit is contained in:
@@ -463,7 +463,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
return FALSE
|
||||
|
||||
// Process currently calls handle_power(), may be expanded in future if more things are added.
|
||||
/obj/item/modular_computer/process(delta_time)
|
||||
/obj/item/modular_computer/process(seconds_per_tick)
|
||||
if(!enabled) // The computer is turned off
|
||||
last_power_usage = 0
|
||||
return
|
||||
@@ -479,7 +479,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
if(idle_programs.program_state == PROGRAM_STATE_KILLED)
|
||||
idle_threads.Remove(idle_programs)
|
||||
continue
|
||||
idle_programs.process_tick(delta_time)
|
||||
idle_programs.process_tick(seconds_per_tick)
|
||||
idle_programs.ntnet_status = get_ntnet_status()
|
||||
if(idle_programs.requires_ntnet && !idle_programs.ntnet_status)
|
||||
idle_programs.event_networkfailure(TRUE)
|
||||
@@ -488,10 +488,10 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
if(active_program.program_state == PROGRAM_STATE_KILLED)
|
||||
active_program = null
|
||||
else
|
||||
active_program.process_tick(delta_time)
|
||||
active_program.process_tick(seconds_per_tick)
|
||||
active_program.ntnet_status = get_ntnet_status()
|
||||
|
||||
handle_power(delta_time) // Handles all computer power interaction
|
||||
handle_power(seconds_per_tick) // Handles all computer power interaction
|
||||
|
||||
/**
|
||||
* Displays notification text alongside a soundbeep when requested to by a program.
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
shutdown_computer(0)
|
||||
|
||||
// Handles power-related things, such as battery interaction, recharging, shutdown when it's discharged
|
||||
/obj/item/modular_computer/proc/handle_power(delta_time)
|
||||
/obj/item/modular_computer/proc/handle_power(seconds_per_tick)
|
||||
var/power_usage = screen_on ? base_active_power_usage : base_idle_power_usage
|
||||
|
||||
if(use_power(power_usage))
|
||||
|
||||
Reference in New Issue
Block a user