diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index 6b8793eac72..eb0ec519620 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -179,6 +179,11 @@ Nah
Chute
Upwards
Downwards
+Sorting
+Sorting (Wildcard)
+Sorting (Untagged)
+Tagger
+Tagger (Partial)
"}
///// Z-Level stuff
@@ -220,6 +225,19 @@ Nah
if(7)
C.ptype = 8
C.density = 1
+ if(8)
+ C.ptype = 9
+ C.subtype = 0
+ if(9)
+ C.ptype = 9
+ C.subtype = 1
+ if(10)
+ C.ptype = 9
+ C.subtype = 2
+ if(11)
+ C.ptype = 13
+ if(12)
+ C.ptype = 14
///// Z-Level stuff
if(21)
C.ptype = 11
diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm
index 4032d00a890..c6c00a3dbbf 100644
--- a/code/modules/recycling/disposal-construction.dm
+++ b/code/modules/recycling/disposal-construction.dm
@@ -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)
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index ead3ba3d91d..525a79d9d17 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -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 == ""