mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +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:
@@ -122,8 +122,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
||||
var/seconds_electrified = MACHINE_NOT_ELECTRIFIED
|
||||
///When this is TRUE, we fire items at customers! We're broken!
|
||||
var/shoot_inventory = 0
|
||||
///How likely this is to happen (prob 100)
|
||||
var/shoot_inventory_chance = 2
|
||||
///How likely this is to happen (prob 100) per second
|
||||
var/shoot_inventory_chance = 1
|
||||
//Stop spouting those godawful pitches!
|
||||
var/shut_up = 0
|
||||
///can we access the hidden inventory?
|
||||
@@ -871,7 +871,7 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
SSblackbox.record_feedback("nested tally", "vending_machine_usage", 1, list("[type]", "[R.product_path]"))
|
||||
vend_ready = TRUE
|
||||
|
||||
/obj/machinery/vending/process()
|
||||
/obj/machinery/vending/process(delta_time)
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
return PROCESS_KILL
|
||||
if(!active)
|
||||
@@ -881,12 +881,12 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
seconds_electrified--
|
||||
|
||||
//Pitch to the people! Really sell it!
|
||||
if(last_slogan + slogan_delay <= world.time && slogan_list.len > 0 && !shut_up && prob(5))
|
||||
if(last_slogan + slogan_delay <= world.time && slogan_list.len > 0 && !shut_up && DT_PROB(2.5, delta_time))
|
||||
var/slogan = pick(slogan_list)
|
||||
speak(slogan)
|
||||
last_slogan = world.time
|
||||
|
||||
if(shoot_inventory && prob(shoot_inventory_chance))
|
||||
if(shoot_inventory && DT_PROB(shoot_inventory_chance, delta_time))
|
||||
throw_item()
|
||||
/**
|
||||
* Speak the given message verbally
|
||||
|
||||
Reference in New Issue
Block a user