Fixed a bug with mirrored tvalves and pipecaps, made it possible to make pipecaps from pipe dispensor and removed insulated pipes from it because they dont do anything sepcial

This commit is contained in:
Miniature
2012-04-29 04:58:57 +09:30
parent 6287aecbeb
commit b45f4cbfd8
5 changed files with 43 additions and 4 deletions

View File

@@ -339,6 +339,18 @@ obj/machinery/atmospherics/tvalve
obj/machinery/atmospherics/tvalve/mirrored
icon_state = "tvalvem0"
New()
switch(dir)
if(NORTH)
initialize_directions = SOUTH|NORTH|WEST
if(SOUTH)
initialize_directions = NORTH|SOUTH|EAST
if(EAST)
initialize_directions = WEST|EAST|NORTH
if(WEST)
initialize_directions = EAST|WEST|SOUTH
..()
initialize()
var/node1_dir
var/node2_dir

View File

@@ -1015,10 +1015,22 @@ obj/machinery/atmospherics/pipe
volume = 35
dir = SOUTH
initialize_directions = SOUTH
initialize_directions = NORTH
var/obj/machinery/atmospherics/node
New()
..()
switch(dir)
if(SOUTH)
initialize_directions = NORTH
if(NORTH)
initialize_directions = SOUTH
if(WEST)
initialize_directions = EAST
if(EAST)
initialize_directions = WEST
hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
invisibility = i ? 101 : 0

View File

@@ -19,6 +19,7 @@ Buildable meters
#define PIPE_GAS_MIXER 14
#define PIPE_MTVALVE 15
#define PIPE_MANIFOLD4W 16
#define PIPE_CAP 17
/obj/item/pipe
name = "pipe"
@@ -72,6 +73,8 @@ Buildable meters
src.pipe_type = PIPE_MTVALVE
else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold))
src.pipe_type = PIPE_MANIFOLD4W
else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap))
src.pipe_type = PIPE_CAP
else
src.pipe_type = pipe_type
src.dir = dir
@@ -101,6 +104,7 @@ Buildable meters
"gas mixer", \
"t-valve", \
"4-way manifold", \
"pipe cap", \
)
name = nlist[pipe_type+1] + " fitting"
var/list/islist = list( \
@@ -121,6 +125,7 @@ Buildable meters
"mixer", \
"mtvalve", \
"manifold4w", \
"cap", \
)
icon_state = islist[pipe_type + 1]
@@ -187,6 +192,8 @@ Buildable meters
return flip|cw|acw
if(PIPE_GAS_FILTER, PIPE_GAS_MIXER,PIPE_MTVALVE)
return dir|flip|cw
if(PIPE_CAP)
return flip
return 0
/obj/item/pipe/proc/get_pdir() //endpoints for regular pipes
@@ -510,6 +517,16 @@ Buildable meters
V.node3.initialize()
V.node3.build_network()
if(PIPE_CAP)
var/obj/machinery/atmospherics/pipe/cap/C = new(src.loc)
C.dir = dir
C.initialize_directions = pipe_dir
C.initialize()
C.build_network()
if(C.node)
C.node.initialize()
C.node.build_network()
playsound(src.loc, 'Ratchet.ogg', 50, 1)
user.visible_message( \
"[user] fastens the [src].", \

View File

@@ -16,6 +16,7 @@
var/dat = {"
<b>Regular pipes:</b><BR>
<A href='?src=\ref[src];make=0;dir=1'>Pipe</A><BR>
<A href='?src=\ref[src];make=17;dir=1'>Pipe Cap</A><BR>``
<A href='?src=\ref[src];make=1;dir=5'>Bent Pipe</A><BR>
<A href='?src=\ref[src];make=5;dir=1'>Manifold</A><BR>
<A href='?src=\ref[src];make=16;dir=1'>4-Way Manifold</A><BR>
@@ -33,9 +34,6 @@
<A href='?src=\ref[src];make=2;dir=1'>Pipe</A><BR>
<A href='?src=\ref[src];make=3;dir=5'>Bent Pipe</A><BR>
<A href='?src=\ref[src];make=6;dir=1'>Junction</A><BR>
<b>Insulated pipes:</b><BR>
<A href='?src=\ref[src];make=11;dir=1'>Pipe</A><BR>
<A href='?src=\ref[src];make=12;dir=5'>Bent Pipe</A><BR>
"}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB