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
This commit is contained in:
Donkie
2020-09-08 10:24:05 +02:00
committed by GitHub
parent 671c4666ed
commit 53b212ddf2
159 changed files with 808 additions and 719 deletions
+7 -7
View File
@@ -560,17 +560,17 @@
RegisterSignal(src, COMSIG_TRY_STORAGE_TAKE, .proc/unfreeze)
START_PROCESSING(SSobj, src)
/obj/item/storage/organbox/process()
/obj/item/storage/organbox/process(delta_time)
///if there is enough coolant var
var/cool = FALSE
var/amount = reagents.get_reagent_amount(/datum/reagent/cryostylane)
if(amount >= 0.1)
reagents.remove_reagent(/datum/reagent/cryostylane, 0.1)
var/amount = min(reagents.get_reagent_amount(/datum/reagent/cryostylane), 0.05 * delta_time)
if(amount > 0)
reagents.remove_reagent(/datum/reagent/cryostylane, amount)
cool = TRUE
else
amount = reagents.get_reagent_amount(/datum/reagent/consumable/ice)
if(amount >= 0.3)
reagents.remove_reagent(/datum/reagent/consumable/ice, 0.2)
amount = min(reagents.get_reagent_amount(/datum/reagent/consumable/ice), 0.1 * delta_time)
if(amount > 0)
reagents.remove_reagent(/datum/reagent/consumable/ice, amount)
cool = TRUE
if(!cooling && cool)
cooling = TRUE