|
|
|
@@ -71,10 +71,13 @@ Pipelines + Other Objects -> Pipe network
|
|
|
|
|
// Icons/overlays/underlays
|
|
|
|
|
/obj/machinery/atmospherics/update_icon()
|
|
|
|
|
var/turf/T = get_turf(loc)
|
|
|
|
|
if(!T || level == 2 || !T.intact)
|
|
|
|
|
plane = GAME_PLANE
|
|
|
|
|
else
|
|
|
|
|
if(T.transparent_floor)
|
|
|
|
|
plane = FLOOR_PLANE
|
|
|
|
|
else
|
|
|
|
|
if(!T || level == 2 || !T.intact)
|
|
|
|
|
plane = GAME_PLANE
|
|
|
|
|
else
|
|
|
|
|
plane = FLOOR_PLANE
|
|
|
|
|
|
|
|
|
|
/obj/machinery/atmospherics/proc/update_pipe_image()
|
|
|
|
|
pipe_image = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view)
|
|
|
|
@@ -95,15 +98,18 @@ Pipelines + Other Objects -> Pipe network
|
|
|
|
|
|
|
|
|
|
/obj/machinery/atmospherics/proc/add_underlay(turf/T, obj/machinery/atmospherics/node, direction, icon_connect_type)
|
|
|
|
|
if(node)
|
|
|
|
|
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
|
|
|
|
|
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe) && !T.transparent_floor)
|
|
|
|
|
//underlays += SSair.icon_manager.get_atmos_icon("underlay_down", direction, color_cache_name(node))
|
|
|
|
|
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
|
|
|
|
|
else
|
|
|
|
|
//underlays += SSair.icon_manager.get_atmos_icon("underlay_intact", direction, color_cache_name(node))
|
|
|
|
|
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
|
|
|
|
|
else
|
|
|
|
|
//underlays += SSair.icon_manager.get_atmos_icon("underlay_exposed", direction, pipe_color)
|
|
|
|
|
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "exposed" + icon_connect_type)
|
|
|
|
|
if(T.transparent_floor) //we want to keep pipes under transparent floors connected normally
|
|
|
|
|
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
|
|
|
|
|
else
|
|
|
|
|
//underlays += SSair.icon_manager.get_atmos_icon("underlay_exposed", direction, pipe_color)
|
|
|
|
|
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "exposed" + icon_connect_type)
|
|
|
|
|
|
|
|
|
|
/obj/machinery/atmospherics/proc/update_underlays()
|
|
|
|
|
if(check_icon_cache())
|
|
|
|
@@ -166,11 +172,14 @@ Pipelines + Other Objects -> Pipe network
|
|
|
|
|
|
|
|
|
|
//(De)construction
|
|
|
|
|
/obj/machinery/atmospherics/attackby(obj/item/W, mob/user)
|
|
|
|
|
var/turf/T = get_turf(src)
|
|
|
|
|
if(can_unwrench && istype(W, /obj/item/wrench))
|
|
|
|
|
var/turf/T = get_turf(src)
|
|
|
|
|
if(T.transparent_floor && istype(src, /obj/machinery/atmospherics/pipe) && layer != GAS_PIPE_VISIBLE_LAYER) //pipes on GAS_PIPE_VISIBLE_LAYER are above the transparent floor and should be interactable
|
|
|
|
|
to_chat(user, "<span class='danger'>You can't interact with something that's under the floor!</span>")
|
|
|
|
|
return
|
|
|
|
|
if(level == 1 && isturf(T) && T.intact)
|
|
|
|
|
to_chat(user, "<span class='danger'>You must remove the plating first.</span>")
|
|
|
|
|
return 1
|
|
|
|
|
return
|
|
|
|
|
var/datum/gas_mixture/int_air = return_air()
|
|
|
|
|
var/datum/gas_mixture/env_air = loc.return_air()
|
|
|
|
|
add_fingerprint(user)
|
|
|
|
@@ -184,14 +193,14 @@ Pipelines + Other Objects -> Pipe network
|
|
|
|
|
playsound(src.loc, W.usesound, 50, 1)
|
|
|
|
|
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
|
|
|
|
if(internal_pressure > 2*ONE_ATMOSPHERE)
|
|
|
|
|
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>")
|
|
|
|
|
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gust of air blows in your face... maybe you should reconsider?</span>")
|
|
|
|
|
unsafe_wrenching = TRUE //Oh dear oh dear
|
|
|
|
|
|
|
|
|
|
if(do_after(user, 40 * W.toolspeed, target = src) && !QDELETED(src))
|
|
|
|
|
user.visible_message( \
|
|
|
|
|
"[user] unfastens \the [src].", \
|
|
|
|
|
"<span class='notice'>You have unfastened \the [src].</span>", \
|
|
|
|
|
"<span class='italics'>You hear ratchet.</span>")
|
|
|
|
|
"<span class='italics'>You hear ratcheting.</span>")
|
|
|
|
|
investigate_log("was <span class='warning'>REMOVED</span> by [key_name(usr)]", "atmos")
|
|
|
|
|
|
|
|
|
|
for(var/obj/item/clothing/shoes/magboots/usermagboots in user.get_equipped_items())
|
|
|
|
@@ -206,6 +215,9 @@ Pipelines + Other Objects -> Pipe network
|
|
|
|
|
unsafe_pressure_release(user,internal_pressure)
|
|
|
|
|
deconstruct(TRUE)
|
|
|
|
|
else
|
|
|
|
|
if(T.transparent_floor)
|
|
|
|
|
to_chat(user, "<span class='danger'>You can't interact with something that's under the floor!</span>")
|
|
|
|
|
return
|
|
|
|
|
return ..()
|
|
|
|
|
|
|
|
|
|
//Called when an atmospherics object is unwrenched while having a large pressure difference
|
|
|
|
@@ -240,7 +252,12 @@ Pipelines + Other Objects -> Pipe network
|
|
|
|
|
dir = D
|
|
|
|
|
initialize_directions = P
|
|
|
|
|
var/turf/T = loc
|
|
|
|
|
level = T.intact ? 2 : 1
|
|
|
|
|
if(!T.transparent_floor)
|
|
|
|
|
level = T.intact ? 2 : 1
|
|
|
|
|
else
|
|
|
|
|
level = 2
|
|
|
|
|
plane = GAME_PLANE
|
|
|
|
|
layer = GAS_PIPE_VISIBLE_LAYER
|
|
|
|
|
add_fingerprint(usr)
|
|
|
|
|
if(!SSair.initialized) //If there's no atmos subsystem, we can't really initialize pipenets
|
|
|
|
|
SSair.machinery_to_construct.Add(src)
|
|
|
|
@@ -337,12 +354,15 @@ Pipelines + Other Objects -> Pipe network
|
|
|
|
|
|
|
|
|
|
/obj/machinery/atmospherics/proc/add_underlay_adapter(turf/T, obj/machinery/atmospherics/node, direction, icon_connect_type) //modified from add_underlay, does not make exposed underlays
|
|
|
|
|
if(node)
|
|
|
|
|
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
|
|
|
|
|
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe) && !T.transparent_floor)
|
|
|
|
|
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
|
|
|
|
|
else
|
|
|
|
|
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
|
|
|
|
|
else
|
|
|
|
|
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "retracted" + icon_connect_type)
|
|
|
|
|
if(T.transparent_floor) //we want to keep pipes under transparent floors connected normally
|
|
|
|
|
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
|
|
|
|
|
else
|
|
|
|
|
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "retracted" + icon_connect_type)
|
|
|
|
|
|
|
|
|
|
/obj/machinery/atmospherics/singularity_pull(S, current_size)
|
|
|
|
|
if(current_size >= STAGE_FIVE)
|
|
|
|
|