Merge pull request #2939 from Citadel-Station-13/upstream-merge-30863

[MIRROR] Bluespace pipes
This commit is contained in:
LetterJay
2017-09-26 14:58:23 -04:00
committed by GitHub
12 changed files with 88 additions and 36 deletions
+2 -1
View File
@@ -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>")