mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
fixes signal circuit not working | refactors name of timer cooldown macros to be inherent, also docs them (#79367)
## About The Pull Request Title ## Why It's Good For The Game Less headache in the future for a macro thats not really obvious in what it does ## Changelog 🆑 fix: signals in circuits now actually function /🆑
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
return
|
||||
|
||||
// If we're going to the same place and the cooldown hasn't subsided, we're probably on the same path as before
|
||||
if (destination == old_dest && TIMER_COOLDOWN_CHECK(parent, COOLDOWN_CIRCUIT_PATHFIND_SAME))
|
||||
if (destination == old_dest && TIMER_COOLDOWN_RUNNING(parent, COOLDOWN_CIRCUIT_PATHFIND_SAME))
|
||||
|
||||
// Check if the current turf is the same as the current turf we're supposed to be in. If so, then we set the next step as the next turf on the list
|
||||
if(current_turf == next_turf)
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
else // Either we're not going to the same place or the cooldown is over. Either way, we need a new path
|
||||
|
||||
if(destination != old_dest && TIMER_COOLDOWN_CHECK(parent, COOLDOWN_CIRCUIT_PATHFIND_DIF))
|
||||
if(destination != old_dest && TIMER_COOLDOWN_RUNNING(parent, COOLDOWN_CIRCUIT_PATHFIND_DIF))
|
||||
failed.set_output(COMPONENT_SIGNAL)
|
||||
reason_failed.set_output("Cooldown still active!")
|
||||
return
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
INVOKE_ASYNC(src, PROC_REF(handle_radio_input), port)
|
||||
|
||||
/obj/item/circuit_component/radio/proc/handle_radio_input(datum/port/input/port)
|
||||
if(!TIMER_COOLDOWN_CHECK(parent, COOLDOWN_SIGNALLER_SEND))
|
||||
if(TIMER_COOLDOWN_RUNNING(parent, COOLDOWN_SIGNALLER_SEND))
|
||||
return
|
||||
|
||||
var/frequency = freq.value
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
if(!parent.shell)
|
||||
return
|
||||
|
||||
if(TIMER_COOLDOWN_CHECK(parent.shell, COOLDOWN_CIRCUIT_SOUNDEMITTER))
|
||||
if(TIMER_COOLDOWN_RUNNING(parent.shell, COOLDOWN_CIRCUIT_SOUNDEMITTER))
|
||||
return
|
||||
|
||||
var/sound_to_play = options_map[sound_file.value]
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if(!parent.shell)
|
||||
return
|
||||
|
||||
if(TIMER_COOLDOWN_CHECK(parent.shell, COOLDOWN_CIRCUIT_SPEECH))
|
||||
if(TIMER_COOLDOWN_RUNNING(parent.shell, COOLDOWN_CIRCUIT_SPEECH))
|
||||
return
|
||||
|
||||
if(message.value)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
if(!owner || !istype(owner) || !owner.client)
|
||||
return
|
||||
|
||||
if(TIMER_COOLDOWN_CHECK(parent.shell, COOLDOWN_CIRCUIT_TARGET_INTERCEPT))
|
||||
if(TIMER_COOLDOWN_RUNNING(parent.shell, COOLDOWN_CIRCUIT_TARGET_INTERCEPT))
|
||||
return
|
||||
|
||||
to_chat(owner, "<B>Left-click to trigger target interceptor!</B>")
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(!parent.shell)
|
||||
return
|
||||
|
||||
if(TIMER_COOLDOWN_CHECK(parent.shell, COOLDOWN_CIRCUIT_VIEW_SENSOR))
|
||||
if(TIMER_COOLDOWN_RUNNING(parent.shell, COOLDOWN_CIRCUIT_VIEW_SENSOR))
|
||||
result.set_output(null)
|
||||
cooldown.set_output(COMPONENT_SIGNAL)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user