mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 04:57:47 +01:00
Merge pull request #9308 from Karolis2011/dev
Made sorting and tagger pipes dispensible
This commit is contained in:
@@ -12,9 +12,10 @@
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1850)
|
||||
level = 2
|
||||
var/sortType = ""
|
||||
var/ptype = 0
|
||||
// 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk, 6=disposal bin, 7=outlet, 8=inlet
|
||||
|
||||
// 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk, 6=disposal bin, 7=outlet, 8=inlet 9=pipe-j1s 10=pipe-j2s
|
||||
var/subtype = 0
|
||||
var/dpdir = 0 // directions as disposalpipe
|
||||
var/base_state = "pipe-s"
|
||||
|
||||
@@ -154,9 +155,21 @@
|
||||
if(8)
|
||||
return /obj/machinery/disposal/deliveryChute
|
||||
if(9)
|
||||
return /obj/structure/disposalpipe/sortjunction
|
||||
switch(subtype)
|
||||
if(0)
|
||||
return /obj/structure/disposalpipe/sortjunction
|
||||
if(1)
|
||||
return /obj/structure/disposalpipe/sortjunction/wildcard
|
||||
if(2)
|
||||
return /obj/structure/disposalpipe/sortjunction/untagged
|
||||
if(10)
|
||||
return /obj/structure/disposalpipe/sortjunction/flipped
|
||||
switch(subtype)
|
||||
if(0)
|
||||
return /obj/structure/disposalpipe/sortjunction/flipped
|
||||
if(1)
|
||||
return /obj/structure/disposalpipe/sortjunction/wildcard/flipped
|
||||
if(2)
|
||||
return /obj/structure/disposalpipe/sortjunction/untagged/flipped
|
||||
///// Z-Level stuff
|
||||
if(11)
|
||||
return /obj/structure/disposalpipe/up
|
||||
@@ -187,7 +200,13 @@
|
||||
if(8)
|
||||
nicetype = "delivery chute"
|
||||
if(9, 10)
|
||||
nicetype = "sorting pipe"
|
||||
switch(subtype)
|
||||
if(0)
|
||||
nicetype = "sorting pipe"
|
||||
if(1)
|
||||
nicetype = "wildcard sorting pipe"
|
||||
if(2)
|
||||
nicetype = "untagged sorting pipe"
|
||||
ispipe = 1
|
||||
if(13)
|
||||
nicetype = "tagging pipe"
|
||||
@@ -267,7 +286,9 @@
|
||||
//Needs some special treatment ;)
|
||||
if(ptype==9 || ptype==10)
|
||||
var/obj/structure/disposalpipe/sortjunction/SortP = P
|
||||
SortP.sortType = sortType
|
||||
SortP.updatedir()
|
||||
SortP.updatedesc()
|
||||
|
||||
else if(ptype==6) // Disposal bin
|
||||
var/obj/machinery/disposal/P = new /obj/machinery/disposal(src.loc)
|
||||
|
||||
@@ -663,7 +663,8 @@
|
||||
var/health = 10 // health points 0-10
|
||||
layer = 2.3 // slightly lower than wires and other pipes
|
||||
var/base_icon_state // initial icon state on map
|
||||
|
||||
var/sortType = ""
|
||||
var/subtype = 0
|
||||
// new pipe, set the icon_state as on map
|
||||
New()
|
||||
..()
|
||||
@@ -910,8 +911,10 @@
|
||||
C.ptype = 5
|
||||
if("pipe-j1s")
|
||||
C.ptype = 9
|
||||
C.sortType = sortType
|
||||
if("pipe-j2s")
|
||||
C.ptype = 10
|
||||
C.sortType = sortType
|
||||
///// Z-Level stuff
|
||||
if("pipe-u")
|
||||
C.ptype = 11
|
||||
@@ -922,6 +925,7 @@
|
||||
C.ptype = 13
|
||||
if("pipe-tagger-partial")
|
||||
C.ptype = 14
|
||||
C.subtype = src.subtype
|
||||
src.transfer_fingerprints_to(C)
|
||||
C.set_dir(dir)
|
||||
C.density = 0
|
||||
@@ -1187,7 +1191,6 @@
|
||||
icon_state = "pipe-j1s"
|
||||
desc = "An underfloor disposal pipe with a package sorting mechanism."
|
||||
|
||||
var/sortType = ""
|
||||
var/posdir = 0
|
||||
var/negdir = 0
|
||||
var/sortdir = 0
|
||||
@@ -1278,7 +1281,7 @@
|
||||
/obj/structure/disposalpipe/sortjunction/wildcard
|
||||
name = "wildcard sorting junction"
|
||||
desc = "An underfloor disposal pipe which filters all wrapped and tagged items."
|
||||
|
||||
subtype = 1
|
||||
divert_check(var/checkTag)
|
||||
return checkTag != ""
|
||||
|
||||
@@ -1286,7 +1289,7 @@
|
||||
/obj/structure/disposalpipe/sortjunction/untagged
|
||||
name = "untagged sorting junction"
|
||||
desc = "An underfloor disposal pipe which filters all untagged items."
|
||||
|
||||
subtype = 2
|
||||
divert_check(var/checkTag)
|
||||
return checkTag == ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user