[MIRROR] Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#709)

* Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)

* Process procs now properly use deltatime when implementing rates, timers and probabilities

* Review fixes

* Geiger counters cleanup

Made hardsuit geiger code more similar to geiger counter code
Geiger counters are more responsive now

* Moved SS*_DT defines to subsystems.dm

* Rebase fix

* Redefined the SS*_DT defines to use the subsystem wait vars

* Implemented suggested changes by @AnturK

* Commented /datum/proc/process about the deltatime stuff

* Send delta_time as a process parameter instead of the defines

Also DTfied acid_processing

* Dtfied new acid component

* Process procs now properly utilize deltatime when implementing rates, timers and probabilities

Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
This commit is contained in:
SkyratBot
2020-09-09 08:19:23 +02:00
committed by GitHub
co-authored by Donkie
parent a18452f0da
commit 1e705faa19
159 changed files with 808 additions and 719 deletions
+6 -4
View File
@@ -1,4 +1,5 @@
#define WELDER_FUEL_BURN_INTERVAL 13
/// How many seconds between each fuel depletion tick ("use" proc)
#define WELDER_FUEL_BURN_INTERVAL 26
/obj/item/weldingtool
name = "welding tool"
desc = "A standard edition welder provided by Nanotrasen."
@@ -70,7 +71,7 @@
. += "[initial(icon_state)]-on"
/obj/item/weldingtool/process()
/obj/item/weldingtool/process(delta_time)
switch(welding)
if(0)
force = 3
@@ -83,7 +84,7 @@
if(1)
force = 15
damtype = BURN
++burned_fuel_for
burned_fuel_for += delta_time
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
use(1)
update_icon()
@@ -188,8 +189,9 @@
if(!isOn() || !check_fuel())
return FALSE
if(used)
if(used > 0)
burned_fuel_for = 0
if(get_fuel() >= used)
reagents.remove_reagent(/datum/reagent/fuel, used)
check_fuel()