mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
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:
@@ -20,7 +20,7 @@
|
||||
var/stored_energy = 0
|
||||
var/active = 0
|
||||
var/locked = FALSE
|
||||
var/drainratio = 1
|
||||
var/drainratio = 0.5
|
||||
var/powerproduction_drain = 0.001
|
||||
|
||||
/obj/machinery/power/rad_collector/anchored/Initialize()
|
||||
@@ -37,7 +37,7 @@
|
||||
/obj/machinery/power/rad_collector/should_have_node()
|
||||
return anchored
|
||||
|
||||
/obj/machinery/power/rad_collector/process()
|
||||
/obj/machinery/power/rad_collector/process(delta_time)
|
||||
if(!loaded_tank)
|
||||
return
|
||||
if(!loaded_tank.air_contents.gases[/datum/gas/plasma])
|
||||
@@ -45,7 +45,7 @@
|
||||
playsound(src, 'sound/machines/ding.ogg', 50, TRUE)
|
||||
eject()
|
||||
else
|
||||
var/gasdrained = min(powerproduction_drain*drainratio,loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES])
|
||||
var/gasdrained = min(powerproduction_drain*drainratio*delta_time,loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES])
|
||||
loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] -= gasdrained
|
||||
loaded_tank.air_contents.assert_gas(/datum/gas/tritium)
|
||||
loaded_tank.air_contents.gases[/datum/gas/tritium][MOLES] += gasdrained
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
if(. && !anchored)
|
||||
step(src, get_dir(M, src))
|
||||
|
||||
/obj/machinery/power/emitter/process()
|
||||
/obj/machinery/power/emitter/process(delta_time)
|
||||
if(machine_stat & (BROKEN))
|
||||
return
|
||||
if(!welded || (!powernet && active_power_usage))
|
||||
@@ -197,7 +197,7 @@
|
||||
log_game("Emitter lost power in [AREACOORD(src)]")
|
||||
return
|
||||
if(charge <= 80)
|
||||
charge += 5
|
||||
charge += 2.5 * delta_time
|
||||
if(!check_delay() || manual == TRUE)
|
||||
return FALSE
|
||||
fire_beam()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/the_singularitygen/process()
|
||||
/obj/machinery/the_singularitygen/process(delta_time)
|
||||
if(energy > 0)
|
||||
if(energy >= 200)
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -32,4 +32,4 @@
|
||||
transfer_fingerprints_to(S)
|
||||
qdel(src)
|
||||
else
|
||||
energy -= 1
|
||||
energy -= delta_time * 0.5
|
||||
|
||||
Reference in New Issue
Block a user