From cebd9fd2cbd29e4a2f1133889dc0dfc14a592797 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 18:32:20 +0100 Subject: [PATCH 001/106] Creates a disposal pipe that filters items that haven't found a valid sorting pipe (#11375) * Adds an unsorted sorting pipe * Only send unsorted things if they need sorting * Adds the ability to build the unsorted pipe with the RPD * Fixes pipe sorting * Update pipe_sorting.dm * Bug fixes * Entering a pipe backwards will send you the way that you came * Update code/modules/recycling/disposal/pipe_sorting.dm --- code/game/objects/items/RPD.dm | 1 + code/modules/recycling/disposal/holder.dm | 1 + .../recycling/disposal/pipe_sorting.dm | 35 +++++++++++++++---- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm index 96be0b40ffc06..413c3f36b725b 100644 --- a/code/game/objects/items/RPD.dm +++ b/code/game/objects/items/RPD.dm @@ -56,6 +56,7 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list( new /datum/pipe_info/disposal("Y-Junction", /obj/structure/disposalpipe/junction/yjunction), new /datum/pipe_info/disposal("Sort Junction", /obj/structure/disposalpipe/sorting/mail, PIPE_TRIN_M), new /datum/pipe_info/disposal("Package Junction", /obj/structure/disposalpipe/sorting/wrap, PIPE_TRIN_M), + new /datum/pipe_info/disposal("Unsorted Mail Junction", /obj/structure/disposalpipe/sorting/unsorted, PIPE_TRIN_M), new /datum/pipe_info/disposal("Trunk", /obj/structure/disposalpipe/trunk), new /datum/pipe_info/disposal("Bin", /obj/machinery/disposal/bin, PIPE_ONEDIR), new /datum/pipe_info/disposal("Outlet", /obj/structure/disposaloutlet), diff --git a/code/modules/recycling/disposal/holder.dm b/code/modules/recycling/disposal/holder.dm index 4ff466db0f06c..17c6872425561 100644 --- a/code/modules/recycling/disposal/holder.dm +++ b/code/modules/recycling/disposal/holder.dm @@ -16,6 +16,7 @@ var/destinationTag = NONE // changes if contains a delivery container var/tomail = FALSE // contains wrapped package var/hasmob = FALSE // contains a mob + var/unsorted = TRUE // have we been sorted yet? /obj/structure/disposalholder/Destroy() QDEL_NULL(gas) diff --git a/code/modules/recycling/disposal/pipe_sorting.dm b/code/modules/recycling/disposal/pipe_sorting.dm index 4aab953e83306..d9f771528482b 100644 --- a/code/modules/recycling/disposal/pipe_sorting.dm +++ b/code/modules/recycling/disposal/pipe_sorting.dm @@ -8,10 +8,17 @@ /obj/structure/disposalpipe/sorting/nextdir(obj/structure/disposalholder/H) var/sortdir = dpdir & ~(dir | turn(dir, 180)) - if(H.dir != sortdir) // probably came from the negdir - if(check_sorting(H)) // if destination matches filtered type... - return sortdir // exit through sortdirection - + var/input_direction = dir + // probably came from the negdir + if(H.dir == input_direction) + // if destination matches filtered type... + if(check_sorting(H)) + H.unsorted = FALSE + // exit through sortdirection + return sortdir + // If we are entering backwards, continue onwards + if (H.dir == turn(input_direction, 180)) + return H.dir // go with the flow to positive direction return dir @@ -23,7 +30,7 @@ // Mail sorting junction, uses package tags to sort objects. /obj/structure/disposalpipe/sorting/mail - desc = "An underfloor disposal pipe that sorts wrapped objects based on their destination tags." + desc = "An underfloor disposal pipe that sorts wrapped objects based on their destination tags. Objects passing through it become sorted." flip_type = /obj/structure/disposalpipe/sorting/mail/flip var/sortType = 0 // sortType is to be set in map editor. @@ -82,7 +89,7 @@ // Wrap sorting junction, sorts objects destined for the mail office mail table (tomail = 1) /obj/structure/disposalpipe/sorting/wrap name = "package sorting disposal pipe" - desc = "An underfloor disposal pipe which sorts wrapped and unwrapped objects." + desc = "An underfloor disposal pipe which sorts wrapped and unwrapped objects. Objects passing through it become sorted." flip_type = /obj/structure/disposalpipe/sorting/wrap/flip initialize_dirs = DISP_DIR_RIGHT | DISP_DIR_FLIP @@ -93,3 +100,19 @@ icon_state = "pipe-j2s" flip_type = /obj/structure/disposalpipe/sorting/wrap initialize_dirs = DISP_DIR_LEFT | DISP_DIR_FLIP + +// Unsorted junction, will divert things based on whether or not they have been sorted. +/obj/structure/disposalpipe/sorting/unsorted + name = "unsorted sorting disposal pipe" + desc = "An underfloor disposal pipe which sorts sorted and unsorted objects. Objects passing through it become sorted." + flip_type = /obj/structure/disposalpipe/sorting/unsorted/flip + initialize_dirs = DISP_DIR_RIGHT | DISP_DIR_FLIP + +/obj/structure/disposalpipe/sorting/unsorted/check_sorting(obj/structure/disposalholder/H) + return H.unsorted && (H.destinationTag > 1 || H.tomail) + +/obj/structure/disposalpipe/sorting/unsorted/flip + icon_state = "pipe-j2s" + flip_type = /obj/structure/disposalpipe/sorting/unsorted + initialize_dirs = DISP_DIR_LEFT | DISP_DIR_FLIP + From 808d9d7e11491b648499be6e484af13a4a35e0d4 Mon Sep 17 00:00:00 2001 From: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:41:47 -0500 Subject: [PATCH 002/106] Automatic changelog generation for PR #11375 [ci skip] --- html/changelogs/AutoChangeLog-pr-11375.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-11375.yml diff --git a/html/changelogs/AutoChangeLog-pr-11375.yml b/html/changelogs/AutoChangeLog-pr-11375.yml new file mode 100644 index 0000000000000..9553d6b1ddaf4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-11375.yml @@ -0,0 +1,7 @@ +author: PowerfulBacon +delete-after: true +changes: + - rscadd: Adds a dispoal pipe that filters items which haven't been sorted but need + to be sorted. + - tweak: Tweaks the code of the disposal pipe filtering so that items not entering + from the input will not be sorted. From 39be46405b7056ae691e09274d1f05957db00cb2 Mon Sep 17 00:00:00 2001 From: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Sun, 25 Aug 2024 18:03:22 +0000 Subject: [PATCH 003/106] Automatic changelog compile [ci skip] --- html/changelog.html | 5 +++++ html/changelogs/.all_changelog.yml | 5 +++++ html/changelogs/AutoChangeLog-pr-11375.yml | 7 ------- 3 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-11375.yml diff --git a/html/changelog.html b/html/changelog.html index b067d5dd0c896..5397b500996c5 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -62,6 +62,11 @@

HowToLoLu updated:

  • Eminences no longer attempt to update a non-existent health hud
  • Changed a few stack traces in hud code to crashes for less obfuscated runtimes
  • +

    PowerfulBacon updated:

    +

    Rukofamicom updated: