Atmos construction rework again

This commit is contained in:
duncathan salt
2017-10-23 15:29:36 -06:00
committed by CitadelStationBot
parent 3243eaa6b8
commit ed12370a73
24 changed files with 223 additions and 285 deletions
@@ -36,6 +36,9 @@ Pipelines + Other Objects -> Pipe network
var/device_type = 0
var/list/obj/machinery/atmospherics/nodes
var/construction_type
var/pipe_state //icon_state as a pipe item
/obj/machinery/atmospherics/examine(mob/user)
..()
if(is_type_in_list(src, GLOB.ventcrawl_machinery) && isliving(user))
@@ -239,7 +242,7 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(can_unwrench)
var/obj/item/pipe/stored = new(loc, piping_layer, dir, src)
var/obj/item/pipe/stored = new construction_type(loc, null, dir, src)
stored.setPipingLayer(piping_layer)
if(!disassembled)
stored.obj_integrity = stored.max_integrity * 0.5
@@ -271,7 +274,7 @@ Pipelines + Other Objects -> Pipe network
if(unconnected & direction)
underlays += getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_exposed", direction)
/obj/machinery/atmospherics/on_construction(pipe_type, obj_color, set_layer)
/obj/machinery/atmospherics/on_construction(obj_color, set_layer)
if(can_unwrench)
add_atom_colour(obj_color, FIXED_COLOUR_PRIORITY)
pipe_color = obj_color
@@ -21,6 +21,9 @@ Passive gate is similar to the regular pump except:
var/id = null
var/datum/radio_frequency/radio_connection
construction_type = /obj/item/pipe/directional
pipe_state = "passivegate"
/obj/machinery/atmospherics/components/binary/passive_gate/Destroy()
SSradio.remove_object(src,frequency)
return ..()
@@ -167,4 +170,3 @@ Passive gate is similar to the regular pump except:
if(. && on)
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
@@ -26,6 +26,9 @@ Thus, the two variables affect pump operation are set in New():
var/id = null
var/datum/radio_frequency/radio_connection
construction_type = /obj/item/pipe/directional
pipe_state = "pump"
/obj/machinery/atmospherics/components/binary/pump/on
on = TRUE
@@ -175,7 +178,10 @@ Thus, the two variables affect pump operation are set in New():
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
<<<<<<< HEAD
else
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [A]")
return TRUE
=======
>>>>>>> e8c2109... Atmos construction rework again (#31944)
@@ -15,6 +15,9 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
var/open = FALSE
var/valve_type = "m" //lets us have a nice, clean, OOP update_icon_nopipes()
construction_type = /obj/item/pipe/binary
pipe_state = "mvalve"
/obj/machinery/atmospherics/components/binary/valve/open
open = TRUE
@@ -65,6 +68,7 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
desc = "A digitally controlled valve."
icon_state = "dvalve_map"
valve_type = "d"
pipe_state = "dvalve"
/obj/machinery/atmospherics/components/binary/valve/digital/attack_ai(mob/user)
return src.attack_hand(user)
@@ -26,6 +26,9 @@ Thus, the two variables affect pump operation are set in New():
var/id = null
var/datum/radio_frequency/radio_connection
construction_type = /obj/item/pipe/directional
pipe_state = "volumepump"
/obj/machinery/atmospherics/components/binary/volume_pump/Destroy()
SSradio.remove_object(src,frequency)
return ..()
@@ -171,7 +174,10 @@ Thus, the two variables affect pump operation are set in New():
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
<<<<<<< HEAD
else
investigate_log("Volume Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
message_admins("Volume Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(usr)] at [A]")
return
=======
>>>>>>> e8c2109... Atmos construction rework again (#31944)
@@ -10,6 +10,9 @@
var/frequency = 0
var/datum/radio_frequency/radio_connection
construction_type = /obj/item/pipe/trinary/flippable
pipe_state = "filter"
/obj/machinery/atmospherics/components/trinary/filter/flipped
icon_state = "filter_off_f"
flipped = TRUE
@@ -12,6 +12,9 @@
var/node1_concentration = 0.5
var/node2_concentration = 0.5
construction_type = /obj/item/pipe/trinary/flippable
pipe_state = "mixer"
//node 3 is the outlet, nodes 1 & 2 are intakes
/obj/machinery/atmospherics/components/trinary/mixer/flipped
@@ -171,4 +174,3 @@
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
@@ -12,6 +12,8 @@
var/obj/machinery/atmospherics/components/unary/heat_exchanger/partner = null
var/update_cycle
pipe_state = "heunary"
/obj/machinery/atmospherics/components/unary/heat_exchanger/update_icon()
if(NODE1)
icon_state = "he_intact"
@@ -18,6 +18,8 @@
level = 1
layer = GAS_SCRUBBER_LAYER
pipe_state = "injector"
/obj/machinery/atmospherics/components/unary/outlet_injector/Destroy()
SSradio.remove_object(src,frequency)
return ..()
@@ -188,4 +190,3 @@
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
@@ -9,6 +9,7 @@
level = 0
layer = GAS_FILTER_LAYER
pipe_flags = PIPING_ONE_PER_TURF
pipe_state = "connector"
/obj/machinery/atmospherics/components/unary/portables_connector/New()
..()
@@ -4,6 +4,7 @@
initialize_directions = SOUTH
device_type = UNARY
pipe_flags = PIPING_ONE_PER_TURF
construction_type = /obj/item/pipe/directional
/obj/machinery/atmospherics/components/unary/SetInitDirections()
initialize_directions = dir
@@ -31,6 +31,8 @@
var/radio_filter_out
var/radio_filter_in
pipe_state = "uvent"
/obj/machinery/atmospherics/components/unary/vent_pump/on
on = TRUE
icon_state = "vent_map_on"
@@ -34,6 +34,8 @@
var/radio_filter_out
var/radio_filter_in
pipe_state = "scrubber"
/obj/machinery/atmospherics/components/unary/vent_scrubber/New()
..()
if(!id_tag)
@@ -13,6 +13,9 @@
initialize_directions_he = SOUTH
device_type = BINARY
construction_type = /obj/item/pipe/directional
pipe_state = "junction"
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/SetInitDirections()
switch(dir)
@@ -43,4 +46,4 @@
return 0
init_dir = H.initialize_directions_he
if(init_dir & get_dir(target,src))
return 1
return 1
@@ -10,6 +10,9 @@
device_type = TRINARY
construction_type = /obj/item/pipe/trinary
pipe_state = "he_manifold"
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/SetInitDirections()
switch(dir)
if(NORTH)
@@ -44,6 +47,9 @@
device_type = QUATERNARY
construction_type = /obj/item/pipe/quaternary
pipe_state = "he_manifold4w"
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/SetInitDirections()
initialize_directions_he = initial(initialize_directions_he)
@@ -57,4 +63,4 @@
//Add non-broken pieces
for(DEVICE_TYPE_LOOP)
if(NODE_I)
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, NODE_I)))
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, NODE_I)))
@@ -9,6 +9,9 @@
device_type = BINARY
construction_type = /obj/item/pipe/binary/bendable
pipe_state = "he"
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/SetInitDirections()
if(dir in GLOB.diagonals)
initialize_directions_he = dir
@@ -30,4 +33,4 @@
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/update_icon()
normalize_dir()
..()
..()
@@ -11,6 +11,8 @@
volume = 260
var/list/front_nodes
var/list/back_nodes
construction_type = /obj/item/pipe/binary
pipe_state = "layer_manifold"
/obj/machinery/atmospherics/pipe/layer_manifold/Initialize()
front_nodes = list()
@@ -31,17 +33,7 @@
A.build_network()
/obj/machinery/atmospherics/pipe/layer_manifold/proc/get_all_connected_nodes()
var/list/obj/machinery/atmospherics/all_connected = list()
for(var/obj/machinery/atmospherics/I in front_nodes)
all_connected[I] = I
for(var/obj/machinery/atmospherics/I in back_nodes)
all_connected[I] = I
for(var/obj/machinery/atmospherics/I in nodes)
all_connected[I] = I
var/list/obj/machinery/atmospherics/returnlist = list()
for(var/obj/machinery/atmospherics/A in all_connected)
returnlist += all_connected[A]
return returnlist
return front_nodes + back_nodes + nodes
/obj/machinery/atmospherics/pipe/layer_manifold/update_icon() //HEAVILY WIP FOR UPDATE ICONS!!
layer = (initial(layer) + (PIPING_LAYER_MAX * PIPING_LAYER_LCHANGE)) //This is above everything else.
@@ -13,6 +13,9 @@
device_type = TRINARY
construction_type = /obj/item/pipe/trinary
pipe_state = "manifold"
/obj/machinery/atmospherics/pipe/manifold/SetInitDirections()
switch(dir)
if(NORTH)
@@ -168,4 +171,4 @@
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/brown/hidden
level = PIPE_HIDDEN_LEVEL
level = PIPE_HIDDEN_LEVEL
@@ -12,6 +12,9 @@
device_type = QUATERNARY
construction_type = /obj/item/pipe/quaternary
pipe_state = "manifold4w"
/obj/machinery/atmospherics/pipe/manifold4w/SetInitDirections()
initialize_directions = initial(initialize_directions)
@@ -160,4 +163,4 @@
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/brown/hidden
level = PIPE_HIDDEN_LEVEL
level = PIPE_HIDDEN_LEVEL
@@ -16,6 +16,9 @@ The regular pipe you see everywhere, including bent ones.
device_type = BINARY
construction_type = /obj/item/pipe/binary/bendable
pipe_state = "simple"
/obj/machinery/atmospherics/pipe/simple/SetInitDirections()
normalize_cardinal_directions()
if(dir in GLOB.diagonals)
@@ -158,4 +161,4 @@ The regular pipe you see everywhere, including bent ones.
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/brown/hidden
level = PIPE_HIDDEN_LEVEL
level = PIPE_HIDDEN_LEVEL