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
+5 -5
View File
@@ -8,15 +8,15 @@
pickup_sound = 'sound/items/handling/component_pickup.ogg'
var/timing = FALSE
var/time = 5
var/saved_time = 5
var/time = 10
var/saved_time = 10
var/loop = FALSE
var/hearing_range = 3
/obj/item/assembly/timer/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] looks at the timer and decides [user.p_their()] fate! It looks like [user.p_theyre()] going to commit suicide!</span>")
activate()//doesnt rely on timer_end to prevent weird metas where one person can control the timer and therefore someone's life. (maybe that should be how it works...)
addtimer(CALLBACK(src, .proc/manual_suicide, user), time*10)//kill yourself once the time runs out
addtimer(CALLBACK(src, .proc/manual_suicide, user), time SECONDS)//kill yourself once the time runs out
return MANUAL_SUICIDE
/obj/item/assembly/timer/proc/manual_suicide(mob/living/user)
@@ -66,10 +66,10 @@
timing = TRUE
update_icon()
/obj/item/assembly/timer/process()
/obj/item/assembly/timer/process(delta_time)
if(!timing)
return
time--
time -= delta_time
if(time <= 0)
timing = FALSE
timer_end()