squashing commits is less fun than having 12 commits
@@ -23,26 +23,24 @@ Pipelines + Other Objects -> Pipe network
|
||||
active_power_usage = 0
|
||||
power_channel = ENVIRON
|
||||
var/nodealert = 0
|
||||
|
||||
var/update_icon_ready = 0 // don't update icons before they're ready or if they don't want to be
|
||||
var/starting_volume = 200
|
||||
// Which directions can we connect with?
|
||||
var/initialize_directions = 0
|
||||
|
||||
// Pipe painter color setting.
|
||||
var/_color
|
||||
|
||||
var/list/available_colors
|
||||
|
||||
var/can_be_coloured = 0
|
||||
var/image/centre_overlay = null
|
||||
// Investigation logs
|
||||
var/log
|
||||
|
||||
var/global/list/node_con = list()
|
||||
var/global/list/node_ex = list()
|
||||
var/pipe_flags = 0
|
||||
var/obj/machinery/atmospherics/mirror //not actually an object reference, but a type. The reflection of the current pipe
|
||||
|
||||
var/default_colour = null
|
||||
var/image/pipe_image
|
||||
|
||||
var/piping_layer = PIPING_LAYER_DEFAULT //used in multi-pipe-on-tile - pipes only connect if they're on the same pipe layer
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/New()
|
||||
..()
|
||||
machines.Remove(src)
|
||||
@@ -57,8 +55,64 @@ Pipelines + Other Objects -> Pipe network
|
||||
M.client.screen -= pipe_image
|
||||
pipe_image = null
|
||||
atmos_machines -= src
|
||||
centre_overlay = null
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/update_icon(var/adjacent_procd,node_list)
|
||||
if(!can_be_coloured && color)
|
||||
default_colour = color
|
||||
color = null
|
||||
else if(can_be_coloured && default_colour)
|
||||
color = default_colour
|
||||
default_colour = null
|
||||
if((!node_con.len)||(!node_ex.len))
|
||||
node_con["[NORTH]"] = image('icons/obj/pipes.dmi',"pipe_intact",dir = 1)
|
||||
node_con["[SOUTH]"] = image('icons/obj/pipes.dmi',"pipe_intact",dir = 2)
|
||||
node_con["[EAST]"] = image('icons/obj/pipes.dmi',"pipe_intact",dir = 4)
|
||||
node_con["[WEST]"] = image('icons/obj/pipes.dmi',"pipe_intact",dir = 8)
|
||||
node_ex["[NORTH]"] = image('icons/obj/pipes.dmi',"pipe_exposed",dir = 1)
|
||||
node_ex["[SOUTH]"] = image('icons/obj/pipes.dmi',"pipe_exposed",dir = 2)
|
||||
node_ex["[EAST]"] = image('icons/obj/pipes.dmi',"pipe_exposed",dir = 4)
|
||||
node_ex["[WEST]"] = image('icons/obj/pipes.dmi',"pipe_exposed",dir = 8)
|
||||
alpha = invisibility ? 128 : 255
|
||||
if (!update_icon_ready)
|
||||
update_icon_ready = 1
|
||||
else underlays.Cut()
|
||||
var/list/missing_nodes = list()
|
||||
for(var/direction in cardinal)
|
||||
if(direction & initialize_directions)
|
||||
missing_nodes += direction
|
||||
for (var/obj/machinery/atmospherics/connected_node in node_list)
|
||||
var/con_dir = get_dir(src, connected_node)
|
||||
missing_nodes -= con_dir // finds all the directions that aren't pointed to by a node
|
||||
var/image/nodecon = node_con["[con_dir]"]
|
||||
if (default_colour&& connected_node.default_colour) // if both pipes have special colours - average them
|
||||
var/list/centre_colour = GetHexColors(default_colour)
|
||||
var/list/other_colour = GetHexColors(connected_node.default_colour)
|
||||
var/list/average_colour = list(((centre_colour[1]+other_colour[1])/2),((centre_colour[2]+other_colour[2])/2),((centre_colour[3]+other_colour[3])/2))
|
||||
nodecon.color = rgb(average_colour[1],average_colour[2],average_colour[3])
|
||||
else if (color)
|
||||
nodecon.color = null
|
||||
else if (connected_node.color)
|
||||
nodecon.color = connected_node.color
|
||||
else if(default_colour)
|
||||
nodecon.color = default_colour
|
||||
else if(connected_node.default_colour && connected_node.default_colour != "#B4B4B4")
|
||||
nodecon.color = connected_node.default_colour
|
||||
else nodecon.color = "#B4B4B4"
|
||||
underlays += nodecon
|
||||
if (!adjacent_procd && connected_node.update_icon_ready)
|
||||
connected_node.update_icon(1)
|
||||
for (var/missing_dir in missing_nodes)
|
||||
var/image/nodeex = node_ex["[missing_dir]"]
|
||||
if(!color)
|
||||
nodeex.color = default_colour ? default_colour : "#B4B4B4"
|
||||
else nodeex.color = null
|
||||
underlays += nodeex
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/proc/setPipingLayer(new_layer = PIPING_LAYER_DEFAULT)
|
||||
piping_layer = new_layer
|
||||
pixel_x = (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X
|
||||
@@ -161,9 +215,6 @@ Pipelines + Other Objects -> Pipe network
|
||||
/obj/machinery/atmospherics/proc/disconnect(obj/machinery/atmospherics/reference)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/disconnect() called tick#: [world.time]")
|
||||
|
||||
/obj/machinery/atmospherics/update_icon()
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/proc/buildFrom(var/mob/usr,var/obj/item/pipe/pipe)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/atmospherics/proc/buildFrom() called tick#: [world.time]")
|
||||
error("[src] does not define a buildFrom!")
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
activity_log += ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/New()
|
||||
..()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
initialize_directions = NORTH|SOUTH
|
||||
@@ -30,10 +29,14 @@
|
||||
initialize_directions = EAST|WEST
|
||||
air1 = new
|
||||
air2 = new
|
||||
|
||||
update_icon()
|
||||
air1.volume = 200
|
||||
air2.volume = 200
|
||||
|
||||
/obj/machinery/atmospherics/binary/update_icon(var/adjacent_procd)
|
||||
var/node_list = list(node1,node2)
|
||||
..(adjacent_procd,node_list)
|
||||
|
||||
/obj/machinery/atmospherics/binary/buildFrom(var/mob/usr,var/obj/item/pipe/pipe)
|
||||
dir = pipe.dir
|
||||
initialize_directions = pipe.get_pipe_dir()
|
||||
|
||||
@@ -19,13 +19,7 @@
|
||||
icon_state = "intact_off"
|
||||
else if(node1 && node2)
|
||||
icon_state = "intact_[on?("on"):("off")]"
|
||||
else
|
||||
if(node1)
|
||||
icon_state = "exposed_1_off"
|
||||
else if(node2)
|
||||
icon_state = "exposed_2_off"
|
||||
else
|
||||
icon_state = "exposed_3_off"
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/process()
|
||||
|
||||
@@ -18,7 +18,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
name = "Gas pump"
|
||||
desc = "A pump"
|
||||
|
||||
var/on = 0
|
||||
var/target_pressure = ONE_ATMOSPHERE
|
||||
|
||||
@@ -41,14 +40,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
icon_state = "intact_off"
|
||||
else if(node1 && node2)
|
||||
icon_state = "intact_[on?("on"):("off")]"
|
||||
else
|
||||
if(node1)
|
||||
icon_state = "exposed_1_off"
|
||||
else if(node2)
|
||||
icon_state = "exposed_2_off"
|
||||
else
|
||||
icon_state = "exposed_3_off"
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/process()
|
||||
. = ..()
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
/obj/machinery/atmospherics/binary/valve
|
||||
icon = 'icons/obj/atmospherics/valve.dmi'
|
||||
icon_state = "valve0"
|
||||
icon_state = "hvalve0"
|
||||
|
||||
name = "manual valve"
|
||||
desc = "A pipe valve"
|
||||
|
||||
var/open = 0
|
||||
var/openDuringInit = 0
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/open
|
||||
open = 1
|
||||
icon_state = "valve1"
|
||||
icon_state = "hvalve1"
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/update_icon(animation)
|
||||
/obj/machinery/atmospherics/binary/valve/update_icon(var/adjacent_procd,var/animation)
|
||||
if(animation)
|
||||
flick("valve[src.open][!src.open]",src)
|
||||
flick("hvalve[src.open][!src.open]",src)
|
||||
else
|
||||
icon_state = "valve[open]"
|
||||
icon_state = "hvalve[open]"
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
||||
..()
|
||||
@@ -90,7 +91,7 @@
|
||||
user << "<span class='warning'>Nope.</span>"
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
update_icon(1)
|
||||
update_icon(0,1)
|
||||
sleep(10)
|
||||
if (src.open)
|
||||
src.close()
|
||||
@@ -121,7 +122,7 @@
|
||||
var/frequency = 0
|
||||
var/id_tag = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
|
||||
machine_flags = MULTITOOL_MENU
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital/attack_ai(mob/user as mob)
|
||||
@@ -225,4 +226,4 @@
|
||||
if(src.frequency && istype(W, /obj/item/weapon/wrench))
|
||||
user << "<span class='warning'>You cannot unwrench this [src], it's digitally connected to another device.</span>"
|
||||
return 1
|
||||
return ..() // Pass to the method below (does stuff ALL valves should do)
|
||||
return ..() // Pass to the method below (does stuff ALL valves should do)
|
||||
@@ -30,19 +30,12 @@ Thus, the two variables affect pump operation are set in New():
|
||||
on = 1
|
||||
icon_state = "intact_on"
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/update_icon()
|
||||
/obj/machinery/atmospherics/binary/volume_pump/update_icon(var/adjacent_procd)
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "intact_off"
|
||||
else if(node1 && node2)
|
||||
icon_state = "intact_[on?("on"):("off")]"
|
||||
else
|
||||
if(node1)
|
||||
icon_state = "exposed_1_off"
|
||||
else if(node2)
|
||||
icon_state = "exposed_2_off"
|
||||
else
|
||||
icon_state = "exposed_3_off"
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/process()
|
||||
. = ..()
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
obj/machinery/atmospherics/trinary/filter
|
||||
icon = 'icons/obj/atmospherics/filter.dmi'
|
||||
icon_state = "intact_off"
|
||||
|
||||
icon_state = "hintact_off"
|
||||
name = "Gas filter"
|
||||
|
||||
default_colour = "#b70000"
|
||||
mirror = /obj/machinery/atmospherics/trinary/filter/mirrored
|
||||
|
||||
var/on = 0
|
||||
@@ -39,14 +38,13 @@ obj/machinery/atmospherics/trinary/filter/New()
|
||||
|
||||
obj/machinery/atmospherics/trinary/filter/update_icon()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "intact_off"
|
||||
icon_state = "hintact_off"
|
||||
else if(node2 && node3 && node1)
|
||||
icon_state = "intact_[on?("on"):("off")]"
|
||||
icon_state = "hintact_[on?("on"):("off")]"
|
||||
else
|
||||
icon_state = "intact_off"
|
||||
icon_state = "hintact_off"
|
||||
on = 0
|
||||
|
||||
return
|
||||
..()
|
||||
|
||||
obj/machinery/atmospherics/trinary/filter/power_change()
|
||||
var/old_stat = stat
|
||||
|
||||
@@ -22,8 +22,7 @@ obj/machinery/atmospherics/trinary/mixer/update_icon()
|
||||
else
|
||||
icon_state = "intact_off"
|
||||
on = 0
|
||||
|
||||
return
|
||||
..()
|
||||
|
||||
obj/machinery/atmospherics/trinary/mixer/power_change()
|
||||
var/old_stat = stat
|
||||
@@ -35,6 +34,7 @@ obj/machinery/atmospherics/trinary/mixer/New()
|
||||
..()
|
||||
air3.volume = 300
|
||||
|
||||
|
||||
obj/machinery/atmospherics/trinary/mixer/process()
|
||||
. = ..()
|
||||
if(!on)
|
||||
@@ -144,6 +144,7 @@ obj/machinery/atmospherics/trinary/mixer/Topic(href,href_list)
|
||||
pipe_flags = IS_MIRROR
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/mirrored/update_icon()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "intactm_off"
|
||||
else if(node2 && node3 && node1)
|
||||
@@ -151,5 +152,4 @@ obj/machinery/atmospherics/trinary/mixer/Topic(href,href_list)
|
||||
else
|
||||
icon_state = "intactm_off"
|
||||
on = 0
|
||||
|
||||
return
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
|
||||
state = 0 // 0 = go straight, 1 = go to side
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/update_icon(animation)
|
||||
/obj/machinery/atmospherics/trinary/tvalve/update_icon(var/adjacent_procd, animation)
|
||||
if(animation)
|
||||
flick("tvalve[src.state][!src.state]",src)
|
||||
else
|
||||
icon_state = "tvalve[state]"
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/investigation_log(var/subject, var/message)
|
||||
activity_log += ..()
|
||||
@@ -133,7 +134,7 @@
|
||||
investigation_log(I_ATMOS,"was [state ? "opened (straight)" : "closed (side)"] by [key_name(usr)]")
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
update_icon(1)
|
||||
update_icon(0,1)
|
||||
sleep(10)
|
||||
if (src.state)
|
||||
src.go_straight()
|
||||
@@ -166,12 +167,13 @@
|
||||
icon_state = "tvalvem0"
|
||||
pipe_flags = IS_MIRROR
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/mirrored/update_icon(animation)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/mirrored/update_icon(var/adjacent_procd,animation)
|
||||
if(animation)
|
||||
flick("tvalvem[src.state][!src.state]",src)
|
||||
else
|
||||
icon_state = "tvalvem[state]"
|
||||
|
||||
..()
|
||||
|
||||
////////////////////
|
||||
////DIGITAL T///////
|
||||
@@ -241,8 +243,9 @@
|
||||
icon_state = "tvalvem0"
|
||||
pipe_flags = IS_MIRROR
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/mirrored/update_icon(animation)
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/mirrored/update_icon(var/adjacent_procd,animation)
|
||||
..()
|
||||
if(animation)
|
||||
flick("tvalvem[src.state][!src.state]",src)
|
||||
else
|
||||
icon_state = "tvalvem[state]"
|
||||
icon_state = "tvalvem[state]"
|
||||
@@ -17,13 +17,15 @@ obj/machinery/atmospherics/trinary
|
||||
|
||||
var/activity_log = ""
|
||||
|
||||
/obj/machinery/atmospherics/trinary/update_icon(var/adjacent_procd)
|
||||
var/node_list = list(node1,node2,node3)
|
||||
..(adjacent_procd,node_list)
|
||||
|
||||
obj/machinery/atmospherics/trinary/New()
|
||||
..()
|
||||
initialize_directions()
|
||||
air1 = new
|
||||
air2 = new
|
||||
air3 = new
|
||||
|
||||
air1.volume = starting_volume
|
||||
air2.volume = starting_volume
|
||||
air3.volume = starting_volume
|
||||
|
||||
@@ -7,16 +7,8 @@
|
||||
level = 2
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
//volume = 35
|
||||
can_be_coloured = 1
|
||||
|
||||
available_colors = list(
|
||||
"grey"=PIPE_COLOR_GREY,
|
||||
"red"=PIPE_COLOR_RED,
|
||||
"blue"=PIPE_COLOR_BLUE,
|
||||
"cyan"=PIPE_COLOR_CYAN,
|
||||
"green"=PIPE_COLOR_GREEN,
|
||||
"yellow"=PIPE_COLOR_YELLOW,
|
||||
"purple"=PIPE_COLOR_PURPLE
|
||||
)
|
||||
|
||||
/obj/machinery/atmospherics/unary/cap/hide(var/i)
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
@@ -26,7 +18,6 @@
|
||||
/obj/machinery/atmospherics/unary/cap/update_icon()
|
||||
overlays = 0
|
||||
alpha = invisibility ? 128 : 255
|
||||
color = available_colors[_color]
|
||||
icon_state = "cap"
|
||||
return
|
||||
|
||||
@@ -36,31 +27,24 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/cap/visible/scrubbers
|
||||
name = "Scrubbers cap"
|
||||
_color = "red"
|
||||
color=PIPE_COLOR_RED
|
||||
/obj/machinery/atmospherics/unary/cap/visible/supply
|
||||
name = "Air supply cap"
|
||||
_color = "blue"
|
||||
color=PIPE_COLOR_BLUE
|
||||
/obj/machinery/atmospherics/unary/cap/visible/supplymain
|
||||
name = "Main air supply cap"
|
||||
_color = "purple"
|
||||
color=PIPE_COLOR_PURPLE
|
||||
/obj/machinery/atmospherics/unary/cap/visible/general
|
||||
name = "Air supply cap"
|
||||
_color = "gray"
|
||||
color=PIPE_COLOR_GREY
|
||||
/obj/machinery/atmospherics/unary/cap/visible/yellow
|
||||
name = "Air supply cap"
|
||||
_color = "yellow"
|
||||
color=PIPE_COLOR_YELLOW
|
||||
color=PIPE_COLOR_ORANGE
|
||||
/obj/machinery/atmospherics/unary/cap/visible/filtering
|
||||
name = "Air filtering cap"
|
||||
_color = "green"
|
||||
color=PIPE_COLOR_GREEN
|
||||
/obj/machinery/atmospherics/unary/cap/visible/cyan
|
||||
name = "Air supply cap"
|
||||
_color = "cyan"
|
||||
color=PIPE_COLOR_CYAN
|
||||
|
||||
/obj/machinery/atmospherics/unary/cap/hidden
|
||||
@@ -69,31 +53,24 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/cap/hidden/scrubbers
|
||||
name = "Scrubbers cap"
|
||||
_color = "red"
|
||||
color=PIPE_COLOR_RED
|
||||
/obj/machinery/atmospherics/unary/cap/hidden/supply
|
||||
name = "Air supply cap"
|
||||
_color = "blue"
|
||||
color=PIPE_COLOR_BLUE
|
||||
/obj/machinery/atmospherics/unary/cap/hidden/supplymain
|
||||
name = "Main air supply cap"
|
||||
_color = "purple"
|
||||
color=PIPE_COLOR_PURPLE
|
||||
/obj/machinery/atmospherics/unary/cap/hidden/general
|
||||
name = "Air supply cap"
|
||||
_color = "gray"
|
||||
color=PIPE_COLOR_GREY
|
||||
/obj/machinery/atmospherics/unary/cap/hidden/yellow
|
||||
name = "Air supply cap"
|
||||
_color = "yellow"
|
||||
color=PIPE_COLOR_YELLOW
|
||||
color=PIPE_COLOR_ORANGE
|
||||
/obj/machinery/atmospherics/unary/cap/hidden/filtering
|
||||
name = "Air filtering cap"
|
||||
_color = "green"
|
||||
color=PIPE_COLOR_GREEN
|
||||
/obj/machinery/atmospherics/unary/cap/hidden/cyan
|
||||
name = "Air supply cap"
|
||||
_color = "cyan"
|
||||
color=PIPE_COLOR_CYAN
|
||||
|
||||
|
||||
@@ -102,26 +79,22 @@
|
||||
return // Coloring pipes.
|
||||
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/red))
|
||||
src._color = "red"
|
||||
src.color = PIPE_COLOR_RED
|
||||
user << "<span class='warning'>You paint the pipe red.</span>"
|
||||
update_icon()
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/blue))
|
||||
src._color = "blue"
|
||||
src.color = PIPE_COLOR_BLUE
|
||||
user << "<span class='warning'>You paint the pipe blue.</span>"
|
||||
update_icon()
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/green))
|
||||
src._color = "green"
|
||||
src.color = PIPE_COLOR_GREEN
|
||||
user << "<span class='warning'>You paint the pipe green.</span>"
|
||||
update_icon()
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/yellow))
|
||||
src._color = "yellow"
|
||||
src.color = PIPE_COLOR_YELLOW
|
||||
src.color = PIPE_COLOR_ORANGE
|
||||
user << "<span class='warning'>You paint the pipe yellow.</span>"
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
@@ -12,15 +12,6 @@
|
||||
var/current_temperature = T20C
|
||||
var/current_heat_capacity = 50000 //totally random
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/update_icon()
|
||||
if(node)
|
||||
icon_state = "intact_[on?("on"):("off")]"
|
||||
else
|
||||
icon_state = "exposed"
|
||||
|
||||
on = 0
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/process()
|
||||
. = ..()
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
icon_state = "intact"
|
||||
else
|
||||
icon_state = "exposed"
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_exchanger/initialize()
|
||||
|
||||
@@ -14,15 +14,6 @@
|
||||
var/current_temperature = T20C
|
||||
var/current_heat_capacity = 50000 //totally random
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/update_icon()
|
||||
if(node)
|
||||
icon_state = "intact_[on?("on"):("off")]"
|
||||
else
|
||||
icon_state = "exposed"
|
||||
|
||||
on = 0
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/process()
|
||||
. = ..()
|
||||
|
||||
@@ -23,13 +23,17 @@
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/update_icon()
|
||||
if(node)
|
||||
if(on && !(stat & NOPOWER))
|
||||
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
|
||||
icon_state = "hon"
|
||||
else
|
||||
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
|
||||
icon_state = "hoff"
|
||||
else
|
||||
icon_state = "exposed"
|
||||
on = 0
|
||||
|
||||
..()
|
||||
if (istype(loc, /turf/simulated/floor) && node)
|
||||
var/turf/simulated/floor/floor = loc
|
||||
if(floor.floor_tile && node.alpha == 128)
|
||||
underlays.Cut()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/power_change()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/machinery/atmospherics/unary/portables_connector
|
||||
icon = 'icons/obj/atmospherics/portables_connector.dmi'
|
||||
icon_state = "intact"
|
||||
icon_state = "hintact"
|
||||
|
||||
name = "Connector Port"
|
||||
desc = "For connecting portables devices related to atmospherics control."
|
||||
@@ -18,19 +18,25 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/portables_connector/update_icon()
|
||||
if(node)
|
||||
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
|
||||
icon_state = "hintact"
|
||||
dir = get_dir(src, node)
|
||||
else
|
||||
icon_state = "exposed"
|
||||
|
||||
icon_state = "hexposed"
|
||||
..()
|
||||
if (level == 1 && istype(loc, /turf/simulated))
|
||||
underlays.Cut()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/portables_connector/hide(var/i) //to make the little pipe section invisible, the icon changes.
|
||||
if(node)
|
||||
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
|
||||
dir = get_dir(src, node)
|
||||
icon_state = "hintact"
|
||||
|
||||
else
|
||||
icon_state = "exposed"
|
||||
icon_state = "hexposed"
|
||||
if (istype(loc, /turf/simulated/floor) && node)
|
||||
var/turf/simulated/floor/floor = loc
|
||||
if(floor.floor_tile && node.alpha == 128)
|
||||
underlays.Cut()
|
||||
|
||||
/obj/machinery/atmospherics/unary/portables_connector/process()
|
||||
. = ..()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank
|
||||
icon = 'icons/obj/atmospherics/pipe_tank.dmi'
|
||||
icon_state = "intact"
|
||||
icon_state = "co2"
|
||||
name = "Pressure Tank"
|
||||
desc = "A large vessel containing pressurized gas."
|
||||
starting_volume = 2000 //in liters, 1 meters by 1 meters by 2 meters
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/toxins
|
||||
icon = 'icons/obj/atmospherics/orange_pipe_tank.dmi'
|
||||
icon_state = "plasma"
|
||||
name = "Pressure Tank (Plasma)"
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/toxins/New()
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/oxygen_agent_b
|
||||
icon = 'icons/obj/atmospherics/red_orange_pipe_tank.dmi'
|
||||
icon_state = "plasma"
|
||||
name = "Pressure Tank (Oxygen + Plasma)"
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/oxygen_agent_b/New()
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/oxygen
|
||||
icon = 'icons/obj/atmospherics/blue_pipe_tank.dmi'
|
||||
icon_state = "o2"
|
||||
name = "Pressure Tank (Oxygen)"
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/oxygen/New()
|
||||
@@ -64,7 +64,7 @@
|
||||
air_contents.oxygen = (25*ONE_ATMOSPHERE)*(starting_volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/nitrogen
|
||||
icon = 'icons/obj/atmospherics/red_pipe_tank.dmi'
|
||||
icon_state = "n2"
|
||||
name = "Pressure Tank (Nitrogen)"
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/nitrogen/New()
|
||||
@@ -73,7 +73,7 @@
|
||||
air_contents.nitrogen = (25*ONE_ATMOSPHERE)*(starting_volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/air
|
||||
icon = 'icons/obj/atmospherics/red_pipe_tank.dmi'
|
||||
icon_state = "air"
|
||||
name = "Pressure Tank (Air)"
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/air/New()
|
||||
@@ -83,11 +83,7 @@
|
||||
air_contents.nitrogen = (25*ONE_ATMOSPHERE*N2STANDARD)*(starting_volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/update_icon()
|
||||
if(node)
|
||||
icon_state = "intact"
|
||||
dir = get_dir(src, node)
|
||||
else
|
||||
icon_state = "exposed"
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/disconnect(obj/machinery/atmospherics/reference)
|
||||
..()
|
||||
|
||||
@@ -12,13 +12,6 @@
|
||||
name = "Thermal Transfer Plate"
|
||||
desc = "Transfers heat to and from an area"
|
||||
|
||||
/obj/machinery/atmospherics/unary/thermal_plate/update_icon()
|
||||
var/prefix=""
|
||||
//var/suffix="_idle" // Also available: _heat, _cool
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
prefix="h"
|
||||
icon_state = "[prefix]off"
|
||||
|
||||
/obj/machinery/atmospherics/unary/thermal_plate/process()
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
air_contents.temperature = T0C
|
||||
air_contents.volume = starting_volume
|
||||
|
||||
/obj/machinery/atmospherics/unary/update_icon(var/adjacent_procd,node_list)
|
||||
node_list = list(node)
|
||||
..(adjacent_procd,node_list)
|
||||
|
||||
/obj/machinery/atmospherics/unary/buildFrom(var/mob/usr,var/obj/item/pipe/pipe)
|
||||
dir = pipe.dir
|
||||
initialize_directions = pipe.get_pipe_dir()
|
||||
|
||||
@@ -39,10 +39,14 @@
|
||||
/obj/machinery/atmospherics/unary/vent/update_icon()
|
||||
if(node)
|
||||
icon_state = "intact"
|
||||
//dir = get_dir(src, node)
|
||||
|
||||
else
|
||||
icon_state = "exposed"
|
||||
..()
|
||||
if (istype(loc, /turf/simulated/floor) && node)
|
||||
var/turf/simulated/floor/floor = loc
|
||||
if(floor.floor_tile && node.alpha == 128)
|
||||
underlays.Cut()
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent/initialize()
|
||||
@@ -56,11 +60,7 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent/hide(var/i)
|
||||
if(node)
|
||||
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
|
||||
dir = get_dir(src, node)
|
||||
else
|
||||
icon_state = "exposed"
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent/buildFrom(var/mob/usr,var/obj/item/pipe/pipe)
|
||||
if(pipe)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/machinery/atmospherics/unary/vent_pump
|
||||
icon = 'icons/obj/atmospherics/vent_pump.dmi'
|
||||
icon_state = "off"
|
||||
icon_state = "hoff"
|
||||
|
||||
name = "Air Vent"
|
||||
desc = "Has a valve and pump attached to it"
|
||||
@@ -34,15 +34,15 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/on
|
||||
on = 1
|
||||
icon_state = "out"
|
||||
icon_state = "hout"
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/siphon
|
||||
pump_direction = 0
|
||||
icon_state = "off"
|
||||
icon_state = "hoff"
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/siphon/on
|
||||
on = 1
|
||||
icon_state = "in"
|
||||
icon_state = "hin"
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/New()
|
||||
..()
|
||||
@@ -64,15 +64,20 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/update_icon()
|
||||
if(welded)
|
||||
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]weld"
|
||||
icon_state = "hweld"
|
||||
return
|
||||
if(on && !(stat & (NOPOWER|BROKEN)))
|
||||
if(pump_direction)
|
||||
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
|
||||
icon_state = "hout"
|
||||
else
|
||||
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
|
||||
icon_state = "hin"
|
||||
else
|
||||
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
|
||||
icon_state = "hoff"
|
||||
..()
|
||||
if (istype(loc, /turf/simulated/floor) && node)
|
||||
var/turf/simulated/floor/floor = loc
|
||||
if(floor.floor_tile && node.alpha == 128)
|
||||
underlays.Cut()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/process()
|
||||
@@ -273,17 +278,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/hide(var/i) //to make the little pipe section invisible, the icon changes.
|
||||
if(welded)
|
||||
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]weld"
|
||||
return
|
||||
if(on&&node)
|
||||
if(pump_direction)
|
||||
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
|
||||
else
|
||||
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
|
||||
else
|
||||
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
|
||||
on = 0
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user)
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber
|
||||
icon = 'icons/obj/atmospherics/vent_scrubber.dmi'
|
||||
icon_state = "off"
|
||||
|
||||
name = "\improper Air Scrubber"
|
||||
desc = "Has a valve and pump attached to it"
|
||||
use_power = 1
|
||||
icon = 'icons/obj/atmospherics/vent_scrubber.dmi'
|
||||
icon_state = "hoff"
|
||||
name = "Air Scrubber"
|
||||
desc = "Has a valve and pump attached to it"
|
||||
use_power = 1
|
||||
|
||||
level = 1
|
||||
|
||||
@@ -53,22 +52,23 @@
|
||||
src.broadcast_status()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/update_icon()
|
||||
var/hidden=""
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
hidden="h"
|
||||
if(welded)
|
||||
icon_state = "[hidden]weld"
|
||||
return
|
||||
icon_state = "hweld"
|
||||
var/suffix=""
|
||||
if(scrub_O2)
|
||||
suffix="1"
|
||||
if(node && on && !(stat & (NOPOWER|BROKEN)))
|
||||
if(scrubbing)
|
||||
icon_state = "[hidden]on[suffix]"
|
||||
icon_state = "hon[suffix]"
|
||||
else
|
||||
icon_state = "[hidden]in"
|
||||
icon_state = "hin"
|
||||
else
|
||||
icon_state = "[hidden]off"
|
||||
icon_state = "hoff"
|
||||
..()
|
||||
if (istype(loc, /turf/simulated/floor) && node)
|
||||
var/turf/simulated/floor/floor = loc
|
||||
if(floor.floor_tile && node.alpha == 128)
|
||||
underlays.Cut()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/proc/set_frequency(new_frequency)
|
||||
@@ -215,18 +215,11 @@
|
||||
network.update = 1
|
||||
|
||||
return 1
|
||||
/* //unused piece of code
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/hide(var/i) //to make the little pipe section invisible, the icon changes.
|
||||
if(on&&node)
|
||||
if(scrubbing)
|
||||
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
|
||||
else
|
||||
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
|
||||
else
|
||||
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
|
||||
on = 0
|
||||
update_icon()
|
||||
return
|
||||
*/
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/receive_signal(datum/signal/signal)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
burst_type = /obj/machinery/atmospherics/unary/vent/burstpipe/heat_exchanging
|
||||
|
||||
available_colors = null //Overrides the available colors list from the parent.
|
||||
can_be_coloured = 0
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/getNodeType(var/node_id)
|
||||
return PIPE_TYPE_HE
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
|
||||
// Regular pipe colors
|
||||
// #RRGGBB
|
||||
#define PIPE_COLOR_BLUE "#0000FF"
|
||||
#define PIPE_COLOR_CYAN "#00FFFF"
|
||||
#define PIPE_COLOR_GREEN "#00FF00"
|
||||
#define PIPE_COLOR_GREY "#FFFFFF" // White
|
||||
#define PIPE_COLOR_BLUE "#0000B7"
|
||||
#define PIPE_COLOR_CYAN "#00B8B8"
|
||||
#define PIPE_COLOR_GREEN "#00B900"
|
||||
#define PIPE_COLOR_GREY "#B4B4B4"
|
||||
#define PIPE_COLOR_PURPLE "#800080"
|
||||
#define PIPE_COLOR_RED "#FF0000"
|
||||
#define PIPE_COLOR_YELLOW "#FFA800" // Orange, actually. Yellow looked awful.
|
||||
#define PIPE_COLOR_RED "#B70000"
|
||||
#define PIPE_COLOR_ORANGE "#B77900"
|
||||
|
||||
// Insulated pipes
|
||||
#define IPIPE_COLOR_RED PIPE_COLOR_RED
|
||||
@@ -23,15 +22,18 @@
|
||||
var/alert_pressure = 80*ONE_ATMOSPHERE
|
||||
var/baseicon=""
|
||||
|
||||
available_colors = list(
|
||||
"grey" = PIPE_COLOR_GREY,
|
||||
"red" = PIPE_COLOR_RED,
|
||||
"blue" = PIPE_COLOR_BLUE,
|
||||
"cyan" = PIPE_COLOR_CYAN,
|
||||
"green" = PIPE_COLOR_GREEN,
|
||||
"yellow" = PIPE_COLOR_YELLOW,
|
||||
"purple" = PIPE_COLOR_PURPLE
|
||||
)
|
||||
/obj/machinery/atmospherics/pipe/proc/mass_colouration(var/mass_colour)
|
||||
if (findtext(mass_colour,"#"))
|
||||
var/datum/pipeline/pipeline = parent
|
||||
var/list/update_later = list()
|
||||
update_later += pipeline.edges
|
||||
for(var/obj/machinery/atmospherics/pipe in pipeline.members)
|
||||
pipe.color = mass_colour
|
||||
if(!pipe.can_be_coloured)
|
||||
pipe.default_colour = mass_colour
|
||||
update_later |= pipe
|
||||
for(var/obj/machinery/atmospherics/pipe in update_later)
|
||||
pipe.update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/singularity_pull(/obj/machinery/singularity/S, size)
|
||||
return
|
||||
@@ -46,6 +48,14 @@
|
||||
//Return null if parent should stop checking other pipes. Recall: del(src) will by default return null
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/update_icon(var/adjacent_procd)
|
||||
if(color && centre_overlay)
|
||||
centre_overlay.color = color
|
||||
overlays.Cut()
|
||||
overlays += centre_overlay
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/return_air()
|
||||
if(!parent)
|
||||
@@ -99,11 +109,11 @@
|
||||
var/obj/machinery/atmospherics/node2
|
||||
var/minimum_temperature_difference = 300
|
||||
var/thermal_conductivity = 0 //WALL_HEAT_TRANSFER_COEFFICIENT No
|
||||
|
||||
color = "#B4B4B4"
|
||||
var/maximum_pressure = 100*ONE_ATMOSPHERE // 10132.5 kPa
|
||||
var/fatigue_pressure = 80 *ONE_ATMOSPHERE // 8106 kPa
|
||||
alert_pressure = 80 *ONE_ATMOSPHERE
|
||||
|
||||
can_be_coloured = 1
|
||||
// Type of burstpipe to use on burst()
|
||||
var/burst_type = /obj/machinery/atmospherics/unary/vent/burstpipe
|
||||
|
||||
@@ -125,7 +135,6 @@
|
||||
if(SOUTHWEST)
|
||||
initialize_directions = SOUTH|WEST
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/buildFrom(var/mob/usr,var/obj/item/pipe/pipe)
|
||||
dir = pipe.dir
|
||||
initialize_directions = pipe.get_pipe_dir()
|
||||
@@ -300,22 +309,11 @@
|
||||
return list(node1, node2)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/update_icon()
|
||||
alpha = invisibility ? 128 : 255
|
||||
//testing("PIPE UPDATE ICON: Updating icon on \the [src], _color: [_color]")
|
||||
if(_color in available_colors)
|
||||
color = available_colors[_color]
|
||||
|
||||
if(node1&&node2)
|
||||
icon_state = "intact"
|
||||
|
||||
else
|
||||
if(!node1&&!node2)
|
||||
qdel(src) //TODO: silent deleting looks weird
|
||||
var/have_node1 = node1?1:0
|
||||
var/have_node2 = node2?1:0
|
||||
icon_state = "exposed[have_node1][have_node2]"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/update_icon(var/adjacent_procd)
|
||||
var/node_list = list(node1,node2)
|
||||
..(adjacent_procd,node_list)
|
||||
if(!node1&&!node2)
|
||||
qdel(src) //TODO: silent deleting looks weird
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/initialize(var/suppress_icon_check=0)
|
||||
normalize_dir()
|
||||
@@ -344,31 +342,24 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/scrubbers
|
||||
name = "Scrubbers pipe"
|
||||
_color = "red"
|
||||
color=PIPE_COLOR_RED
|
||||
/obj/machinery/atmospherics/pipe/simple/supply
|
||||
name = "Air supply pipe"
|
||||
_color = "blue"
|
||||
color=PIPE_COLOR_BLUE
|
||||
/obj/machinery/atmospherics/pipe/simple/supplymain
|
||||
name = "Main air supply pipe"
|
||||
_color = "purple"
|
||||
color=PIPE_COLOR_PURPLE
|
||||
/obj/machinery/atmospherics/pipe/simple/general
|
||||
name = "Pipe"
|
||||
_color = "grey"
|
||||
color=PIPE_COLOR_GREY
|
||||
/obj/machinery/atmospherics/pipe/simple/yellow
|
||||
name = "Pipe"
|
||||
_color="yellow"
|
||||
color=PIPE_COLOR_YELLOW
|
||||
color=PIPE_COLOR_ORANGE
|
||||
/obj/machinery/atmospherics/pipe/simple/cyan
|
||||
name = "Pipe"
|
||||
_color="cyan"
|
||||
color=PIPE_COLOR_CYAN
|
||||
/obj/machinery/atmospherics/pipe/simple/filtering
|
||||
name = "Pipe"
|
||||
_color = "green"
|
||||
color=PIPE_COLOR_GREEN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/scrubbers/visible
|
||||
@@ -409,7 +400,6 @@
|
||||
/obj/machinery/atmospherics/pipe/simple/insulated
|
||||
name = "\improper Insulated pipe"
|
||||
//icon = 'icons/obj/atmospherics/red_pipe.dmi'
|
||||
icon = 'icons/obj/atmospherics/insulated.dmi'
|
||||
minimum_temperature_difference = 10000
|
||||
thermal_conductivity = 0
|
||||
|
||||
@@ -417,30 +407,21 @@
|
||||
fatigue_pressure = 900000 // 900k kPa
|
||||
alert_pressure = 900000
|
||||
|
||||
available_colors = list(
|
||||
"red" = IPIPE_COLOR_RED,
|
||||
"blue" = IPIPE_COLOR_BLUE,
|
||||
"cyan" = PIPE_COLOR_CYAN,
|
||||
"green" = PIPE_COLOR_GREEN,
|
||||
"yellow" = PIPE_COLOR_YELLOW,
|
||||
"purple" = PIPE_COLOR_PURPLE
|
||||
)
|
||||
_color = "red"
|
||||
can_be_coloured = 1
|
||||
color = IPIPE_COLOR_RED
|
||||
/obj/machinery/atmospherics/pipe/simple/insulated/visible
|
||||
icon_state = "intact"
|
||||
level = 2
|
||||
color=IPIPE_COLOR_RED
|
||||
/obj/machinery/atmospherics/pipe/simple/insulated/visible/blue
|
||||
color=IPIPE_COLOR_BLUE
|
||||
_color = "blue"
|
||||
/obj/machinery/atmospherics/pipe/simple/insulated/hidden
|
||||
icon_state = "intact"
|
||||
alpha=128
|
||||
level = 1
|
||||
color=IPIPE_COLOR_RED
|
||||
/obj/machinery/atmospherics/pipe/simple/insulated/hidden/blue
|
||||
color=IPIPE_COLOR_BLUE
|
||||
_color = "blue"
|
||||
color= IPIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold
|
||||
icon = 'icons/obj/atmospherics/pipe_manifold.dmi'
|
||||
@@ -449,16 +430,15 @@
|
||||
name = "pipe manifold"
|
||||
desc = "A manifold composed of regular pipes"
|
||||
volume = 105
|
||||
color = "#B4B4B4"
|
||||
dir = SOUTH
|
||||
initialize_directions = EAST|NORTH|WEST
|
||||
var/obj/machinery/atmospherics/node1
|
||||
var/obj/machinery/atmospherics/node2
|
||||
var/obj/machinery/atmospherics/node3
|
||||
var/list/node_list
|
||||
var/image/manifold_centre
|
||||
var/list/nodecon_overlays
|
||||
level = 1
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
var/global/image/manifold_centre = image('icons/obj/pipes.dmi',"manifold_centre")
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/buildFrom(var/mob/usr,var/obj/item/pipe/pipe)
|
||||
dir = pipe.dir
|
||||
@@ -484,7 +464,6 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/New()
|
||||
nodecon_overlays = list()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
initialize_directions = EAST|SOUTH|WEST
|
||||
@@ -494,14 +473,11 @@
|
||||
initialize_directions = SOUTH|WEST|NORTH
|
||||
if(WEST)
|
||||
initialize_directions = NORTH|EAST|SOUTH
|
||||
centre_overlay = manifold_centre
|
||||
centre_overlay.color = color
|
||||
overlays += centre_overlay
|
||||
..()
|
||||
manifold_centre = image('icons/obj/atmospherics/pipe_manifold.dmi',"manifold_centre")
|
||||
manifold_centre.dir = dir
|
||||
manifold_centre.pixel_x = pixel_x
|
||||
manifold_centre.pixel_y = pixel_y
|
||||
manifold_centre.color = _color
|
||||
overlays += manifold_centre
|
||||
//update_icon()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hide(var/i)
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
@@ -574,47 +550,12 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/update_icon()
|
||||
node_list = list(node1,node2,node3)
|
||||
alpha = invisibility ? 128 : 255
|
||||
overlays.Cut() // previously overlays = 0 and I'm pretty sure that's not very good
|
||||
nodecon_overlays.Cut()
|
||||
manifold_centre.color = _color
|
||||
overlays += manifold_centre
|
||||
var/list/is_node = list(0,0,0)
|
||||
var/image/nodecon
|
||||
var/list/directions = list(1,2,4,8)
|
||||
directions -= dir
|
||||
if(node1)
|
||||
is_node[1] = 1
|
||||
if(node2)
|
||||
is_node[2] = 1
|
||||
if(node3)
|
||||
is_node[3] = 1
|
||||
for (var/node in list(1,2,3))
|
||||
var/obj/machinery/atmospherics/pipe/connected_node = node_list[node]
|
||||
directions -= get_dir(src, connected_node) // finds all the directions that aren't pointed to by a node
|
||||
for (var/node in list(1,2,3))
|
||||
if (is_node[node])
|
||||
var/obj/machinery/atmospherics/pipe/connected_node = node_list[node]
|
||||
nodecon = image('icons/obj/atmospherics/pipe_manifold.dmi',"manifold_con",dir = get_dir(src, connected_node))
|
||||
if (connected_node.color)
|
||||
nodecon.color = connected_node.color
|
||||
else if (connected_node._color)
|
||||
nodecon.color = connected_node._color
|
||||
else
|
||||
nodecon.color = _color
|
||||
nodecon_overlays += nodecon
|
||||
else
|
||||
var/randomdir = pick(directions) // it picks a random direction from those that we don't have
|
||||
nodecon = image('icons/obj/atmospherics/pipe_manifold.dmi',"manifold_con_ex", dir = randomdir)
|
||||
directions -= randomdir
|
||||
nodecon.color = _color
|
||||
nodecon_overlays += nodecon
|
||||
overlays += nodecon_overlays
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/update_icon(var/adjacent_procd)
|
||||
var/node_list = list(node1,node2,node3)
|
||||
..(adjacent_procd,node_list)
|
||||
if(!node1 && !node2 && !node3)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/initialize(var/skip_icon_update=0)
|
||||
@@ -629,44 +570,33 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/scrubbers
|
||||
name = "\improper Scrubbers pipe"
|
||||
_color = "PIPE_COLOR_RED"
|
||||
color = PIPE_COLOR_RED
|
||||
/obj/machinery/atmospherics/pipe/manifold/supply
|
||||
name = "\improper Air supply pipe"
|
||||
_color = PIPE_COLOR_BLUE
|
||||
color = PIPE_COLOR_BLUE
|
||||
/obj/machinery/atmospherics/pipe/manifold/supplymain
|
||||
name = "\improper Main air supply pipe"
|
||||
_color = PIPE_COLOR_PURPLE
|
||||
color = PIPE_COLOR_PURPLE
|
||||
/obj/machinery/atmospherics/pipe/manifold/general
|
||||
name = "\improper Gas pipe"
|
||||
_color = PIPE_COLOR_BLUE
|
||||
color = PIPE_COLOR_BLUE
|
||||
/obj/machinery/atmospherics/pipe/manifold/yellow
|
||||
name = "\improper Air supply pipe"
|
||||
_color = PIPE_COLOR_YELLOW
|
||||
color = PIPE_COLOR_ORANGE
|
||||
/obj/machinery/atmospherics/pipe/manifold/cyan
|
||||
name = "\improper Air supply pipe"
|
||||
_color = PIPE_COLOR_CYAN
|
||||
color = PIPE_COLOR_CYAN
|
||||
/obj/machinery/atmospherics/pipe/manifold/filtering
|
||||
name = "\improper Air filtering pipe"
|
||||
_color = PIPE_COLOR_GREEN
|
||||
color = PIPE_COLOR_GREEN
|
||||
/obj/machinery/atmospherics/pipe/manifold/insulated
|
||||
name = "\improper Insulated pipe"
|
||||
//icon = 'icons/obj/atmospherics/red_pipe.dmi'
|
||||
icon = 'icons/obj/atmospherics/insulated.dmi'
|
||||
icon_state = "manifold"
|
||||
alert_pressure = 900*ONE_ATMOSPHERE
|
||||
_color = "red"
|
||||
color=IPIPE_COLOR_RED
|
||||
level = 2
|
||||
|
||||
available_colors = list(
|
||||
"red" = IPIPE_COLOR_RED,
|
||||
"blue" = IPIPE_COLOR_BLUE,
|
||||
"cyan" = PIPE_COLOR_CYAN,
|
||||
"green" = PIPE_COLOR_GREEN,
|
||||
"yellow" = PIPE_COLOR_YELLOW,
|
||||
"purple" = PIPE_COLOR_PURPLE
|
||||
)
|
||||
|
||||
can_be_coloured = 1
|
||||
/obj/machinery/atmospherics/pipe/manifold/scrubbers/visible
|
||||
level = 2
|
||||
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden
|
||||
@@ -690,18 +620,14 @@
|
||||
/obj/machinery/atmospherics/pipe/manifold/insulated/visible
|
||||
level = 2
|
||||
color=IPIPE_COLOR_RED
|
||||
_color = "red"
|
||||
/obj/machinery/atmospherics/pipe/manifold/insulated/visible/blue
|
||||
color=IPIPE_COLOR_BLUE
|
||||
_color = "blue"
|
||||
/obj/machinery/atmospherics/pipe/manifold/insulated/hidden
|
||||
level = 1
|
||||
color=IPIPE_COLOR_RED
|
||||
alpha=128
|
||||
_color = "red"
|
||||
/obj/machinery/atmospherics/pipe/manifold/insulated/hidden/blue
|
||||
color=IPIPE_COLOR_BLUE
|
||||
_color = "blue"
|
||||
/obj/machinery/atmospherics/pipe/manifold/yellow/visible
|
||||
level = 2
|
||||
/obj/machinery/atmospherics/pipe/manifold/yellow/hidden
|
||||
@@ -726,6 +652,7 @@
|
||||
volume = 140
|
||||
dir = SOUTH
|
||||
initialize_directions = NORTH|SOUTH|EAST|WEST
|
||||
color = "#B4B4B4"
|
||||
var/obj/machinery/atmospherics/node1
|
||||
var/obj/machinery/atmospherics/node2
|
||||
var/obj/machinery/atmospherics/node3
|
||||
@@ -733,9 +660,8 @@
|
||||
level = 1
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
baseicon="manifold4w"
|
||||
var/list/node_list
|
||||
var/image/manifold_centre
|
||||
var/list/nodecon_overlays
|
||||
var/global/image/manifold4w_centre = image('icons/obj/pipes.dmi',"manifold4w_centre")
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/buildFrom(var/mob/usr,var/obj/item/pipe/pipe)
|
||||
dir = pipe.dir
|
||||
@@ -763,13 +689,10 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/New()
|
||||
nodecon_overlays = list()
|
||||
..()
|
||||
manifold_centre = image('icons/obj/atmospherics/pipe_manifold.dmi',"manifold4w_centre")
|
||||
manifold_centre.pixel_x = pixel_x
|
||||
manifold_centre.pixel_y = pixel_y
|
||||
manifold_centre.color = _color
|
||||
overlays += manifold_centre
|
||||
centre_overlay = manifold4w_centre
|
||||
centre_overlay.color = color
|
||||
overlays += centre_overlay
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hide(var/i)
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
@@ -850,46 +773,9 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/update_icon()
|
||||
|
||||
node_list = list(node1,node2,node3,node4)
|
||||
alpha = invisibility ? 128 : 255
|
||||
overlays.Cut() // previously overlays = 0 and I'm pretty sure that's not very good
|
||||
nodecon_overlays.Cut()
|
||||
manifold_centre.color = _color
|
||||
overlays += manifold_centre
|
||||
var/list/is_node = list(0,0,0,0)
|
||||
var/image/nodecon
|
||||
var/list/directions = list(1,2,4,8)
|
||||
if(node1)
|
||||
is_node[1] = 1
|
||||
if(node2)
|
||||
is_node[2] = 1
|
||||
if(node3)
|
||||
is_node[3] = 1
|
||||
if(node4)
|
||||
is_node[4] = 1
|
||||
for (var/node in list(1,2,3,4))
|
||||
var/obj/machinery/atmospherics/pipe/connected_node = node_list[node]
|
||||
directions -= get_dir(src, connected_node) // finds all the directions that aren't pointed to by a node
|
||||
for (var/node in list(1,2,3,4))
|
||||
if (is_node[node])
|
||||
var/obj/machinery/atmospherics/pipe/connected_node = node_list[node]
|
||||
nodecon = image('icons/obj/atmospherics/pipe_manifold.dmi',"manifold_con",dir = get_dir(src, connected_node))
|
||||
if (connected_node.color)
|
||||
nodecon.color = connected_node.color
|
||||
else if (connected_node._color)
|
||||
nodecon.color = connected_node._color
|
||||
else
|
||||
nodecon.color = _color
|
||||
nodecon_overlays += nodecon
|
||||
else
|
||||
var/randomdir = pick(directions) // it picks a random direction from those that we don't have
|
||||
nodecon = image('icons/obj/atmospherics/pipe_manifold.dmi',"manifold_con_ex", dir = randomdir)
|
||||
directions -= randomdir
|
||||
nodecon.color = _color
|
||||
nodecon_overlays += nodecon
|
||||
overlays += nodecon_overlays
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/update_icon(var/adjacent_procd)
|
||||
var/node_list = list(node1,node2,node3,node4)
|
||||
..(adjacent_procd,node_list)
|
||||
if(!node1 && !node2 && !node3 && !node4)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -906,38 +792,29 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers
|
||||
name = "\improper Scrubbers pipe"
|
||||
_color = PIPE_COLOR_RED
|
||||
color = PIPE_COLOR_RED
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/supply
|
||||
name = "\improper Air supply pipe"
|
||||
_color = PIPE_COLOR_BLUE
|
||||
color = PIPE_COLOR_BLUE
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/supplymain
|
||||
name = "\improper Main air supply pipe"
|
||||
_color = PIPE_COLOR_PURPLE
|
||||
color = PIPE_COLOR_PURPLE
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/general
|
||||
name = "\improper Air supply pipe"
|
||||
_color = PIPE_COLOR_GREY
|
||||
color = PIPE_COLOR_GREY
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/yellow
|
||||
name = "\improper Air supply pipe"
|
||||
_color = PIPE_COLOR_YELLOW
|
||||
color = PIPE_COLOR_ORANGE
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/filtering
|
||||
name = "\improper Air filtering pipe"
|
||||
_color = PIPE_COLOR_GREEN
|
||||
color = PIPE_COLOR_GREEN
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/insulated
|
||||
icon = 'icons/obj/atmospherics/insulated.dmi'
|
||||
name = "\improper Insulated pipe"
|
||||
_color = "red"
|
||||
color = IPIPE_COLOR_RED
|
||||
alert_pressure = 900*ONE_ATMOSPHERE
|
||||
color=IPIPE_COLOR_RED
|
||||
level = 2
|
||||
|
||||
available_colors = list(
|
||||
"red" = IPIPE_COLOR_RED,
|
||||
"blue" = IPIPE_COLOR_BLUE,
|
||||
"cyan" = PIPE_COLOR_CYAN,
|
||||
"green" = PIPE_COLOR_GREEN,
|
||||
"yellow" = PIPE_COLOR_YELLOW,
|
||||
"purple" = PIPE_COLOR_PURPLE
|
||||
)
|
||||
can_be_coloured = 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/visible
|
||||
level = 2
|
||||
@@ -976,10 +853,8 @@
|
||||
level = 2
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/insulated/hidden/blue
|
||||
color=IPIPE_COLOR_BLUE
|
||||
_color = "blue"
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/insulated/visible/blue
|
||||
color=IPIPE_COLOR_BLUE
|
||||
_color = "blue"
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
@@ -987,26 +862,22 @@
|
||||
return // Coloring pipes.
|
||||
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/red))
|
||||
src._color = "red"
|
||||
src.color = PIPE_COLOR_RED
|
||||
user << "<span class='notice'>You paint the pipe red.</span>"
|
||||
update_icon()
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/blue))
|
||||
src._color = "blue"
|
||||
src.color = PIPE_COLOR_BLUE
|
||||
user << "<span class='notice'>You paint the pipe blue.</span>"
|
||||
update_icon()
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/green))
|
||||
src._color = "green"
|
||||
src.color = PIPE_COLOR_GREEN
|
||||
user << "<span class='notice'>You paint the pipe green.</span>"
|
||||
update_icon()
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/glass/paint/yellow))
|
||||
src._color = "yellow"
|
||||
src.color = PIPE_COLOR_YELLOW
|
||||
src.color = PIPE_COLOR_ORANGE
|
||||
user << "<span class='notice'>You paint the pipe yellow.</span>"
|
||||
update_icon()
|
||||
return 1
|
||||
@@ -1110,7 +981,6 @@
|
||||
/obj/machinery/atmospherics/pipe/layer_manifold/update_icon()
|
||||
overlays.len = 0
|
||||
alpha = invisibility ? 128 : 255
|
||||
// color = available_colors[_color]
|
||||
icon_state = baseicon
|
||||
if(other_node)
|
||||
var/icon/con = new/icon(icon,"manifoldl_other_con")
|
||||
@@ -1129,7 +999,6 @@
|
||||
overlays += con
|
||||
|
||||
if(!other_node && !(locate(/obj/machinery/atmospherics) in layer_nodes))
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "freezer_0"
|
||||
density = 1
|
||||
|
||||
default_colour = "#0000b7"
|
||||
anchored = 1.0
|
||||
|
||||
current_heat_capacity = 1000
|
||||
@@ -44,8 +44,7 @@
|
||||
icon_state = "freezer"
|
||||
else
|
||||
icon_state = "freezer_0"
|
||||
return
|
||||
|
||||
..()
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/attack_ai(mob/user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
return src.attack_hand(user)
|
||||
@@ -168,9 +167,8 @@
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "freezer_0"
|
||||
density = 1
|
||||
|
||||
anchored = 1.0
|
||||
|
||||
default_colour = "#b70000"
|
||||
current_heat_capacity = 1000
|
||||
|
||||
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | FIXED2WORK
|
||||
@@ -209,6 +207,7 @@
|
||||
icon_state = "heater"
|
||||
else
|
||||
icon_state = "heater_0"
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_ai(mob/user as mob)
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/unary/tank) || istype(A,/obj/machinery/atmospherics/unary/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated))
|
||||
return
|
||||
var/obj/machinery/atmospherics/pipe/P = A
|
||||
if(!(mode in P.available_colors))
|
||||
user << "<span class='warning'>This [P] can't be painted [mode]. Available colors: [english_list(P.available_colors)]</span>"
|
||||
return
|
||||
P._color = mode
|
||||
P.color = mode
|
||||
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
|
||||
P.update_icon()
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
handle_item_insertion(O, 1)
|
||||
return 1
|
||||
return ..()
|
||||
var/global/list/bottle_colour_choices = list("Blue" = "#0094FF","Dark Blue" = "#00137F","Green" = "#129E0A","Orange" = "#FF6A00","Purple" = "A17FFF","Red" = "#BE0000","Yellow" = "#FFD800","Grey" = "#9F9F9F","White" = "#FFFFFF","Custom" = "#FFFFFF",)
|
||||
var/global/list/bottle_colour_choices = list("Blue" = "#0094FF","Dark Blue" = "#00137F","Green" = "#129E0A","Orange" = "#FF6A00","Purple" = "#A17FFF","Red" = "#BE0000","Yellow" = "#FFD800","Grey" = "#9F9F9F","White" = "#FFFFFF","Custom" = "#FFFFFF",)
|
||||
/obj/item/weapon/storage/pill_bottle/verb/change()
|
||||
set name = "Add Coloured Label"
|
||||
set category = "Object"
|
||||
|
||||
@@ -39,15 +39,16 @@
|
||||
name = "Paint pipes"
|
||||
category = "Utilities"
|
||||
flags = RCD_RANGE
|
||||
|
||||
var/mass_colour = 0
|
||||
var/list/available_colors = list(
|
||||
"grey" = "#CCCCCC",
|
||||
"red" = "#800000",
|
||||
"blue" = "#000080",
|
||||
"cyan" = "#1C94C4",
|
||||
"green" = "#00CC00",
|
||||
"yellow" = "#FFCC00",
|
||||
"purple" = "purple"
|
||||
"grey" = PIPE_COLOR_GREY,
|
||||
"red" = PIPE_COLOR_RED,
|
||||
"blue" = PIPE_COLOR_BLUE,
|
||||
"cyan" = PIPE_COLOR_CYAN,
|
||||
"green" = PIPE_COLOR_GREEN,
|
||||
"orange" = PIPE_COLOR_ORANGE,
|
||||
"purple" = PIPE_COLOR_PURPLE,
|
||||
"custom" = "custom"
|
||||
)
|
||||
|
||||
var/selected_color = "grey"
|
||||
@@ -63,6 +64,8 @@
|
||||
|
||||
for(var/color_name in available_colors)
|
||||
var/color = available_colors[color_name]
|
||||
if (color == "custom")
|
||||
color = "#000000"
|
||||
color_css += {"
|
||||
a.color.[color_name] {
|
||||
color: [color];
|
||||
@@ -75,7 +78,7 @@
|
||||
}
|
||||
"}
|
||||
|
||||
master.interface.head += "<style type='text/css'>[color_css]</style>"
|
||||
master.interface.head += "<style type='text/css'>[color_css]</style><br><"
|
||||
|
||||
/datum/rcd_schematic/paint_pipes/deselect(var/mob/user, var/datum/rcd_schematic/new_schematic)
|
||||
. = ..()
|
||||
@@ -83,12 +86,20 @@
|
||||
selected_color = available_colors[1]
|
||||
|
||||
/datum/rcd_schematic/paint_pipes/get_HTML()
|
||||
. += "<h4>Colour Choice:</h4>"
|
||||
for(var/color_name in available_colors)
|
||||
var/selected = ""
|
||||
if(color_name == selected_color)
|
||||
selected = " selected"
|
||||
|
||||
if (selected_color == "custom")
|
||||
selected_color = input("Select Colour to change the pipe to", "Custom Pipe Colour", selected_color) as color
|
||||
if (selected_color == "#ffffff")
|
||||
selected_color = "#fffffe"
|
||||
. += "<a class='color [color_name][selected]' href='?src=\ref[master.interface];set_color=[color_name]'>•</a>"
|
||||
var/mass_colour_on = mass_colour ? "On" : "Off"
|
||||
. += {" <br>
|
||||
<h4>Mass Colour:</h4>
|
||||
Mass Colouration: <b><A href='?src=\ref[master.interface];set_mass_colour=1'>[mass_colour_on]</a></b>"}
|
||||
|
||||
/datum/rcd_schematic/paint_pipes/attack(var/atom/A, var/mob/user)
|
||||
if(!istype(A, /obj/machinery/atmospherics))
|
||||
@@ -96,26 +107,31 @@
|
||||
|
||||
var/obj/machinery/atmospherics/O = A
|
||||
|
||||
if(!O.available_colors || !O.available_colors.len)
|
||||
return "you cannot paint this!"
|
||||
|
||||
if(!(selected_color in O.available_colors))
|
||||
return "the color '[selected_color]' is not available for \a [O]"
|
||||
|
||||
playsound(get_turf(master), 'sound/machines/click.ogg', 50, 1)
|
||||
O._color = selected_color
|
||||
|
||||
if (selected_color in available_colors)
|
||||
selected_color = available_colors[selected_color]
|
||||
if(mass_colour && istype(O, /obj/machinery/atmospherics/pipe))
|
||||
var/obj/machinery/atmospherics/pipe/pipe_to_colour = O
|
||||
var/datum/pipeline/pipe_line = pipe_to_colour.parent
|
||||
var/list/pipeline_members = pipe_line.members
|
||||
if (pipeline_members.len < 500)
|
||||
O.color = selected_color
|
||||
pipe_to_colour.mass_colouration(selected_color)
|
||||
else return "That pipe network is simply too big to paint!"
|
||||
else
|
||||
O.color = selected_color
|
||||
O.update_icon()
|
||||
user.visible_message("<span class='notice'>[user] paints \the [O] [selected_color].</span>","<span class='notice'>You paint \the [O] [selected_color].</span>")
|
||||
O.update_icon()
|
||||
|
||||
/datum/rcd_schematic/paint_pipes/Topic(var/href, var/list/href_list)
|
||||
if(href_list["set_color"])
|
||||
if(href_list["set_color"] in available_colors)
|
||||
selected_color = href_list["set_color"]
|
||||
|
||||
master.update_options_menu()
|
||||
|
||||
return 1
|
||||
if(href_list["set_mass_colour"])
|
||||
mass_colour = mass_colour ? 0:1
|
||||
master.update_options_menu()
|
||||
return 1
|
||||
|
||||
//METERS AND SENSORS.
|
||||
|
||||
@@ -216,7 +232,7 @@
|
||||
<a class="no_dec" href="?src=\ref[master.interface];set_layer=4"><div class="layer vertical four [layer == 4 ? "selected" : ""]"></div></a>
|
||||
<a class="no_dec" href="?src=\ref[master.interface];set_layer=5"><div class="layer vertical five [layer == 5 ? "selected" : ""]"></div></a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layer_holder" style="left: 200px;">
|
||||
<a class="no_dec" href="?src=\ref[master.interface];set_layer=1"><div class="layer horizontal one [layer == 1 ? "selected" : ""]"></div></a>
|
||||
<a class="no_dec" href="?src=\ref[master.interface];set_layer=2"><div class="layer horizontal two [layer == 2 ? "selected" : ""]"></div></a>
|
||||
@@ -226,9 +242,9 @@
|
||||
</div>
|
||||
|
||||
"}
|
||||
|
||||
|
||||
. += "<h4>Directions</h4>"
|
||||
|
||||
|
||||
switch(pipe_type)
|
||||
if(PIPE_BINARY)
|
||||
. += render_dir_image(NORTH, "Vertical")
|
||||
@@ -291,7 +307,7 @@
|
||||
var/n_layer = Clamp(round(text2num(href_list["set_layer"])), 1, 5)
|
||||
if(layer == n_layer) //No point doing anything.
|
||||
return 1
|
||||
|
||||
|
||||
layer = n_layer
|
||||
master.update_options_menu()
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
var/vent_pump = null
|
||||
var/mode = "stabilize"
|
||||
var/vent_type = 0//0 for unary vents, 1 for DP vents
|
||||
|
||||
var/list/modes = list("stabilize", "purge")
|
||||
|
||||
/datum/automation/set_vent_pump_mode/Export()
|
||||
|
||||
9
html/changelogs/drcelt.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
author: DrCelt
|
||||
changes:
|
||||
- rscadd: Manifolds take the colour of adjacent pipes until the pipe bracket.
|
||||
- rscadd: Pumps, mixers, Filters, etc etc, now take the colour of adjacent pipes.
|
||||
- rscadd: You can now colour en masse using the RPD.
|
||||
- imageadd: Ported from Bay, New sprites for Pumps in order to allow this change to occur
|
||||
- rscadd: You can now paint pipes any colour you want using the RPD.
|
||||
- bugfix: vents, connectors and scrubbers now visibily look as if they connect to pipes if you can see the pipe.
|
||||
- bugfix: Fixed an issue with labelling pill bottles purple.
|
||||
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 837 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 83 KiB |