mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Defers pipenet and powernet rebuilds upon destruction of pipes and cables so explosions are faster
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
name = "passive gate"
|
||||
desc = "A one-way air valve that does not require power"
|
||||
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
var/on = 0
|
||||
@@ -15,7 +15,7 @@
|
||||
var/frequency = 0
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/initialize()
|
||||
..()
|
||||
if(frequency)
|
||||
@@ -34,8 +34,7 @@
|
||||
add_underlay(T, node2, dir)
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/process()
|
||||
..()
|
||||
if(!on)
|
||||
if(!..() || !on)
|
||||
return 0
|
||||
|
||||
var/output_starting_pressure = air2.return_pressure()
|
||||
@@ -60,6 +59,7 @@
|
||||
parent1.update = 1
|
||||
|
||||
parent2.update = 1
|
||||
return 1
|
||||
|
||||
//Radio remote control
|
||||
/obj/machinery/atmospherics/binary/passive_gate/proc/set_frequency(new_frequency)
|
||||
@@ -100,7 +100,7 @@
|
||||
/obj/machinery/atmospherics/binary/passive_gate/receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
|
||||
|
||||
var/old_on = on //for logging
|
||||
|
||||
if("power" in signal.data)
|
||||
@@ -115,7 +115,7 @@
|
||||
text2num(signal.data["set_output_pressure"]),
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
|
||||
if(on != old_on)
|
||||
investigate_log("was turned [on ? "on" : "off"] by a remote signal", "atmos")
|
||||
|
||||
@@ -161,4 +161,3 @@
|
||||
to_chat(user, "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user