Newmap - SMC, Openturf, Arrivals Controller, and Mine Turf Improvements (#1958)

* Replace SSingulo with SScalamity; processing cleanup
- SScalamity now handles blobs as well as singularity-types.
- Processing subtypes have been simplified to not require a stop_processing definition.

* this is probably important

* Remove cascade disabling SSgarbage

* Fixed a bug where dust() did not qdel the target mob

* Misc fixes

* Fix decals surviving break-to-plating

* Subsystem flag tweaks

* Apparently subsystems are new'd before config is.

* Fix paper icons

* Speculative fix for insane lag

* Better machinery stat

* Make organs not use SSoverlay

* Misc bugfixes & tweaks

* Nightmode fixes

* Changelog for SMC

* Port /tg/'s improved MC crash handling

* Add some more SS Recover() procs

* supply_controller -> SScargo

* More New() -> Initialize()

* pAI and robot construction overlays

* Fix cargo unit tests

* Merge the DMM Suite's atom/New() into atoms_init

* Lighting pre-baking

* Lighting initialization logging

* Fix some bad SS init orders

* Fix SSlighting logging; rename Processes to MC

* Speculative fix for insane GC lag

* Prebaked openturf/icon_smooth & fix lighting prebake

* SS init status; SSatoms LATEQDEL

* Fix bug with MC init stat panel

* Fix parallax

* Misc

* Ignore SS_NO_DISPLAY during init

* apparently this is important

* REEEEEE

* Image GC fixes; broadcaster radio-new sanity

* RCON Cleanup

* Move pAI recruiter into subsystem

* Move global solars list into sun subsystem

* Make chickens not use a global

* Demote SSdisposals to SS_BACKGROUND; garbage-debug cleanup

* Speed up space init a little

* Fix bad timer flags on floor drying

* Subsystem panic-restart verb for mins

* Explosion speedup

* Minor subsystem & MC logging tweaks

* SSopenturf improvements

* Make pipenet actually initialize (whoops)

* Minor tweaks

* Implement lighting rounding

* comments are hard okay

* Minor lattice tweaks

* Fix some timer issues & better closet init

* Timer sanity

* Request console tweaks + Storage init sanity

* Minor SSmachiner RCON improvements

* Further reduce world-start timer count

* Standardize subsystem logging

* Garbage hard delete profiling from /tg/

* Timer hang detection & recovery

* Log machines that sleep in process() and fuck up SSmachinery

* Fix an issue with external airlocks sleeping in process()

* Failsafe logging

* Minor tweaks

* Revert "Request console tweaks + Storage init sanity"

This reverts commit 98d3579e35.

* Re-implement RC changes

* Fix SQL FT saving

* Fix SSmachinery sleep in disposals

* Minor SS tweaks

* Paper fixes

* Blood drying fixes

* Merge gameticker and SSticker

* Minor global list init cleanup

* Lagcheck biogenerator & bags

* Tweak SScargo init order; RIG Initialize()

* Caching tweaks

* Remove rogue comma

* Initialize fixes

* Lighting destroy cleanup

* Fix emagging airlocks

* Initial SSicon implementation

* Tweaks & Fixes

* Fire + Air alarm queued icon updates

* Overlays + Queued icon cleanup

* Runtime & background fixes

* Kill some meaningless set statements

* Kill some image qdels

* Bump up lighting rounding val

* Fix adv. scanner destroy runtimes

* Remove unneeded icon update limiting

* Move icon smoothing into helpers

* Show a warning if DM 510 compiles without memory leak hack enabled

* Re-organize subsystems & MC defines a little

* Airlock SFX

* Log of Changes

* Make SSicon_update disable itself when not doing anything

* Fix respawn verb runtime when used early in server-init

* Add more information to MC's stat_entry()

* Replace direct refernces to gcDestroyed with QDEL* macros

* plant_controller -> SSplants

* More plant tweaks

* Add more humor to changelog

* Move parallax globals into SSparallax

* Lighting responsiveness tweaks

* Fix parallax init order & better MC init panel stat

* Make mobs GC

* More overlays + Remove intercom spawn()

* SSfast_process; make pinpointers not use spawn-recursion to process
Also made the SM Cascade beach process with SSprocessing instead of a spawn loop.

* Update changelog

* Mob GC tweaks

* Del() cleanup

* Fix insomniac ZAS connection edges

* Minor pAI cleanup

* Convert more things to SSoverlay; fix duplicated overlay in field gens

* SM Bluespace turf tweaks

* Update SSgarbage debug globals list

* Human-type qdel tweaks

* Subsystem suspension; stat_entry improvements

* SQL Statistics cleanup

* Fix runtimes with ambrosia

* More disable() -> suspend(); fix nightmode again

* Human qdel fix; minor tweaks

* Update turbolift to work with StonedMC

* Make lifts use timers instead of a subsystem

* Make SSassets start earlier

* Convert the radio controller into a subsystem

* Fix some missing CHECK_TICKs in asteroid generation

* MC stat tweaks; make shouldnt_see a typecache

* Kill some redundant debug-controller entries

* radio_controller -> SSradio

* Better SSgarbage hard-del logging from /tg/ upstream

* Logging tweaks + GELF

* Misc client caching improvements

* Slime SSoverlay

* Oven icon fixes

* Implant fixes
- Death implants will no longer spam Common on death of user.
- Death implants should handle a deleted user better.

* Holder tweaks + Welding tool Initialize()

* Fix some bad subsystem logging

* Fix suit cooling units spawning without cells

* Starlight tweaks

* Gibber infinite gib fix

* More SSoverlay stuff

* Make crates use CUT_OVERLAY_IN

* Make SSarrivals suspend instead of disable

* Make openturf use split/phased tick checks

* Speculative fix for unwet timer runtimes

* Blood overlay tweaks/fixes

* Update crusher to play nice with SMC + SSoverlay

* Openturf improvements and fixes

* Minor turbolift tweaks

* Lighting performance improvements + ChangeTurf tweaks

* this is probably important

* Fix wall weld noises on changeturf

* More ChangeTurf tweaks

* Explosion tweaks

* Pre-game lobby tweaks

* Openturf tweaks

* Prevent admins from starting the game before init finishes

* Fix Travis

* Kill an unused var

* Fix ChangeTurf runtimes on openturfs

* Fixes

* Browser datum fixes, asset caching

* Update changelog

* Changelog

* Lobby tweaks

* Ticker tweaks; kill ticker var

* Further lobby tweaks

* Cascade tweaks

* air_master -> SSair

* Reduce overhead from radio autosay

* alarm_manager -> SSalarm

* bomb_processor -> SSexplosives

* corp_regs -> SSlaw

* ZAS overlay fixes

* Small wall icon optimization

* Fix effects master

* Assembly tweaks

* Megavend fixes

* Shuttle fixes

* Camera alert performance improvements

* Fix some world.log spam from lighting overlays

* Fix some Initialize() procs

* Openspace responsiveness tweaks

* Make HE pipes animate through openturfs

* Kill a spawn
This commit is contained in:
Lohikar
2017-05-02 14:40:40 -04:00
committed by LordFowl
parent 9dbf27a0f4
commit f6dc33a465
872 changed files with 17767 additions and 13417 deletions
+19 -2
View File
@@ -11,7 +11,9 @@ Pipelines + Other Objects -> Pipe network
*/
/obj/machinery/atmospherics
auto_init = 0
var/auto_init = 0
var/no_special_init = FALSE
anchored = 1
idle_power_usage = 0
@@ -44,6 +46,18 @@ Pipelines + Other Objects -> Pipe network
pipe_color = null
..()
/obj/machinery/atmospherics/proc/initialize()
// Atmos machines are snowflakes and call initialize on themselves.
// Do not refactor initialize() to Initialize() unless you know what you are doing.
/obj/machinery/atmospherics/Initialize(mapload, ...)
if (no_special_init)
return ..()
. = ..()
if (mapload)
initialize()
/obj/machinery/atmospherics/attackby(atom/A, mob/user as mob)
if(istype(A, /obj/item/device/pipe_painter))
return
@@ -116,6 +130,9 @@ obj/machinery/atmospherics/proc/check_connect_types(obj/machinery/atmospherics/a
/obj/machinery/atmospherics/proc/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
// Used when two pipe_networks are combining
/obj/machinery/atmospherics/proc/remove_network(datum/pipe_network/network)
reassign_network(network, null)
/obj/machinery/atmospherics/proc/return_network_air(datum/network/reference)
// Return a list of gas_mixture(s) in the object
// associated with reference pipe_network for use in rebuilding the networks gases list
@@ -124,4 +141,4 @@ obj/machinery/atmospherics/proc/check_connect_types(obj/machinery/atmospherics/a
/obj/machinery/atmospherics/proc/disconnect(obj/machinery/atmospherics/reference)
/obj/machinery/atmospherics/update_icon()
return null
return null
@@ -42,19 +42,20 @@ obj/machinery/atmospherics/binary
return null
Destroy()
loc = null
QDEL_NULL(air1)
QDEL_NULL(air2)
if(node1)
node1.disconnect(src)
qdel(network1)
QDEL_NULL(network1)
if(node2)
node2.disconnect(src)
qdel(network2)
QDEL_NULL(network2)
node1 = null
node2 = null
..()
return ..()
initialize()
if(node1 && node2) return
@@ -130,4 +131,4 @@ obj/machinery/atmospherics/binary
update_icon()
update_underlays()
return null
return null
@@ -161,10 +161,10 @@
//Radio remote control
/obj/machinery/atmospherics/binary/dp_vent_pump/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
radio_connection = SSradio.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/dp_vent_pump/proc/broadcast_status()
if(!radio_connection)
@@ -250,12 +250,10 @@
)
if(signal.data["status"])
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
return //do not update_icon
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
update_icon()
#undef DEFAULT_PRESSURE_DELTA
@@ -96,10 +96,10 @@
//Radio remote control
/obj/machinery/atmospherics/binary/passive_gate/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
radio_connection = SSradio.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/passive_gate/proc/broadcast_status()
if(!radio_connection)
@@ -152,12 +152,10 @@
regulate_mode = text2num(signal.data["set_flow_rate"])
if("status" in signal.data)
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
return //do not update_icon
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
update_icon()
return
@@ -48,7 +48,7 @@
node1 = null
node2 = null
..()
return ..()
process()
..()
@@ -92,10 +92,10 @@ Thus, the two variables affect pump operation are set in New():
//Radio remote control
/obj/machinery/atmospherics/binary/pump/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
radio_connection = SSradio.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/pump/proc/broadcast_status()
if(!radio_connection)
@@ -169,12 +169,10 @@ Thus, the two variables affect pump operation are set in New():
)
if(signal.data["status"])
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
return //do not update_icon
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
update_icon()
return
@@ -28,7 +28,7 @@
input = null
output = null
filters.Cut()
..()
return ..()
/obj/machinery/atmospherics/omni/filter/sort_ports()
for(var/datum/omni_port/P in ports)
@@ -261,4 +261,4 @@
else
initialize_directions |= P.dir
P.connect()
P.update = 1
P.update = 1
@@ -52,7 +52,7 @@
/obj/machinery/atmospherics/omni/mixer/Destroy()
inputs.Cut()
output = null
..()
return ..()
/obj/machinery/atmospherics/omni/mixer/sort_ports()
for(var/datum/omni_port/P in ports)
@@ -293,4 +293,4 @@
/obj/machinery/atmospherics/omni/mixer/proc/con_lock(var/port = NORTH)
for(var/datum/omni_port/P in inputs)
if(P.dir == port)
P.con_lock = !P.con_lock
P.con_lock = !P.con_lock
@@ -240,7 +240,7 @@
qdel(P.network)
P.node = null
..()
return ..()
/obj/machinery/atmospherics/omni/initialize()
for(var/datum/omni_port/P in ports)
@@ -72,7 +72,7 @@
node = null
..()
return ..()
/obj/machinery/atmospherics/portables_connector/initialize()
if(node) return
@@ -31,10 +31,10 @@
var/datum/radio_frequency/radio_connection
/obj/machinery/atmospherics/trinary/filter/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/atmospherics/trinary/filter/New()
..()
@@ -51,23 +51,25 @@ obj/machinery/atmospherics/trinary
return null
Destroy()
loc = null
QDEL_NULL(air1)
QDEL_NULL(air2)
QDEL_NULL(air3)
if(node1)
node1.disconnect(src)
qdel(network1)
QDEL_NULL(network1)
if(node2)
node2.disconnect(src)
qdel(network2)
QDEL_NULL(network2)
if(node3)
node3.disconnect(src)
qdel(network3)
QDEL_NULL(network3)
node1 = null
node2 = null
node3 = null
..()
return ..()
initialize()
if(node1 && node2 && node3) return
@@ -164,4 +166,4 @@ obj/machinery/atmospherics/trinary
update_underlays()
return null
return null
+5 -5
View File
@@ -116,7 +116,7 @@
node2 = null
node3 = null
..()
return ..()
/obj/machinery/atmospherics/tvalve/proc/go_to_side()
@@ -313,10 +313,10 @@
//Radio remote control
/obj/machinery/atmospherics/tvalve/digital/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
@@ -453,10 +453,10 @@
//Radio remote control -eh?
/obj/machinery/atmospherics/tvalve/mirrored/digital/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/atmospherics/tvalve/mirrored/digital/initialize()
..()
@@ -32,14 +32,14 @@
process()
..()
if(!partner)
if(QDELETED(partner))
return 0
if(!air_master || air_master.current_cycle <= update_cycle)
if(!SSair || SSair.times_fired <= update_cycle)
return 0
update_cycle = air_master.current_cycle
partner.update_cycle = air_master.current_cycle
update_cycle = SSair.times_fired
partner.update_cycle = SSair.times_fired
var/air_heat_capacity = air_contents.heat_capacity()
var/other_air_heat_capacity = partner.air_contents.heat_capacity()
@@ -93,10 +93,10 @@
flick("inject", src)
/obj/machinery/atmospherics/unary/outlet_injector/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency)
radio_connection = SSradio.add_object(src, frequency)
/obj/machinery/atmospherics/unary/outlet_injector/proc/broadcast_status()
if(!radio_connection)
@@ -142,13 +142,11 @@
volume_rate = between(0, number, air_contents.volume)
if(signal.data["status"])
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
return //do not update_icon
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
update_icon()
/obj/machinery/atmospherics/unary/outlet_injector/hide(var/i)
update_underlays()
update_underlays()
@@ -29,15 +29,15 @@
return null
Destroy()
loc = null
QDEL_NULL(air_contents)
if(node)
node.disconnect(src)
qdel(network)
QDEL_NULL(network)
node = null
..()
return ..()
initialize()
if(node) return
@@ -100,4 +100,4 @@
/obj/machinery/atmospherics/unary/vent_scrubber/proc/is_welded()
if (welded > 0)
return 1
return 0
return 0
+29 -29
View File
@@ -72,17 +72,33 @@
/obj/machinery/atmospherics/unary/vent_pump/New()
..()
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP
/obj/machinery/atmospherics/unary/vent_pump/Initialize()
. = ..()
icon = null
initial_loc = get_area(loc)
area_uid = initial_loc.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
//some vents work his own special way
radio_filter_in = frequency==1439?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==1439?(RADIO_TO_AIRALARM):null
if(frequency)
radio_connection = register_radio(src, frequency, frequency, radio_filter_in)
initialize()
// Different from the above.
/obj/machinery/atmospherics/unary/vent_pump/initialize()
..()
broadcast_status()
/obj/machinery/atmospherics/unary/vent_pump/Destroy()
unregister_radio(src, frequency)
..()
return ..()
/obj/machinery/atmospherics/unary/vent_pump/high_volume
name = "Large Air Vent"
@@ -103,14 +119,10 @@
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP + 500 //meant to match air injector
/obj/machinery/atmospherics/unary/vent_pump/update_icon(var/safety = 0)
if(!check_icon_cache())
return
if (!node)
use_power = 0
overlays.Cut()
var/vent_icon = "vent"
var/vent_icon = ""
var/turf/T = get_turf(src)
if(!istype(T))
@@ -126,7 +138,7 @@
else
vent_icon += "[use_power ? "[pump_direction ? "out" : "in"]" : "off"]"
overlays += icon_manager.get_atmos_icon("device", , , vent_icon)
icon_state = vent_icon
/obj/machinery/atmospherics/unary/vent_pump/update_underlays()
if(..())
@@ -240,27 +252,17 @@
"flow_rate" = last_flow_rate
)
if(!initial_loc.air_vent_names[id_tag])
var/new_name = "[initial_loc.name] Vent Pump #[initial_loc.air_vent_names.len+1]"
initial_loc.air_vent_names[id_tag] = new_name
var/area/A = get_area(src)
if(!A.air_vent_names[id_tag])
var/new_name = "[A.name] Vent Pump #[A.air_vent_names.len+1]"
A.air_vent_names[id_tag] = new_name
src.name = new_name
initial_loc.air_vent_info[id_tag] = signal.data
A.air_vent_info[id_tag] = signal.data
radio_connection.post_signal(src, signal, radio_filter_out)
return 1
/obj/machinery/atmospherics/unary/vent_pump/initialize()
..()
//some vents work his own special way
radio_filter_in = frequency==1439?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==1439?(RADIO_TO_AIRALARM):null
if(frequency)
radio_connection = register_radio(src, frequency, frequency, radio_filter_in)
src.broadcast_status()
/obj/machinery/atmospherics/unary/vent_pump/receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
@@ -338,13 +340,12 @@
return
if(signal.data["status"] != null)
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
return //do not update_icon
//log_debug("DEBUG \[[world.timeofday]\]: vent_pump/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
update_icon()
return
@@ -418,8 +419,7 @@
if(initial_loc)
initial_loc.air_vent_info -= id_tag
initial_loc.air_vent_names -= id_tag
..()
return
return ..()
#undef DEFAULT_PRESSURE_DELTA
@@ -28,6 +28,7 @@
var/radio_filter_in
var/welded = 0
//no_special_init = TRUE
/obj/machinery/atmospherics/unary/vent_scrubber/on
use_power = 1
@@ -37,39 +38,47 @@
..()
air_contents.volume = ATMOS_DEFAULT_VOLUME_FILTER
icon = null
/obj/machinery/atmospherics/unary/vent_scrubber/Initialize()
. = ..()
initial_loc = get_area(loc)
area_uid = initial_loc.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
radio_filter_in = frequency==initial(frequency)?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null
if (frequency)
set_frequency(frequency)
initialize()
/obj/machinery/atmospherics/unary/vent_scrubber/initialize()
..()
broadcast_status()
/obj/machinery/atmospherics/unary/vent_scrubber/Destroy()
unregister_radio(src, frequency)
..()
return ..()
/obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0)
if(!check_icon_cache())
return
overlays.Cut()
var/turf/T = get_turf(src)
if(!istype(T))
return
var/scrubber_icon = "scrubber"
if(welded)
scrubber_icon += "weld"
if (welded)
icon_state = "weld"
return
if (!powered() || !use_power)
icon_state = "off"
else if (scrubbing)
icon_state = "on"
else
if(!powered())
scrubber_icon += "off"
else
scrubber_icon += "[use_power ? "[scrubbing ? "on" : "in"]" : "off"]"
overlays += icon_manager.get_atmos_icon("device", , , scrubber_icon)
icon_state = "in"
/obj/machinery/atmospherics/unary/vent_scrubber/update_underlays()
if(..())
underlays.Cut()
@@ -85,9 +94,9 @@
add_underlay(T,, dir)
/obj/machinery/atmospherics/unary/vent_scrubber/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency, radio_filter_in)
radio_connection = SSradio.add_object(src, frequency, radio_filter_in)
/obj/machinery/atmospherics/unary/vent_scrubber/proc/broadcast_status()
if(!radio_connection)
@@ -111,23 +120,17 @@
"filter_n2o" = ("sleeping_agent" in scrubbing_gas),
"sigtype" = "status"
)
if(!initial_loc.air_scrub_names[id_tag])
var/new_name = "[initial_loc.name] Air Scrubber #[initial_loc.air_scrub_names.len+1]"
initial_loc.air_scrub_names[id_tag] = new_name
var/area/A = get_area(src)
if(!A.air_scrub_names[id_tag])
var/new_name = "[A.name] Air Scrubber #[A.air_scrub_names.len+1]"
A.air_scrub_names[id_tag] = new_name
src.name = new_name
initial_loc.air_scrub_info[id_tag] = signal.data
A.air_scrub_info[id_tag] = signal.data
radio_connection.post_signal(src, signal, radio_filter_out)
return 1
/obj/machinery/atmospherics/unary/vent_scrubber/initialize()
..()
radio_filter_in = frequency==initial(frequency)?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null
if (frequency)
set_frequency(frequency)
src.broadcast_status()
/obj/machinery/atmospherics/unary/vent_scrubber/process()
..()
@@ -242,13 +245,11 @@
return
if(signal.data["status"] != null)
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
return //do not update_icon
// log_debug("DEBUG \[[world.timeofday]\]: vent_scrubber/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
spawn(2)
broadcast_status()
addtimer(CALLBACK(src, .proc/broadcast_status), 2, TIMER_UNIQUE)
update_icon()
return
@@ -320,5 +321,5 @@
if(initial_loc)
initial_loc.air_scrub_info -= id_tag
initial_loc.air_scrub_names -= id_tag
..()
return
return ..()
+3 -3
View File
@@ -83,7 +83,7 @@
node1 = null
node2 = null
..()
return ..()
/obj/machinery/atmospherics/valve/proc/open()
if(open) return 0
@@ -272,10 +272,10 @@
icon_state = "valve[open]nopower"
/obj/machinery/atmospherics/valve/digital/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/atmospherics/valve/digital/initialize()
..()
+62 -49
View File
@@ -1,6 +1,4 @@
var/global/list/datum/pipe_network/pipe_networks = list()
datum/pipe_network
/datum/pipe_network
var/list/datum/gas_mixture/gases = list() //All of the gas_mixtures continuously connected in this network
var/volume = 0 //caches the total volume for atmos machines to use in gas calculations
@@ -11,68 +9,83 @@ datum/pipe_network
var/update = 1
//var/datum/gas_mixture/air_transient = null
New()
//air_transient = new()
/*
/datum/pipe_network/New()
//air_transient = new()
..()
..()*/
proc/process()
//Equalize gases amongst pipe if called for
if(update)
update = 0
reconcile_air() //equalize_gases(gases)
/datum/pipe_network/process()
//Equalize gases amongst pipe if called for
if(update)
update = 0
reconcile_air() //equalize_gases(gases)
//Give pipelines their process call for pressure checking and what not. Have to remove pressure checks for the time being as pipes dont radiate heat - Mport
//for(var/datum/pipeline/line_member in line_members)
// line_member.process()
//Give pipelines their process call for pressure checking and what not. Have to remove pressure checks for the time being as pipes dont radiate heat - Mport
//for(var/datum/pipeline/line_member in line_members)
// line_member.process()
proc/build_network(obj/machinery/atmospherics/start_normal, obj/machinery/atmospherics/reference)
//Purpose: Generate membership roster
//Notes: Assuming that members will add themselves to appropriate roster in network_expand()
/datum/pipe_network/proc/build_network(obj/machinery/atmospherics/start_normal, obj/machinery/atmospherics/reference)
//Purpose: Generate membership roster
//Notes: Assuming that members will add themselves to appropriate roster in network_expand()
if(!start_normal)
qdel(src)
if(!start_normal)
qdel(src)
start_normal.network_expand(src, reference)
start_normal.network_expand(src, reference)
update_network_gases()
update_network_gases()
if((normal_members.len>0)||(line_members.len>0))
pipe_networks += src
else
qdel(src)
if((normal_members.len>0)||(line_members.len>0))
START_PROCESSING(SSpipenet, src)
else
qdel(src)
proc/merge(datum/pipe_network/giver)
if(giver==src) return 0
/datum/pipe_network/proc/merge(datum/pipe_network/giver)
if(giver==src) return 0
normal_members |= giver.normal_members
normal_members |= giver.normal_members
line_members |= giver.line_members
line_members |= giver.line_members
for(var/obj/machinery/atmospherics/normal_member in giver.normal_members)
normal_member.reassign_network(giver, src)
for(var/obj/machinery/atmospherics/normal_member in giver.normal_members)
normal_member.reassign_network(giver, src)
for(var/datum/pipeline/line_member in giver.line_members)
line_member.network = src
for(var/datum/pipeline/line_member in giver.line_members)
line_member.network = src
update_network_gases()
return 1
update_network_gases()
return 1
proc/update_network_gases()
//Go through membership roster and make sure gases is up to date
/datum/pipe_network/proc/update_network_gases()
//Go through membership roster and make sure gases is up to date
gases = list()
volume = 0
gases = list()
volume = 0
for(var/obj/machinery/atmospherics/normal_member in normal_members)
var/result = normal_member.return_network_air(src)
if(result) gases += result
for(var/obj/machinery/atmospherics/normal_member in normal_members)
var/result = normal_member.return_network_air(src)
if(result) gases += result
for(var/datum/pipeline/line_member in line_members)
gases += line_member.air
for(var/datum/gas_mixture/air in gases)
volume += air.volume
for(var/datum/pipeline/line_member in line_members)
gases += line_member.air
for(var/datum/gas_mixture/air in gases)
volume += air.volume
proc/reconcile_air()
equalize_gases(gases)
/datum/pipe_network/proc/reconcile_air()
equalize_gases(gases)
/datum/pipe_network/Destroy(force = FALSE)
STOP_PROCESSING(SSpipenet, src)
for (var/datum/pipeline/pipeline in line_members)
pipeline.network = null
line_members = null
for (var/obj/machinery/atmospherics/thing in normal_members)
thing.remove_network(src)
normal_members = null
return ..()
+168 -161
View File
@@ -1,5 +1,5 @@
datum/pipeline
/datum/pipeline
var/datum/gas_mixture/air
var/list/obj/machinery/atmospherics/pipe/members
@@ -9,208 +9,215 @@ datum/pipeline
var/alert_pressure = 0
Destroy()
if(network)
qdel(network)
/datum/pipeline/Destroy()
if(network)
QDEL_NULL(network)
if(air && air.volume)
temporarily_store_air()
qdel(air)
if(air && air.volume)
temporarily_store_air()
QDEL_NULL(air)
..()
for (var/obj/machinery/atmospherics/pipe/thing in members)
thing.parent = null
proc/process()//This use to be called called from the pipe networks
return ..()
//Check to see if pressure is within acceptable limits
var/pressure = air.return_pressure()
if(pressure > alert_pressure)
for(var/obj/machinery/atmospherics/pipe/member in members)
if(!member.check_pressure(pressure))
break //Only delete 1 pipe per process
proc/temporarily_store_air()
//Update individual gas_mixtures by volume ratio
/datum/pipeline/resetVariables()
..("members", "edges")
members = list()
edges = list()
/datum/pipeline/process()//This use to be called called from the pipe networks
//Check to see if pressure is within acceptable limits
var/pressure = air.return_pressure()
if(pressure > alert_pressure)
for(var/obj/machinery/atmospherics/pipe/member in members)
member.air_temporary = new
member.air_temporary.copy_from(air)
member.air_temporary.volume = member.volume
member.air_temporary.multiply(member.volume / air.volume)
if(!member.check_pressure(pressure))
break //Only delete 1 pipe per process
proc/build_pipeline(obj/machinery/atmospherics/pipe/base)
/datum/pipeline/proc/temporarily_store_air()
//Update individual gas_mixtures by volume ratio
for(var/obj/machinery/atmospherics/pipe/member in members)
member.air_temporary = new
member.air_temporary.copy_from(air)
member.air_temporary.volume = member.volume
member.air_temporary.multiply(member.volume / air.volume)
/datum/pipeline/proc/build_pipeline(obj/machinery/atmospherics/pipe/base)
air = new
var/list/possible_expansions = list(base)
members = list(base)
edges = list()
var/volume = base.volume
base.parent = src
alert_pressure = base.alert_pressure
if(base.air_temporary)
air = base.air_temporary
base.air_temporary = null
else
air = new
var/list/possible_expansions = list(base)
members = list(base)
edges = list()
while(possible_expansions.len>0)
for(var/obj/machinery/atmospherics/pipe/borderline in possible_expansions)
var/volume = base.volume
base.parent = src
alert_pressure = base.alert_pressure
var/list/result = borderline.pipeline_expansion()
var/edge_check = result.len
if(base.air_temporary)
air = base.air_temporary
base.air_temporary = null
else
air = new
if(result.len>0)
for(var/obj/machinery/atmospherics/pipe/item in result)
if(!members.Find(item))
members += item
possible_expansions += item
while(possible_expansions.len>0)
for(var/obj/machinery/atmospherics/pipe/borderline in possible_expansions)
volume += item.volume
item.parent = src
var/list/result = borderline.pipeline_expansion()
var/edge_check = result.len
alert_pressure = min(alert_pressure, item.alert_pressure)
if(result.len>0)
for(var/obj/machinery/atmospherics/pipe/item in result)
if(!members.Find(item))
members += item
possible_expansions += item
if(item.air_temporary)
air.merge(item.air_temporary)
volume += item.volume
item.parent = src
edge_check--
alert_pressure = min(alert_pressure, item.alert_pressure)
if(edge_check>0)
edges += borderline
if(item.air_temporary)
air.merge(item.air_temporary)
possible_expansions -= borderline
edge_check--
air.volume = volume
if(edge_check>0)
edges += borderline
/datum/pipeline/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
possible_expansions -= borderline
if(new_network.line_members.Find(src))
return 0
air.volume = volume
new_network.line_members += src
proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
network = new_network
if(new_network.line_members.Find(src))
return 0
for(var/obj/machinery/atmospherics/pipe/edge in edges)
for(var/obj/machinery/atmospherics/result in edge.pipeline_expansion())
if(!istype(result,/obj/machinery/atmospherics/pipe) && (result!=reference))
result.network_expand(new_network, edge)
new_network.line_members += src
return 1
network = new_network
/datum/pipeline/proc/return_network(obj/machinery/atmospherics/reference)
if(!network)
network = new /datum/pipe_network
network.build_network(src, null)
//technically passing these parameters should not be allowed
//however pipe_network.build_network(..) and pipeline.network_extend(...)
// were setup to properly handle this case
for(var/obj/machinery/atmospherics/pipe/edge in edges)
for(var/obj/machinery/atmospherics/result in edge.pipeline_expansion())
if(!istype(result,/obj/machinery/atmospherics/pipe) && (result!=reference))
result.network_expand(new_network, edge)
return network
return 1
/datum/pipeline/proc/mingle_with_turf(turf/simulated/target, mingle_volume)
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
air_sample.volume = mingle_volume
proc/return_network(obj/machinery/atmospherics/reference)
if(!network)
network = new /datum/pipe_network()
network.build_network(src, null)
//technically passing these parameters should not be allowed
//however pipe_network.build_network(..) and pipeline.network_extend(...)
// were setup to properly handle this case
if(istype(target) && target.zone)
//Have to consider preservation of group statuses
var/datum/gas_mixture/turf_copy = new
return network
turf_copy.copy_from(target.zone.air)
turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group
proc/mingle_with_turf(turf/simulated/target, mingle_volume)
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
air_sample.volume = mingle_volume
equalize_gases(list(air_sample, turf_copy))
air.merge(air_sample)
if(istype(target) && target.zone)
//Have to consider preservation of group statuses
var/datum/gas_mixture/turf_copy = new
turf_copy.subtract(target.zone.air)
turf_copy.copy_from(target.zone.air)
turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group
target.zone.air.merge(turf_copy)
equalize_gases(list(air_sample, turf_copy))
air.merge(air_sample)
else
var/datum/gas_mixture/turf_air = target.return_air()
turf_copy.subtract(target.zone.air)
equalize_gases(list(air_sample, turf_air))
air.merge(air_sample)
//turf_air already modified by equalize_gases()
target.zone.air.merge(turf_copy)
if(network)
network.update = 1
else
var/datum/gas_mixture/turf_air = target.return_air()
/datum/pipeline/proc/temperature_interact(turf/target, share_volume, thermal_conductivity)
var/total_heat_capacity = air.heat_capacity()
var/partial_heat_capacity = total_heat_capacity*(share_volume/air.volume)
equalize_gases(list(air_sample, turf_air))
air.merge(air_sample)
//turf_air already modified by equalize_gases()
if(istype(target, /turf/simulated))
var/turf/simulated/modeled_location = target
if(network)
network.update = 1
if(modeled_location.blocks_air)
proc/temperature_interact(turf/target, share_volume, thermal_conductivity)
var/total_heat_capacity = air.heat_capacity()
var/partial_heat_capacity = total_heat_capacity*(share_volume/air.volume)
if(istype(target, /turf/simulated))
var/turf/simulated/modeled_location = target
if(modeled_location.blocks_air)
if((modeled_location.heat_capacity>0) && (partial_heat_capacity>0))
var/delta_temperature = air.temperature - modeled_location.temperature
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*modeled_location.heat_capacity/(partial_heat_capacity+modeled_location.heat_capacity))
air.temperature -= heat/total_heat_capacity
modeled_location.temperature += heat/modeled_location.heat_capacity
else
var/delta_temperature = 0
var/sharer_heat_capacity = 0
if(modeled_location.zone)
delta_temperature = (air.temperature - modeled_location.zone.air.temperature)
sharer_heat_capacity = modeled_location.zone.air.heat_capacity()
else
delta_temperature = (air.temperature - modeled_location.air.temperature)
sharer_heat_capacity = modeled_location.air.heat_capacity()
var/self_temperature_delta = 0
var/sharer_temperature_delta = 0
if((sharer_heat_capacity>0) && (partial_heat_capacity>0))
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*sharer_heat_capacity/(partial_heat_capacity+sharer_heat_capacity))
self_temperature_delta = -heat/total_heat_capacity
sharer_temperature_delta = heat/sharer_heat_capacity
else
return 1
air.temperature += self_temperature_delta
if(modeled_location.zone)
modeled_location.zone.air.temperature += sharer_temperature_delta/modeled_location.zone.air.group_multiplier
else
modeled_location.air.temperature += sharer_temperature_delta
else
if((target.heat_capacity>0) && (partial_heat_capacity>0))
var/delta_temperature = air.temperature - target.temperature
if((modeled_location.heat_capacity>0) && (partial_heat_capacity>0))
var/delta_temperature = air.temperature - modeled_location.temperature
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
(partial_heat_capacity*modeled_location.heat_capacity/(partial_heat_capacity+modeled_location.heat_capacity))
air.temperature -= heat/total_heat_capacity
if(network)
network.update = 1
modeled_location.temperature += heat/modeled_location.heat_capacity
else
var/delta_temperature = 0
var/sharer_heat_capacity = 0
if(modeled_location.zone)
delta_temperature = (air.temperature - modeled_location.zone.air.temperature)
sharer_heat_capacity = modeled_location.zone.air.heat_capacity()
else
delta_temperature = (air.temperature - modeled_location.air.temperature)
sharer_heat_capacity = modeled_location.air.heat_capacity()
var/self_temperature_delta = 0
var/sharer_temperature_delta = 0
if((sharer_heat_capacity>0) && (partial_heat_capacity>0))
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*sharer_heat_capacity/(partial_heat_capacity+sharer_heat_capacity))
self_temperature_delta = -heat/total_heat_capacity
sharer_temperature_delta = heat/sharer_heat_capacity
else
return 1
air.temperature += self_temperature_delta
if(modeled_location.zone)
modeled_location.zone.air.temperature += sharer_temperature_delta/modeled_location.zone.air.group_multiplier
else
modeled_location.air.temperature += sharer_temperature_delta
else
if((target.heat_capacity>0) && (partial_heat_capacity>0))
var/delta_temperature = air.temperature - target.temperature
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
air.temperature -= heat/total_heat_capacity
if(network)
network.update = 1
//surface must be the surface area in m^2
proc/radiate_heat_to_space(surface, thermal_conductivity)
var/gas_density = air.total_moles/air.volume
thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*GAS_CRITICAL_TEMPERATURE) ), 1) //mult by density ratio
// We only get heat from the star on the exposed surface area.
// If the HE pipes gain more energy from AVERAGE_SOLAR_RADIATION than they can radiate, then they have a net heat increase.
var/heat_gain = AVERAGE_SOLAR_RADIATION * (RADIATOR_EXPOSED_SURFACE_AREA_RATIO * surface) * thermal_conductivity
// Previously, the temperature would enter equilibrium at 26C or 294K.
// Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on.
// It currently should stabilise at 129.6K or -143.6C
heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4
air.add_thermal_energy(heat_gain)
if(network)
network.update = 1
/datum/pipeline/proc/radiate_heat_to_space(surface, thermal_conductivity)
var/gas_density = air.total_moles/air.volume
thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*GAS_CRITICAL_TEMPERATURE) ), 1) //mult by density ratio
// We only get heat from the star on the exposed surface area.
// If the HE pipes gain more energy from AVERAGE_SOLAR_RADIATION than they can radiate, then they have a net heat increase.
var/heat_gain = AVERAGE_SOLAR_RADIATION * (RADIATOR_EXPOSED_SURFACE_AREA_RATIO * surface) * thermal_conductivity
// Previously, the temperature would enter equilibrium at 26C or 294K.
// Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on.
// It currently should stabilise at 129.6K or -143.6C
heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4
air.add_thermal_energy(heat_gain)
if(network)
network.update = 1
+4 -3
View File
@@ -98,9 +98,10 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
h_g = 64 + (h_g - 64)*scale
h_b = 64 + (h_b - 64)*scale
animate(src, color = rgb(h_r, h_g, h_b), time = 20, easing = SINE_EASING)
var/list/animate_targets = get_above_oo() + src
for (var/thing in animate_targets)
var/atom/movable/AM = thing
animate(AM, color = rgb(h_r, h_g, h_b), time = 20, easing = SINE_EASING)
obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
+3 -3
View File
@@ -101,7 +101,7 @@ obj/machinery/atmospherics/mains_pipe
Destroy()
disconnect()
..()
return ..()
initialize()
for(var/i = 1 to nodes.len)
@@ -657,10 +657,10 @@ obj/machinery/atmospherics/mains_pipe/valve
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
var/frequency = 0
var/id = null
+59 -36
View File
@@ -64,11 +64,12 @@
return parent.return_network(reference)
/obj/machinery/atmospherics/pipe/Destroy()
qdel(parent)
QDEL_NULL(parent)
if(air_temporary)
loc.assume_air(air_temporary)
QDEL_NULL(air_temporary)
..()
return ..()
/obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (istype(src, /obj/machinery/atmospherics/pipe/tank))
@@ -231,7 +232,10 @@
if(node2)
node2.disconnect(src)
..()
node1 = null
node2 = null
return ..()
/obj/machinery/atmospherics/pipe/simple/pipeline_expansion()
return list(node1, node2)
@@ -250,7 +254,7 @@
alpha = 255
overlays.Cut()
cut_overlays()
if(!node1 && !node2)
var/turf/T = get_turf(src)
@@ -261,9 +265,9 @@
qdel(meter)
qdel(src)
else if(node1 && node2)
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]")
add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]"))
else
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]exposed[node1?1:0][node2?1:0][icon_connect_type]")
add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]exposed[node1?1:0][node2?1:0][icon_connect_type]"))
/obj/machinery/atmospherics/pipe/simple/update_underlays()
return
@@ -302,12 +306,12 @@
/obj/machinery/atmospherics/pipe/simple/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node1 = null
if(reference == node2)
if(istype(node2, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node2 = null
update_icon()
@@ -462,22 +466,26 @@
if(node3)
node3.disconnect(src)
..()
node1 = null
node2 = null
node3 = null
return ..()
/obj/machinery/atmospherics/pipe/manifold/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node1 = null
if(reference == node2)
if(istype(node2, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node2 = null
if(reference == node3)
if(istype(node3, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node3 = null
update_icon()
@@ -509,9 +517,11 @@
qdel(meter)
qdel(src)
else
overlays.Cut()
overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type)
overlays += icon_manager.get_atmos_icon("manifold", , , "clamps" + icon_connect_type)
cut_overlays()
add_overlay(icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type))
add_overlay(icon_manager.get_atmos_icon("manifold", , , "clamps" + icon_connect_type))
// Can't handle underlays with SSoverlay.
underlays.Cut()
var/turf/T = get_turf(src)
@@ -703,27 +713,32 @@
if(node4)
node4.disconnect(src)
..()
node1 = null
node2 = null
node3 = null
node4 = null
return ..()
/obj/machinery/atmospherics/pipe/manifold4w/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node1 = null
if(reference == node2)
if(istype(node2, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node2 = null
if(reference == node3)
if(istype(node3, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node3 = null
if(reference == node4)
if(istype(node4, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node4 = null
update_icon()
@@ -757,9 +772,10 @@
qdel(meter)
qdel(src)
else
overlays.Cut()
overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type)
overlays += icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type)
cut_overlays()
add_overlay(icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type))
add_overlay(icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type))
underlays.Cut()
/*
@@ -953,12 +969,14 @@
if(node)
node.disconnect(src)
..()
node = null
return ..()
/obj/machinery/atmospherics/pipe/cap/disconnect(obj/machinery/atmospherics/reference)
if(reference == node)
if(istype(node, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node = null
update_icon()
@@ -977,8 +995,8 @@
alpha = 255
overlays.Cut()
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "cap")
cut_overlays()
add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "cap"))
/obj/machinery/atmospherics/pipe/cap/initialize()
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
@@ -1067,7 +1085,9 @@
if(node1)
node1.disconnect(src)
..()
node1 = null
return ..()
/obj/machinery/atmospherics/pipe/tank/pipeline_expansion()
return list(node1)
@@ -1097,7 +1117,7 @@
/obj/machinery/atmospherics/pipe/tank/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node1 = null
update_underlays()
@@ -1237,7 +1257,9 @@
if(node1)
node1.disconnect(src)
..()
node1 = null
return ..()
/obj/machinery/atmospherics/pipe/vent/pipeline_expansion()
return list(node1)
@@ -1265,7 +1287,7 @@
/obj/machinery/atmospherics/pipe/vent/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
qdel(parent)
QDEL_NULL(parent)
node1 = null
update_icon()
@@ -1292,8 +1314,8 @@
alpha = 255
overlays.Cut()
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
cut_overlays()
add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "universal"))
underlays.Cut()
if (node1)
@@ -1307,7 +1329,7 @@
universal_underlays(node2)
else
universal_underlays(,dir)
universal_underlays(dir, -180)
universal_underlays(,turn(dir, -180))
/obj/machinery/atmospherics/pipe/simple/visible/universal/update_underlays()
..()
@@ -1327,8 +1349,9 @@
alpha = 255
overlays.Cut()
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
cut_overlays()
add_overlay(icon_manager.get_atmos_icon("pipe", , pipe_color, "universal"))
underlays.Cut()
if (node1)