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
+4 -4
View File
@@ -22,7 +22,7 @@
// Denial of Service attack variables
var/dos_overload = 0 // Amount of DoS "packets" in this relay's buffer
var/dos_capacity = 500 // Amount of DoS "packets" in buffer required to crash the relay
var/dos_dissipate = 1 // Amount of DoS "packets" dissipated over time.
var/dos_dissipate = 0.5 // Amount of DoS "packets" dissipated over time.
///Proc called to change the value of the `relay_enabled` variable and append behavior related to its change.
@@ -64,7 +64,7 @@
else
icon_state = "bus_off"
/obj/machinery/ntnet_relay/process()
/obj/machinery/ntnet_relay/process(delta_time)
if(is_operational)
use_power = ACTIVE_POWER_USE
else
@@ -72,8 +72,8 @@
update_icon()
if(dos_overload)
dos_overload = max(0, dos_overload - dos_dissipate)
if(dos_overload > 0)
dos_overload = max(0, dos_overload - dos_dissipate * delta_time)
// If DoS traffic exceeded capacity, crash.
if((dos_overload > dos_capacity) && !dos_failure)