mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +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:
@@ -89,13 +89,13 @@
|
||||
held_mob = loc
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/ghost_chili/process()
|
||||
/obj/item/reagent_containers/food/snacks/grown/ghost_chili/process(delta_time)
|
||||
if(held_mob && loc == held_mob)
|
||||
if(held_mob.is_holding(src))
|
||||
if(istype(held_mob) && held_mob.gloves)
|
||||
return
|
||||
held_mob.adjust_bodytemperature(15 * TEMPERATURE_DAMAGE_COEFFICIENT)
|
||||
if(prob(10))
|
||||
held_mob.adjust_bodytemperature(7.5 * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time)
|
||||
if(DT_PROB(5, delta_time))
|
||||
to_chat(held_mob, "<span class='warning'>Your hand holding [src] burns!</span>")
|
||||
else
|
||||
held_mob = null
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/seeds/starthistle/corpse_flower/process()
|
||||
/obj/item/seeds/starthistle/corpse_flower/process(delta_time)
|
||||
var/obj/machinery/hydroponics/parent = loc
|
||||
if(parent.age < maturation) // Start a little before it blooms
|
||||
return
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
var/datum/gas_mixture/stank = new
|
||||
ADD_GAS(/datum/gas/miasma, stank.gases)
|
||||
stank.gases[/datum/gas/miasma][MOLES] = (yield + 6)*7*MIASMA_CORPSE_MOLES // this process is only being called about 2/7 as much as corpses so this is 12-32 times a corpses
|
||||
stank.gases[/datum/gas/miasma][MOLES] = (yield + 6)*3.5*MIASMA_CORPSE_MOLES*delta_time // this process is only being called about 2/7 as much as corpses so this is 12-32 times a corpses
|
||||
stank.temperature = T20C // without this the room would eventually freeze and miasma mining would be easier
|
||||
T.assume_air(stank)
|
||||
T.air_update_turf()
|
||||
|
||||
@@ -254,41 +254,41 @@
|
||||
if(burning & !grill)
|
||||
Burn()
|
||||
|
||||
/obj/structure/bonfire/proc/Burn()
|
||||
/obj/structure/bonfire/proc/Burn(delta_time = 2)
|
||||
var/turf/current_location = get_turf(src)
|
||||
current_location.hotspot_expose(1000,500,1)
|
||||
current_location.hotspot_expose(1000, 250 * delta_time, 1)
|
||||
for(var/A in current_location)
|
||||
if(A == src)
|
||||
continue
|
||||
if(isobj(A))
|
||||
var/obj/O = A
|
||||
O.fire_act(1000, 500)
|
||||
O.fire_act(1000, 250 * delta_time)
|
||||
else if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
L.adjust_fire_stacks(fire_stack_strength)
|
||||
L.adjust_fire_stacks(fire_stack_strength * 0.5 * delta_time)
|
||||
L.IgniteMob()
|
||||
|
||||
/obj/structure/bonfire/proc/Cook()
|
||||
/obj/structure/bonfire/proc/Cook(delta_time = 2)
|
||||
var/turf/current_location = get_turf(src)
|
||||
for(var/A in current_location)
|
||||
if(A == src)
|
||||
continue
|
||||
else if(isliving(A)) //It's still a fire, idiot.
|
||||
var/mob/living/L = A
|
||||
L.adjust_fire_stacks(fire_stack_strength)
|
||||
L.adjust_fire_stacks(fire_stack_strength * 0.5 * delta_time)
|
||||
L.IgniteMob()
|
||||
else if(istype(A, /obj/item) && prob(20))
|
||||
else if(istype(A, /obj/item) && DT_PROB(10, delta_time))
|
||||
var/obj/item/O = A
|
||||
O.microwave_act()
|
||||
|
||||
/obj/structure/bonfire/process()
|
||||
/obj/structure/bonfire/process(delta_time)
|
||||
if(!CheckOxygen())
|
||||
extinguish()
|
||||
return
|
||||
if(!grill)
|
||||
Burn()
|
||||
Burn(delta_time)
|
||||
else
|
||||
Cook()
|
||||
Cook(delta_time)
|
||||
|
||||
/obj/structure/bonfire/extinguish()
|
||||
if(burning)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/hydroponics/process()
|
||||
/obj/machinery/hydroponics/process(delta_time)
|
||||
var/needs_update = 0 // Checks if the icon needs updating so we don't redraw empty trays every time
|
||||
|
||||
if(myseed && (myseed.loc != src))
|
||||
@@ -136,9 +136,9 @@
|
||||
update_icon()
|
||||
|
||||
else if(self_sustaining)
|
||||
adjustWater(rand(1,2))
|
||||
adjustWeeds(-1)
|
||||
adjustPests(-1)
|
||||
adjustWater(rand(1,2) * delta_time * 0.5)
|
||||
adjustWeeds(-0.5 * delta_time)
|
||||
adjustPests(-0.5 * delta_time)
|
||||
|
||||
if(world.time > (lastcycle + cycledelay))
|
||||
lastcycle = world.time
|
||||
|
||||
Reference in New Issue
Block a user