Merge pull request #2939 from Citadel-Station-13/upstream-merge-30863
[MIRROR] Bluespace pipes
This commit is contained in:
@@ -12,6 +12,7 @@ Construction breaks otherwise
|
||||
#define PIPE_HE_MANIFOLD /obj/machinery/atmospherics/pipe/heat_exchanging/manifold
|
||||
#define PIPE_HE_4WAYMANIFOLD /obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w
|
||||
#define PIPE_JUNCTION /obj/machinery/atmospherics/pipe/heat_exchanging/junction
|
||||
#define PIPE_BLUESPACE /obj/machinery/atmospherics/pipe/bluespace
|
||||
//Unary
|
||||
#define PIPE_CONNECTOR /obj/machinery/atmospherics/components/unary/portables_connector
|
||||
#define PIPE_UVENT /obj/machinery/atmospherics/components/unary/vent_pump
|
||||
@@ -56,4 +57,4 @@ Construction breaks otherwise
|
||||
#define STATION_TUBE_OPEN 0
|
||||
#define STATION_TUBE_OPENING 1
|
||||
#define STATION_TUBE_CLOSED 2
|
||||
#define STATION_TUBE_CLOSING 3
|
||||
#define STATION_TUBE_CLOSING 3
|
||||
|
||||
@@ -30,6 +30,7 @@ Buildable meters
|
||||
PIPE_HE_MANIFOLD, \
|
||||
PIPE_HE_4WAYMANIFOLD, \
|
||||
PIPE_JUNCTION, \
|
||||
PIPE_BLUESPACE, \
|
||||
\
|
||||
PIPE_CONNECTOR, \
|
||||
PIPE_UVENT, \
|
||||
@@ -90,6 +91,7 @@ GLOBAL_LIST_INIT(pipeID2State, list(
|
||||
"[PIPE_HE_MANIFOLD]" = "he_manifold", \
|
||||
"[PIPE_HE_4WAYMANIFOLD]" = "he_manifold4w", \
|
||||
"[PIPE_JUNCTION]" = "junction", \
|
||||
"[PIPE_BLUESPACE]" = "bluespace", \
|
||||
\
|
||||
"[PIPE_CONNECTOR]" = "connector", \
|
||||
"[PIPE_UVENT]" = "uvent", \
|
||||
@@ -118,6 +120,7 @@ GLOBAL_LIST_INIT(pipeID2State, list(
|
||||
"[PIPE_HE_MANIFOLD]" = "h/e manifold", \
|
||||
"[PIPE_HE_4WAYMANIFOLD]"= "h/e 4-way manifold", \
|
||||
"[PIPE_JUNCTION]" = "junction", \
|
||||
"[PIPE_BLUESPACE]" = "bluespace pipe", \
|
||||
\
|
||||
"[PIPE_CONNECTOR]" = "connector", \
|
||||
"[PIPE_UVENT]" = "vent", \
|
||||
|
||||
@@ -13,13 +13,14 @@
|
||||
if(..())
|
||||
return 1
|
||||
var/dat = {"
|
||||
<b>Regular pipes:</b><BR>
|
||||
<b>Pipes:</b><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_SIMPLE];dir=1'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_SIMPLE];dir=5'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_MANIFOLD];dir=1'>Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_4WAYMANIFOLD];dir=1'>4-Way Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_MVALVE];dir=1'>Manual Valve</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_DVALVE];dir=1'>Digital Valve</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_BLUESPACE];dir=1'>Bluespace Pipe</A><BR>
|
||||
<b>Devices:</b><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_CONNECTOR];dir=1'>Connector</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_UVENT];dir=1'>Vent</A><BR>
|
||||
|
||||
@@ -79,13 +79,14 @@ GLOBAL_LIST_INIT(disposalpipeID2State, list(
|
||||
|
||||
//find these defines in code\game\machinery\pipe\consruction.dm
|
||||
GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
"Regular Pipes" = list(
|
||||
"Pipes" = list(
|
||||
"Pipe" = new /datum/pipe_info(PIPE_SIMPLE, 1, PIPE_BENDABLE),
|
||||
//"Bent Pipe" = new /datum/pipe_info(PIPE_SIMPLE, 5, PIPE_BENT),
|
||||
"Manifold" = new /datum/pipe_info(PIPE_MANIFOLD, 1, PIPE_TRINARY),
|
||||
"Manual Valve" = new /datum/pipe_info(PIPE_MVALVE, 1, PIPE_BINARY),
|
||||
"Digital Valve" = new /datum/pipe_info(PIPE_DVALVE, 1, PIPE_BINARY),
|
||||
"4-Way Manifold" = new /datum/pipe_info(PIPE_4WAYMANIFOLD, 1, PIPE_QUAD),
|
||||
"Bluespace Pipe" = new /datum/pipe_info(PIPE_BLUESPACE, 1, PIPE_UNARY),
|
||||
),
|
||||
"Devices"=list(
|
||||
"Connector" = new /datum/pipe_info(PIPE_CONNECTOR, 1, PIPE_UNARY),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
GLOBAL_LIST_INIT(pipe_paint_colors, list("grey"=rgb(255,255,255), "red"=rgb(255,0,0), "blue"=rgb(0,0,255), "cyan"=rgb(0,256,249), "green"=rgb(30,255,0), "yellow"=rgb(255,198,0), "purple"=rgb(130,43,255)))
|
||||
|
||||
/obj/item/device/pipe_painter
|
||||
name = "pipe painter"
|
||||
@@ -5,16 +6,7 @@
|
||||
icon_state = "labeler1"
|
||||
item_state = "flight"
|
||||
flags_1 = NOBLUDGEON_1
|
||||
var/list/modes = list(
|
||||
"grey" = rgb(255,255,255),
|
||||
"red" = rgb(255,0,0),
|
||||
"blue" = rgb(0,0,255),
|
||||
"cyan" = rgb(0,256,249),
|
||||
"green" = rgb(30,255,0),
|
||||
"yellow" = rgb(255,198,0),
|
||||
"purple" = rgb(130,43,255)
|
||||
)
|
||||
var/mode = "grey"
|
||||
var/paint_color = "grey"
|
||||
|
||||
materials = list(MAT_METAL=5000, MAT_GLASS=2000)
|
||||
|
||||
@@ -27,14 +19,13 @@
|
||||
return
|
||||
|
||||
var/obj/machinery/atmospherics/pipe/P = A
|
||||
P.add_atom_colour(modes[mode], FIXED_COLOUR_PRIORITY)
|
||||
P.pipe_color = modes[mode]
|
||||
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
|
||||
P.update_node_icon() //updates the neighbors
|
||||
if(P.paint(GLOB.pipe_paint_colors[paint_color]))
|
||||
playsound(src, 'sound/machines/click.ogg', 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
|
||||
|
||||
/obj/item/device/pipe_painter/attack_self(mob/user)
|
||||
mode = input("Which colour do you want to use?","Pipe painter") in modes
|
||||
paint_color = input("Which colour do you want to use?","Pipe painter") in GLOB.pipe_paint_colors
|
||||
|
||||
/obj/item/device/pipe_painter/examine()
|
||||
/obj/item/device/pipe_painter/examine(mob/user)
|
||||
..()
|
||||
to_chat(usr, "It is set to [mode].")
|
||||
to_chat(user, "<span class='notice'>It is set to [paint_color].</span>")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
BIN
icons/obj/atmospherics/pipes/bluespace.dmi
Normal file
BIN
icons/obj/atmospherics/pipes/bluespace.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 677 B |
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 23 KiB |
@@ -1153,6 +1153,7 @@
|
||||
#include "code\modules\atmospherics\machinery\other\meter.dm"
|
||||
#include "code\modules\atmospherics\machinery\other\miner.dm"
|
||||
#include "code\modules\atmospherics\machinery\other\zvent.dm"
|
||||
#include "code\modules\atmospherics\machinery\pipes\bluespace_pipe.dm"
|
||||
#include "code\modules\atmospherics\machinery\pipes\manifold.dm"
|
||||
#include "code\modules\atmospherics\machinery\pipes\manifold4w.dm"
|
||||
#include "code\modules\atmospherics\machinery\pipes\pipes.dm"
|
||||
|
||||
Reference in New Issue
Block a user