[PORT TG] ports some disposal changes, reroutes box and more disposals (#21983)

* Another byond min max update

* wat

* new pipes

* the shit

* test map

* for sarah

* fixed?

* updating

* cleanup

* yay combat

* HMMM

* atomizing

* something

* arg

* final

* update mapmerge

* fixes and fun toys

* revert

* whoops

* final change
This commit is contained in:
wonderinghost
2024-06-13 23:19:18 -04:00
committed by GitHub
parent 8f2bda75fe
commit 8bc2ae2a1c
13 changed files with 1379 additions and 1139 deletions

View File

@@ -817,6 +817,7 @@
icon_state = "1-2"
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2,
/obj/effect/mapping_helpers/mail_sorting/service/chapel,
/turf/open/floor/plasteel/dark,
/area/chapel/main)
"YT" = (

View File

@@ -128,6 +128,7 @@
/obj/structure/disposalpipe/sorting/mail{
sortType = 17
},
/obj/effect/mapping_helpers/mail_sorting/service/chapel,
/turf/open/floor/carpet/black,
/area/chapel/office)
"gr" = (

File diff suppressed because it is too large Load Diff

View File

@@ -6,6 +6,7 @@
#define PIPE_UNARY 4 //4 directions: N, S, E, W
#define PIPE_ONEDIR 5 //1 direction: N/S/E/W
#define PIPE_UNARY_FLIPPABLE 6 //8 directions: N/S/E/W/N-flipped/S-flipped/E-flipped/W-flipped
#define PIPE_ONEDIR_FLIPPABLE 7 //2 direction: N/S/E/W, N-flipped/S-flipped/E-flipped/W-flipped
//Disposal pipe relative connection directions
#define DISP_DIR_BASE 0

View File

@@ -0,0 +1,32 @@
#define SORT_TYPE_WASTE 0
///All unwrapped items and untagged parcels get picked up by a junction with this sortType. Usually leads to the recycler.
#define SORT_TYPE_DISPOSALS 1
#define SORT_TYPE_CARGO_BAY 2
#define SORT_TYPE_QM_OFFICE 3
#define SORT_TYPE_ENGINEERING 4
#define SORT_TYPE_CE_OFFICE 5
#define SORT_TYPE_ATMOSPHERICS 6
#define SORT_TYPE_SECURITY 7
#define SORT_TYPE_HOS_OFFICE 8
#define SORT_TYPE_MEDBAY 9
#define SORT_TYPE_CMO_OFFICE 10
#define SORT_TYPE_CHEMISTRY 11
#define SORT_TYPE_RESEARCH 12
#define SORT_TYPE_RD_OFFICE 13
#define SORT_TYPE_ROBOTICS 14
#define SORT_TYPE_HOP_OFFICE 15
#define SORT_TYPE_LIBRARY 16
#define SORT_TYPE_CHAPEL 17
#define SORT_TYPE_THEATER 18
#define SORT_TYPE_BAR 19
#define SORT_TYPE_KITCHEN 20
#define SORT_TYPE_HYDROPONICS 21
#define SORT_TYPE_JANITOR_CLOSET 22
#define SORT_TYPE_GENETICS 23
#define SORT_TYPE_EXPERIMENTOR_LAB 24
#define SORT_TYPE_TOXINS 25
#define SORT_TYPE_DORMITORIES 26
#define SORT_TYPE_VIROLOGY 27
#define SORT_TYPE_XENOBIOLOGY 28
#define SORT_TYPE_LAW_OFFICE 29
#define SORT_TYPE_DETECTIVES_OFFICE 30

View File

@@ -57,6 +57,7 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
new /datum/pipe_info/disposal("Junction", /obj/structure/disposalpipe/junction, PIPE_TRIN_M),
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("Rotator", /obj/structure/disposalpipe/rotator, PIPE_ONEDIR_FLIPPABLE),
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),
@@ -134,6 +135,8 @@ GLOBAL_LIST_INIT(fluid_duct_recipes, list(
if(PIPE_UNARY_FLIPPABLE)
dirs = list("[NORTH]" = "North", "[NORTHEAST]" = "North Flipped", "[EAST]" = "East", "[SOUTHEAST]" = "East Flipped",
"[SOUTH]" = "South", "[SOUTHWEST]" = "South Flipped", "[WEST]" = "West", "[NORTHWEST]" = "West Flipped")
if(PIPE_ONEDIR_FLIPPABLE)
dirs = list("[SOUTH]" = name, "[SOUTHEAST]" = "[name] Flipped")
var/list/rows = list()
@@ -141,7 +144,7 @@ GLOBAL_LIST_INIT(fluid_duct_recipes, list(
var/i = 0
for(var/dir in dirs)
var/numdir = text2num(dir)
var/flipped = ((dirtype == PIPE_TRIN_M) || (dirtype == PIPE_UNARY_FLIPPABLE)) && (numdir in GLOB.diagonals)
var/flipped = ((dirtype == PIPE_TRIN_M) || (dirtype == PIPE_UNARY_FLIPPABLE) || (dirtype == PIPE_ONEDIR_FLIPPABLE)) && (ISDIAGONALDIR(numdir))
row["previews"] += list(list("selected" = (numdir == selected_dir), "dir" = dir2text(numdir), "dir_name" = dirs[dir], "icon_state" = icon_state, "flipped" = flipped))
if(i++ || dirtype == PIPE_ONEDIR)
rows += list(row)

View File

@@ -0,0 +1,124 @@
/obj/effect/mapping_helpers/mail_sorting
icon_state = "sort_type_helper"
late = TRUE
var/sort_type = SORT_TYPE_WASTE
/obj/effect/mapping_helpers/mail_sorting/Initialize(mapload)
..()
return INITIALIZE_HINT_LATELOAD
/obj/effect/mapping_helpers/mail_sorting/LateInitialize()
var/obj/structure/disposalpipe/sorting/mail/mail_sorter = locate(/obj/structure/disposalpipe/sorting/mail) in loc
if(mail_sorter)
mail_sorter.sortTypes |= sort_type
else
log_mapping("[src] failed to find a mail sorting disposal pipe at [AREACOORD(src)]")
qdel(src)
/obj/effect/mapping_helpers/mail_sorting/supply
icon_state = "sort_type_helper_sup"
/obj/effect/mapping_helpers/mail_sorting/supply/disposals
sort_type = SORT_TYPE_DISPOSALS
/obj/effect/mapping_helpers/mail_sorting/supply/cargo_bay
sort_type = SORT_TYPE_CARGO_BAY
/obj/effect/mapping_helpers/mail_sorting/supply/qm_office
sort_type = SORT_TYPE_QM_OFFICE
/obj/effect/mapping_helpers/mail_sorting/engineering
icon_state = "sort_type_helper_eng"
/obj/effect/mapping_helpers/mail_sorting/engineering/general
sort_type = SORT_TYPE_ENGINEERING
/obj/effect/mapping_helpers/mail_sorting/engineering/ce_office
sort_type = SORT_TYPE_CE_OFFICE
/obj/effect/mapping_helpers/mail_sorting/engineering/atmospherics
sort_type = SORT_TYPE_ATMOSPHERICS
/obj/effect/mapping_helpers/mail_sorting/security
icon_state = "sort_type_helper_sec"
/obj/effect/mapping_helpers/mail_sorting/security/general
sort_type = SORT_TYPE_SECURITY
/obj/effect/mapping_helpers/mail_sorting/security/hos_office
sort_type = SORT_TYPE_HOS_OFFICE
/obj/effect/mapping_helpers/mail_sorting/security/detectives_office
sort_type = SORT_TYPE_DETECTIVES_OFFICE
/obj/effect/mapping_helpers/mail_sorting/medbay
icon_state = "sort_type_helper_med"
/obj/effect/mapping_helpers/mail_sorting/medbay/general
sort_type = SORT_TYPE_MEDBAY
/obj/effect/mapping_helpers/mail_sorting/medbay/cmo_office
sort_type = SORT_TYPE_CMO_OFFICE
/obj/effect/mapping_helpers/mail_sorting/medbay/chemistry
sort_type = SORT_TYPE_CHEMISTRY
/obj/effect/mapping_helpers/mail_sorting/medbay/virology
sort_type = SORT_TYPE_VIROLOGY
/obj/effect/mapping_helpers/mail_sorting/science
icon_state = "sort_type_helper_sci"
/obj/effect/mapping_helpers/mail_sorting/science/research
sort_type = SORT_TYPE_RESEARCH
/obj/effect/mapping_helpers/mail_sorting/science/rd_office
sort_type = SORT_TYPE_RD_OFFICE
/obj/effect/mapping_helpers/mail_sorting/science/robotics
sort_type = SORT_TYPE_ROBOTICS
/obj/effect/mapping_helpers/mail_sorting/science/genetics
sort_type = SORT_TYPE_GENETICS
/obj/effect/mapping_helpers/mail_sorting/science/experimentor_lab
sort_type = SORT_TYPE_EXPERIMENTOR_LAB
/obj/effect/mapping_helpers/mail_sorting/science/toxins
sort_type = SORT_TYPE_TOXINS
/obj/effect/mapping_helpers/mail_sorting/science/xenobiology
sort_type = SORT_TYPE_XENOBIOLOGY
/obj/effect/mapping_helpers/mail_sorting/service
icon_state = "sort_type_helper_serv"
/obj/effect/mapping_helpers/mail_sorting/service/hop_office
sort_type = SORT_TYPE_HOP_OFFICE
/obj/effect/mapping_helpers/mail_sorting/service/library
sort_type = SORT_TYPE_LIBRARY
/obj/effect/mapping_helpers/mail_sorting/service/chapel
sort_type = SORT_TYPE_CHAPEL
/obj/effect/mapping_helpers/mail_sorting/service/theater
sort_type = SORT_TYPE_THEATER
/obj/effect/mapping_helpers/mail_sorting/service/bar
sort_type = SORT_TYPE_BAR
/obj/effect/mapping_helpers/mail_sorting/service/kitchen
sort_type = SORT_TYPE_KITCHEN
/obj/effect/mapping_helpers/mail_sorting/service/hydroponics
sort_type = SORT_TYPE_HYDROPONICS
/obj/effect/mapping_helpers/mail_sorting/service/janitor_closet
sort_type = SORT_TYPE_JANITOR_CLOSET
/obj/effect/mapping_helpers/mail_sorting/service/dormitories
sort_type = SORT_TYPE_DORMITORIES
/obj/effect/mapping_helpers/mail_sorting/service/law_office
sort_type = SORT_TYPE_LAW_OFFICE

View File

@@ -19,6 +19,7 @@
var/pressure_charging = TRUE
// True if flush handle is pulled
var/flush = FALSE
/// The attached pipe trunk
var/obj/structure/disposalpipe/trunk/trunk = null
/// True if flushing in progress
@@ -110,7 +111,7 @@
return
place_item_in_disposal(I, user)
update_appearance()
return 1 //no afterattack
return TRUE //no afterattack
else
return ..()
@@ -271,22 +272,80 @@
desc = "A pneumatic waste disposal unit."
icon_state = "disposal"
base_icon_state = "disposal"
/// Reference to the mounted destination tagger for disposal bins with one mounted.
var/obj/item/destTagger/mounted_tagger
// attack by item places it in to disposal
/obj/machinery/disposal/bin/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/storage/bag/trash)) //Not doing component overrides because this is a specific type.
var/obj/item/storage/bag/trash/T = I
var/datum/component/storage/STR = T.GetComponent(/datum/component/storage)
if(istype(I, /obj/item/storage/bag/trash)) //Not doing component overrides because this is a specific type.
var/obj/item/storage/bag/trash/b = I
var/datum/component/storage/STR = b.GetComponent(/datum/component/storage)
to_chat(user, span_warning("You empty the bag."))
for(var/obj/item/O in T.contents)
for(var/obj/item/O in b.contents)
STR.remove_from_storage(O,src)
T.update_appearance()
b.update_appearance()
update_appearance()
if(istype(I, /obj/item/destTagger))
return
else
return ..()
// handle machine interaction
/obj/machinery/disposal/bin/attackby_secondary(obj/item/I, mob/user, params)
if(istype(I, /obj/item/destTagger))
var/obj/item/destTagger/new_tagger = I
if(mounted_tagger)
balloon_alert(user, "already has a tagger!")
return
if(HAS_TRAIT(new_tagger, TRAIT_NODROP) || !user.transferItemToLoc(new_tagger, src))
balloon_alert(user, "stuck to your hand!")
return
new_tagger.moveToNullspace()
user.visible_message(span_notice("[user] snaps \the [new_tagger] onto [src]!"))
balloon_alert(user, "tagger returned")
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
mounted_tagger = new_tagger
update_appearance()
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
else
return ..()
/obj/machinery/disposal/bin/attack_hand_secondary(mob/user, list/modifiers)
. = ..()
if(!mounted_tagger)
balloon_alert(user, "no destination tagger!")
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
if(!user.put_in_hands(mounted_tagger))
balloon_alert(user, "destination tagger falls!")
mounted_tagger = null
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
user.visible_message(span_notice("[user] unhooks the [mounted_tagger] from [src]."))
balloon_alert(user, "tagger pulled")
playsound(src, 'sound/machines/click.ogg', 60, TRUE)
mounted_tagger = null
update_appearance(UPDATE_OVERLAYS)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
/obj/machinery/disposal/bin/examine(mob/user)
. = ..()
if(isnull(mounted_tagger))
. += span_notice("The destination tagger mount is empty.")
else
. += span_notice("\The [mounted_tagger] is hanging on the side. Right Click to remove.")
/obj/machinery/disposal/bin/Destroy()
if(!isnull(mounted_tagger))
QDEL_NULL(mounted_tagger)
return ..()
/obj/machinery/disposal/bin/on_deconstruction(disassembled)
. = ..()
if(!isnull(mounted_tagger))
mounted_tagger.forceMove(drop_location())
mounted_tagger = null
/obj/machinery/disposal/bin/AltClick(mob/user)
. = ..()
if(!user.canUseTopic(src, TRUE))
@@ -375,7 +434,10 @@
//flush handle
if(flush)
. += "[base_icon_state]-handle"
. += "[base_icon_state]-dispover-handle"
if(mounted_tagger)
. += "tagger_mount"
//only handle is shown if no power
if(stat & NOPOWER || panel_open)
@@ -383,21 +445,25 @@
//check for items in disposal - occupied light
if(contents.len > 0)
. += "[base_icon_state]-full"
. += emissive_appearance(icon, "[base_icon_state]-full", src, alpha = src.alpha)
. += "[base_icon_state]-dispover-full"
. += emissive_appearance(icon, "[base_icon_state]-dispover-full", src, alpha = src.alpha)
//charging and ready light
if(pressure_charging)
. += "[base_icon_state]-charge"
. += emissive_appearance(icon, "[base_icon_state]-charge-glow", src, alpha = src.alpha)
. += "[base_icon_state]-dispover-charge"
. += emissive_appearance(icon, "[base_icon_state]-dispover-charge-glow", src, alpha = src.alpha)
else if(full_pressure)
. += "[base_icon_state]-ready"
. += emissive_appearance(icon, "[base_icon_state]-ready-glow", src, alpha = src.alpha)
. += "[base_icon_state]-dispover-ready"
. += emissive_appearance(icon, "[base_icon_state]-dispover-ready-glow", src, alpha = src.alpha)
/obj/machinery/disposal/bin/proc/do_flush()
set waitfor = FALSE
flush()
/obj/machinery/disposal/bin/tagger/Initialize(mapload, obj/structure/disposalconstruct/make_from)
mounted_tagger = new /obj/item/destTagger(null)
return ..()
//timed process
//charge the gas reservoir and perform flush if ready
/obj/machinery/disposal/bin/process(delta_time)
@@ -510,8 +576,5 @@
/obj/mecha/CanEnterDisposals()
return
/obj/machinery/disposal/bin/newHolderDestination(obj/structure/disposalholder/H)
H.destinationTag = 1
/obj/machinery/disposal/deliveryChute/newHolderDestination(obj/structure/disposalholder/H)
H.destinationTag = 1

View File

@@ -108,6 +108,11 @@
if(ismob(AM))
var/mob/M = AM
M.reset_perspective(src) // if a client mob, update eye to follow this holder
if(destinationTag == 0 && other.destinationTag != 0)
destinationTag = other.destinationTag
if(!tomail && other.tomail)
tomail = TRUE
qdel(other)

View File

@@ -311,3 +311,18 @@
/obj/structure/disposalpipe/broken/deconstruct()
qdel(src)
/obj/structure/disposalpipe/rotator
icon_state = "pipe-r1"
initialize_dirs = DISP_DIR_LEFT | DISP_DIR_RIGHT | DISP_DIR_FLIP
flip_type = /obj/structure/disposalpipe/rotator/flip
/// In what direction the atom travels.
var/direction_angle = -90
/obj/structure/disposalpipe/rotator/nextdir(obj/structure/disposalholder/holder)
return turn(holder.dir, direction_angle)
/obj/structure/disposalpipe/rotator/flip
icon_state = "pipe-r2"
flip_type = /obj/structure/disposalpipe/rotator
direction_angle = 90

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 120 KiB

View File

@@ -138,6 +138,7 @@
#include "code\__DEFINES\security.dm"
#include "code\__DEFINES\shuttles.dm"
#include "code\__DEFINES\sight.dm"
#include "code\__DEFINES\sort_types.dm"
#include "code\__DEFINES\sound.dm"
#include "code\__DEFINES\space.dm"
#include "code\__DEFINES\spaceman_dmm.dm"
@@ -2765,6 +2766,7 @@
#include "code\modules\lighting\lighting_source.dm"
#include "code\modules\lighting\lighting_turf.dm"
#include "code\modules\lighting\static_lighting_area.dm"
#include "code\modules\mapping\mail_sort_helpers.dm"
#include "code\modules\mapping\map_template.dm"
#include "code\modules\mapping\mapping_helpers.dm"
#include "code\modules\mapping\minimap.dm"