mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[MIRROR] Removing random sleeps (#10165)
Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Willburd <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a182c4528d
commit
ff165c6c71
@@ -235,11 +235,10 @@
|
||||
//If we're in an area that is fucking ideal, and we don't have to do anything, chances are we won't next tick either so why redo these calculations?
|
||||
//JESUS FUCK. THERE ARE LITERALLY 250 OF YOU MOTHERFUCKERS ON ZLEVEL ONE AND YOU DO THIS SHIT EVERY TICK WHEN VERY OFTEN THERE IS NO REASON TO
|
||||
|
||||
if(pump_direction && pressure_checks == PRESSURE_CHECK_EXTERNAL && controller_iteration > 10) //99% of all vents
|
||||
if(pump_direction && pressure_checks == PRESSURE_CHECK_EXTERNAL && Master.iteration > 10) //99% of all vents
|
||||
//Fucking hibernate because you ain't doing shit.
|
||||
hibernate = 1
|
||||
spawn(rand(100,200)) //hibernate for 10 or 20 seconds randomly
|
||||
hibernate = 0
|
||||
addtimer(VARSET_CALLBACK(src, hibernate, 0), rand(10 SECONDS,20 SECONDS), TIMER_DELETE_ME) //hibernate randomly
|
||||
|
||||
|
||||
if (power_draw >= 0)
|
||||
@@ -380,13 +379,11 @@
|
||||
return
|
||||
|
||||
if(signal.data["status"] != null)
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
addtimer(CALLBACK(src, PROC_REF(broadcast_status)), 2, TIMER_DELETE_ME)
|
||||
return //do not update_icon
|
||||
|
||||
//log_admin("DEBUG \[[world.timeofday]\]: vent_pump/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
addtimer(CALLBACK(src, PROC_REF(broadcast_status)), 2, TIMER_DELETE_ME)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
@@ -160,11 +160,10 @@
|
||||
|
||||
power_draw = pump_gas(src, environment, air_contents, transfer_moles, power_rating)
|
||||
|
||||
if(scrubbing && power_draw < 0 && controller_iteration > 10) //99% of all scrubbers
|
||||
if(scrubbing && power_draw < 0 && Master.iteration > 10) //99% of all scrubbers
|
||||
//Fucking hibernate because you ain't doing shit.
|
||||
hibernate = 1
|
||||
spawn(rand(100,200)) //hibernate for 10 or 20 seconds randomly
|
||||
hibernate = 0
|
||||
addtimer(VARSET_CALLBACK(src, hibernate, 0), rand(10 SECONDS,20 SECONDS), TIMER_DELETE_ME) //hibernate randomly
|
||||
|
||||
if (power_draw >= 0)
|
||||
last_power_draw = power_draw
|
||||
@@ -253,13 +252,11 @@
|
||||
return
|
||||
|
||||
if(signal.data["status"] != null)
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
addtimer(CALLBACK(src, PROC_REF(broadcast_status)), 2, TIMER_DELETE_ME)
|
||||
return //do not update_icon
|
||||
|
||||
// log_admin("DEBUG \[[world.timeofday]\]: vent_scrubber/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
addtimer(CALLBACK(src, PROC_REF(broadcast_status)), 2, TIMER_DELETE_ME)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user