mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge remote-tracking branch 'upstream/dev' into APC
Conflicts: code/game/gamemodes/events/power_failure.dm code/modules/power/smes.dm
This commit is contained in:
@@ -67,8 +67,8 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
|
||||
return omni_icons[state]
|
||||
if("underlay")
|
||||
return underlays[state + dir + color]
|
||||
//if("underlay_intact")
|
||||
// return underlays_intact[state + dir + color]
|
||||
// if("underlay_intact")
|
||||
// return underlays_intact[state + dir + color]
|
||||
// if("underlay_exposed")
|
||||
// return underlays_exposed[state + dir + color]
|
||||
// if("underlay_down")
|
||||
@@ -194,6 +194,11 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
|
||||
I.color = pipe_colors[pipe_color]
|
||||
underlays[state + "[D]" + "[pipe_colors[pipe_color]]"] = I
|
||||
|
||||
/*
|
||||
Leaving the old icon manager code commented out for now, as we may want to rewrite the new code to cleanly
|
||||
separate the newpipe icon caching (speshul supply and scrubber lines) from the rest of the pipe code.
|
||||
*/
|
||||
|
||||
/*
|
||||
/datum/pipe_icon_manager/proc/gen_underlay_icons()
|
||||
if(!underlays_intact)
|
||||
|
||||
@@ -200,12 +200,9 @@
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/examine()
|
||||
set src in oview(1)
|
||||
..()
|
||||
|
||||
if (get_dist(usr, src) <= 1)
|
||||
usr << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/power_change()
|
||||
var/old_stat = stat
|
||||
|
||||
@@ -190,9 +190,11 @@
|
||||
if(!istype(T))
|
||||
return
|
||||
if(T.intact && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 )
|
||||
pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
|
||||
//pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
|
||||
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down")
|
||||
else
|
||||
pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
|
||||
//pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
|
||||
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "intact")
|
||||
|
||||
return list("on_icon" = ic_on, "off_icon" = ic_off, "pipe_icon" = pipe_state)
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/freezer/examine()
|
||||
..()
|
||||
/obj/machinery/atmospherics/unary/freezer/examine(mob/user)
|
||||
..(user)
|
||||
if (opened)
|
||||
usr << "The maintenance hatch is open."
|
||||
user << "The maintenance hatch is open."
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/heater/examine()
|
||||
..()
|
||||
/obj/machinery/atmospherics/unary/heater/examine(mob/user)
|
||||
..(user)
|
||||
if (opened)
|
||||
usr << "The maintenance hatch is open."
|
||||
user << "The maintenance hatch is open."
|
||||
|
||||
@@ -375,15 +375,13 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/examine()
|
||||
set src in oview(1)
|
||||
..()
|
||||
if (get_dist(usr, src) <= 1)
|
||||
usr << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
|
||||
/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
|
||||
else
|
||||
usr << "You are too far away to read the gauge."
|
||||
user << "You are too far away to read the gauge."
|
||||
if(welded)
|
||||
usr << "It seems welded shut."
|
||||
user << "It seems welded shut."
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/power_change()
|
||||
var/old_stat = stat
|
||||
|
||||
@@ -260,13 +260,11 @@
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/examine()
|
||||
set src in oview(1)
|
||||
..()
|
||||
if (get_dist(usr, src) <= 1)
|
||||
usr << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
|
||||
else
|
||||
usr << "You are too far away to read the gauge."
|
||||
user << "You are too far away to read the gauge."
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/Del()
|
||||
if(initial_loc)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/volume = 0
|
||||
force = 20
|
||||
|
||||
//layer = 2.4 //under wires with their 2.44
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
use_power = 0
|
||||
|
||||
var/alert_pressure = 80*ONE_ATMOSPHERE
|
||||
@@ -256,9 +256,9 @@
|
||||
del(meter)
|
||||
del(src)
|
||||
else if(node1 && node2)
|
||||
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "intact" + icon_connect_type)
|
||||
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]")
|
||||
else
|
||||
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "exposed[node1?1:0][node2?1:0]" + icon_connect_type)
|
||||
overlays += 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
|
||||
@@ -911,29 +911,21 @@
|
||||
/obj/machinery/atmospherics/pipe/cap
|
||||
name = "pipe endcap"
|
||||
desc = "An endcap for pipes"
|
||||
icon = 'icons/obj/pipes.dmi'
|
||||
icon_state = "cap"
|
||||
icon = 'icons/atmos/pipes.dmi'
|
||||
icon_state = ""
|
||||
level = 2
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
|
||||
volume = 35
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = NORTH
|
||||
initialize_directions = SOUTH
|
||||
|
||||
var/obj/machinery/atmospherics/node
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/New()
|
||||
..()
|
||||
switch(dir)
|
||||
if(SOUTH)
|
||||
initialize_directions = NORTH
|
||||
if(NORTH)
|
||||
initialize_directions = SOUTH
|
||||
if(WEST)
|
||||
initialize_directions = EAST
|
||||
if(EAST)
|
||||
initialize_directions = WEST
|
||||
initialize_directions = dir
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/hide(var/i)
|
||||
if(level == 1 && istype(loc, /turf/simulated))
|
||||
@@ -964,11 +956,20 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/update_icon()
|
||||
overlays = new()
|
||||
/obj/machinery/atmospherics/pipe/cap/change_color(var/new_color)
|
||||
..()
|
||||
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
|
||||
if(node)
|
||||
node.update_underlays()
|
||||
|
||||
icon_state = "cap[invisibility ? "-f" : ""]"
|
||||
return
|
||||
/obj/machinery/atmospherics/pipe/cap/update_icon(var/safety = 0)
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
|
||||
alpha = 255
|
||||
|
||||
overlays.Cut()
|
||||
overlays += 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))
|
||||
@@ -1008,7 +1009,8 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/hidden
|
||||
level = 1
|
||||
icon_state = "cap-f"
|
||||
icon_state = "cap"
|
||||
alpha = 128
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/hidden/scrubbers
|
||||
name = "scrubbers pipe endcap"
|
||||
|
||||
Reference in New Issue
Block a user