Merge pull request #2939 from Citadel-Station-13/upstream-merge-30863
[MIRROR] Bluespace pipes
This commit is contained in:
@@ -91,7 +91,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
/obj/machinery/atmospherics/proc/can_be_node(obj/machinery/atmospherics/target)
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/proc/pipeline_expansion()
|
||||
return nodes
|
||||
@@ -208,6 +208,17 @@ Pipelines + Other Objects -> Pipe network
|
||||
pipe_overlay = . = pipeimages[identifier] = image(iconset, iconstate, dir = direction)
|
||||
pipe_overlay.color = col
|
||||
|
||||
/obj/machinery/atmospherics/proc/icon_addintact(var/obj/machinery/atmospherics/node)
|
||||
var/image/img = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_intact", get_dir(src,node), node.pipe_color)
|
||||
underlays += img
|
||||
return img.dir
|
||||
|
||||
/obj/machinery/atmospherics/proc/icon_addbroken(var/connected = FALSE)
|
||||
var/unconnected = (~connected) & initialize_directions
|
||||
for(var/direction in GLOB.cardinals)
|
||||
if(unconnected & direction)
|
||||
underlays += getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_exposed", direction)
|
||||
|
||||
/obj/machinery/atmospherics/on_construction(pipe_type, obj_color)
|
||||
if(can_unwrench)
|
||||
add_atom_colour(obj_color, FIXED_COLOUR_PRIORITY)
|
||||
@@ -275,7 +286,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/proc/can_crawl_through()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/proc/returnPipenets()
|
||||
return list()
|
||||
@@ -288,4 +299,5 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
//Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
|
||||
/obj/machinery/atmospherics/proc/can_see_pipes()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -23,18 +23,6 @@ On top of that, now people can add component-speciic procs/vars if they want!
|
||||
Iconnery
|
||||
*/
|
||||
|
||||
/obj/machinery/atmospherics/components/proc/icon_addintact(var/obj/machinery/atmospherics/node)
|
||||
var/image/img = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_intact", get_dir(src,node), node.pipe_color)
|
||||
underlays += img
|
||||
|
||||
return img.dir
|
||||
|
||||
/obj/machinery/atmospherics/components/proc/icon_addbroken(var/connected = FALSE)
|
||||
var/unconnected = (~connected) & initialize_directions
|
||||
for(var/direction in GLOB.cardinals)
|
||||
if(unconnected & direction)
|
||||
underlays += getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_exposed", direction)
|
||||
|
||||
/obj/machinery/atmospherics/components/proc/update_icon_nopipes()
|
||||
return
|
||||
|
||||
@@ -52,7 +40,7 @@ Iconnery
|
||||
if(!showpipe)
|
||||
return //no need to update the pipes if they aren't showing
|
||||
|
||||
var/connected = FALSE
|
||||
var/connected = 0 //Direction bitset
|
||||
|
||||
for(DEVICE_TYPE_LOOP) //adds intact pieces
|
||||
if(NODE_I)
|
||||
|
||||
47
code/modules/atmospherics/machinery/pipes/bluespace_pipe.dm
Normal file
47
code/modules/atmospherics/machinery/pipes/bluespace_pipe.dm
Normal file
@@ -0,0 +1,47 @@
|
||||
GLOBAL_LIST_EMPTY(bluespace_pipes)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/bluespace
|
||||
name = "bluespace pipe"
|
||||
desc = "Transmits gas across large distances of space. Developed using bluespace technology."
|
||||
icon = 'icons/obj/atmospherics/pipes/bluespace.dmi'
|
||||
icon_state = "map"
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH
|
||||
device_type = UNARY
|
||||
can_buckle = FALSE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/bluespace/New()
|
||||
icon_state = "pipe"
|
||||
GLOB.bluespace_pipes += src
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/bluespace/Destroy()
|
||||
GLOB.bluespace_pipes -= src
|
||||
for(var/p in GLOB.bluespace_pipes)
|
||||
var/obj/machinery/atmospherics/pipe/bluespace/P = p
|
||||
QDEL_NULL(P.parent)
|
||||
P.build_network()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/bluespace/SetInitDirections()
|
||||
initialize_directions = dir
|
||||
|
||||
/obj/machinery/atmospherics/pipe/bluespace/pipeline_expansion()
|
||||
return ..() + GLOB.bluespace_pipes - src
|
||||
|
||||
/obj/machinery/atmospherics/components/pipe/bluespace/hide()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/bluespace/update_icon(showpipe)
|
||||
underlays.Cut()
|
||||
var/turf/T = loc
|
||||
if(level != 2 && T.intact)
|
||||
return //no need to update the pipes if they aren't showing
|
||||
var/connected = 0 //Direction bitset
|
||||
for(DEVICE_TYPE_LOOP) //adds intact pieces
|
||||
if(NODE_I)
|
||||
connected |= icon_addintact(NODE_I)
|
||||
icon_addbroken(connected) //adds broken pieces
|
||||
|
||||
/obj/machinery/atmospherics/pipe/bluespace/paint()
|
||||
return FALSE
|
||||
@@ -98,3 +98,10 @@
|
||||
if(damage_flag == "melee" && damage_amount < 12)
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/proc/paint(paint_color)
|
||||
add_atom_colour(paint_color, FIXED_COLOUR_PRIORITY)
|
||||
pipe_color = paint_color
|
||||
update_node_icon()
|
||||
return TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user