From 0999f1ab788888d1a227490b8925afd1bc6ccb46 Mon Sep 17 00:00:00 2001 From: Karolis2011 Date: Sat, 16 May 2015 17:27:39 +0300 Subject: [PATCH 1/2] Made sorting pipes dispesible also fixes #9305 --- code/game/machinery/pipe/pipe_dispenser.dm | 12 +++++++ .../recycling/disposal-construction.dm | 31 ++++++++++++++++--- code/modules/recycling/disposal.dm | 11 ++++--- 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 6b8793eac72..9f9d79841b1 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -179,6 +179,9 @@ Nah Chute
Upwards
Downwards
+Sorting
+Sorting (Wildcard)
+Sorting (Untagged)
"} ///// Z-Level stuff @@ -220,6 +223,15 @@ 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 ///// 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 == "" From 645ad1a17780aac0f4bdc962d0828c4e7c826367 Mon Sep 17 00:00:00 2001 From: Karolis2011 Date: Sat, 16 May 2015 18:05:47 +0300 Subject: [PATCH 2/2] Made tagger pipe dispensible. --- code/game/machinery/pipe/pipe_dispenser.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 9f9d79841b1..eb0ec519620 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -182,6 +182,8 @@ Nah Sorting
Sorting (Wildcard)
Sorting (Untagged)
+Tagger
+Tagger (Partial)
"} ///// Z-Level stuff @@ -232,6 +234,10 @@ Nah 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