From a446ac7166298c094dee6f6acd662bb79db4ec86 Mon Sep 17 00:00:00 2001 From: Shadow-Quill <44811257+Shadow-Quill@users.noreply.github.com> Date: Mon, 18 Sep 2023 16:20:08 -0500 Subject: [PATCH] Adds craftable surgery trays. (#78364) ## About The Pull Request Surgery trays can now be crafted in the crafting menu for two rods and one silver, while having a screwdriver. (Same cost as a table.) Out of necessity, the preloaded variants of surgery trays have been re-pathed to a full subtype, though maps have already been updated to use the preloaded variant. The morgue tray and the (new!) advanced trays have been re-pathed to `.../full/morgue` and `.../full/advanced`, respectively Additionally, surgery trays can now be deconstructed by secondary click with a screwdriver. Woo! ## Why It's Good For The Game If you want more surgery trays, build 'em! If you want less surgery trays, unbuild 'em! ## Changelog :cl: qol: Surgery trays can now be crafted via the crafting menu (two rods, one silver), and deconstructed via secondary click with a screwdriver! /:cl: --------- Co-authored-by: Jacquerel --- .../SpaceRuins/dangerous_research.dmm | 2 +- _maps/RandomRuins/SpaceRuins/interdyne.dmm | 2 +- _maps/RandomRuins/SpaceRuins/the_outlet.dmm | 2 +- _maps/map_files/Birdshot/birdshot.dmm | 4 +- .../map_files/Deltastation/DeltaStation2.dmm | 6 +- .../map_files/IceBoxStation/IceBoxStation.dmm | 6 +- _maps/map_files/MetaStation/MetaStation.dmm | 4 +- _maps/map_files/NorthStar/north_star.dmm | 6 +- _maps/map_files/debug/runtimestation.dmm | 2 +- _maps/map_files/generic/CentCom.dmm | 2 +- _maps/map_files/tramstation/tramstation.dmm | 6 +- _maps/shuttles/emergency_birdshot.dmm | 2 +- _maps/shuttles/emergency_donut.dmm | 2 +- _maps/shuttles/emergency_fish.dmm | 2 +- _maps/shuttles/emergency_lance.dmm | 4 +- _maps/shuttles/emergency_mini.dmm | 2 +- _maps/shuttles/emergency_nature.dmm | 2 +- _maps/shuttles/emergency_northstar.dmm | 2 +- _maps/shuttles/emergency_russiafightpit.dmm | 2 +- _maps/shuttles/emergency_shadow.dmm | 2 +- _maps/shuttles/emergency_tram.dmm | 2 +- _maps/shuttles/emergency_tranquility.dmm | 2 +- _maps/shuttles/ruin_cyborg_mothership.dmm | 2 +- _maps/shuttles/whiteship_birdshot.dmm | 2 +- _maps/shuttles/whiteship_box.dmm | 2 +- _maps/shuttles/whiteship_delta.dmm | 2 +- _maps/templates/lazy_templates/ninja_den.dmm | 2 +- _maps/templates/lazy_templates/nukie_base.dmm | 2 +- code/datums/components/crafting/furniture.dm | 11 ++ code/game/objects/items/surgery_tray.dm | 124 ++++++++++-------- .../78364_full_surgery_tray_pathing.txt | 5 + 31 files changed, 125 insertions(+), 93 deletions(-) create mode 100644 tools/UpdatePaths/Scripts/78364_full_surgery_tray_pathing.txt diff --git a/_maps/RandomRuins/SpaceRuins/dangerous_research.dmm b/_maps/RandomRuins/SpaceRuins/dangerous_research.dmm index bae9001b061..a1b7d571679 100644 --- a/_maps/RandomRuins/SpaceRuins/dangerous_research.dmm +++ b/_maps/RandomRuins/SpaceRuins/dangerous_research.dmm @@ -98,7 +98,7 @@ /turf/open/floor/iron/white, /area/ruin/space/has_grav/dangerous_research/medical) "aZ" = ( -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/structure/table, /turf/open/floor/plating/rust, /area/ruin/space/has_grav/dangerous_research/medical) diff --git a/_maps/RandomRuins/SpaceRuins/interdyne.dmm b/_maps/RandomRuins/SpaceRuins/interdyne.dmm index e2a49a71d1a..bd0ba4cc2ff 100644 --- a/_maps/RandomRuins/SpaceRuins/interdyne.dmm +++ b/_maps/RandomRuins/SpaceRuins/interdyne.dmm @@ -1020,7 +1020,7 @@ /turf/open/floor/mineral/plastitanium/red, /area/ruin/space/has_grav/interdyne) "PD" = ( -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/structure/table/reinforced/rglass, /turf/open/floor/mineral/plastitanium, /area/ruin/space/has_grav/interdyne) diff --git a/_maps/RandomRuins/SpaceRuins/the_outlet.dmm b/_maps/RandomRuins/SpaceRuins/the_outlet.dmm index 8f91cc3fee2..6b0f009dcc6 100644 --- a/_maps/RandomRuins/SpaceRuins/the_outlet.dmm +++ b/_maps/RandomRuins/SpaceRuins/the_outlet.dmm @@ -704,7 +704,7 @@ /area/ruin/space/has_grav/the_outlet/employeesection) "rF" = ( /obj/structure/table/reinforced/rglass, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/item/reagent_containers/syringe/lethal/execution, /turf/open/floor/iron/freezer, /area/ruin/space/has_grav/the_outlet/researchrooms) diff --git a/_maps/map_files/Birdshot/birdshot.dmm b/_maps/map_files/Birdshot/birdshot.dmm index ecc6301334a..90ca0b04880 100644 --- a/_maps/map_files/Birdshot/birdshot.dmm +++ b/_maps/map_files/Birdshot/birdshot.dmm @@ -44344,7 +44344,7 @@ /area/station/maintenance/port/lesser) "pTr" = ( /obj/structure/table, -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full{ pixel_y = -5 }, /obj/item/wirecutters{ @@ -70714,7 +70714,7 @@ /obj/effect/turf_decal/siding/white, /obj/machinery/light/small/directional/south, /obj/structure/table/reinforced, -/obj/item/surgery_tray/morgue, +/obj/item/surgery_tray/full/morgue, /turf/open/floor/iron/small, /area/station/medical/morgue) "yaL" = ( diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 7a48d2b1cb7..15c9aae2b71 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -15845,7 +15845,7 @@ /area/station/cargo/lobby) "dRQ" = ( /obj/structure/table/glass, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/structure/window/reinforced/spawner/directional/west, /obj/item/clothing/gloves/latex, /obj/item/clothing/suit/apron/surgical, @@ -52510,7 +52510,7 @@ dir = 4 }, /obj/structure/table/reinforced, -/obj/item/surgery_tray/morgue, +/obj/item/surgery_tray/full/morgue, /obj/effect/turf_decal/tile/dark_blue/half/contrasted{ dir = 4 }, @@ -77243,7 +77243,7 @@ /area/station/engineering/atmos) "tsx" = ( /obj/structure/table/glass, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/item/clothing/gloves/latex, /obj/item/clothing/suit/apron/surgical, /obj/effect/turf_decal/tile/neutral/fourcorners, diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm index 976be0016d3..f3ff89fcc80 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -10864,7 +10864,7 @@ pixel_x = -4; pixel_y = 3 }, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/effect/turf_decal/tile/blue/half/contrasted{ dir = 1 }, @@ -13346,7 +13346,7 @@ network = list("ss13","medbay"); pixel_x = 22 }, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/effect/turf_decal/tile/blue/half/contrasted{ dir = 1 }, @@ -45981,7 +45981,7 @@ "oiv" = ( /obj/effect/turf_decal/tile/neutral/fourcorners, /obj/structure/table/reinforced, -/obj/item/surgery_tray/morgue, +/obj/item/surgery_tray/full/morgue, /turf/open/floor/iron/dark, /area/station/medical/morgue) "oiy" = ( diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 039edcaf5f6..cfa13aef72e 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -12995,7 +12995,7 @@ dir = 8 }, /obj/machinery/light/small/directional/north, -/obj/item/surgery_tray/morgue, +/obj/item/surgery_tray/full/morgue, /turf/open/floor/iron/dark/smooth_edge{ dir = 8 }, @@ -37001,7 +37001,7 @@ /obj/effect/turf_decal/tile/blue/half/contrasted{ dir = 1 }, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/item/clothing/gloves/latex, /obj/item/clothing/suit/apron/surgical, /turf/open/floor/iron/white, diff --git a/_maps/map_files/NorthStar/north_star.dmm b/_maps/map_files/NorthStar/north_star.dmm index fd28020a1c7..d9fff1d8af0 100644 --- a/_maps/map_files/NorthStar/north_star.dmm +++ b/_maps/map_files/NorthStar/north_star.dmm @@ -26323,7 +26323,7 @@ dir = 1 }, /obj/structure/table/reinforced/rglass, -/obj/item/surgery_tray/morgue, +/obj/item/surgery_tray/full/morgue, /obj/machinery/digital_clock/directional/north, /turf/open/floor/iron/dark, /area/station/medical/morgue) @@ -54959,7 +54959,7 @@ /turf/open/floor/iron, /area/station/hallway/secondary/exit) "onz" = ( -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full{ pixel_y = 13 }, /obj/item/reagent_containers/medigel/sterilizine{ @@ -58295,7 +58295,7 @@ /turf/open/floor/plating, /area/station/security/execution/transfer) "pjR" = ( -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full{ pixel_y = 13 }, /obj/item/reagent_containers/medigel/sterilizine{ diff --git a/_maps/map_files/debug/runtimestation.dmm b/_maps/map_files/debug/runtimestation.dmm index 149ec89dad1..a475bd64013 100644 --- a/_maps/map_files/debug/runtimestation.dmm +++ b/_maps/map_files/debug/runtimestation.dmm @@ -677,7 +677,7 @@ /turf/open/floor/iron/white/corner, /area/station/medical/medbay) "cL" = ( -/obj/item/surgery_tray/advanced, +/obj/item/surgery_tray/full/advanced, /obj/structure/table/glass, /obj/effect/turf_decal/tile/blue{ dir = 8 diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index f34c099b9d8..c93798ef02a 100644 --- a/_maps/map_files/generic/CentCom.dmm +++ b/_maps/map_files/generic/CentCom.dmm @@ -9668,7 +9668,7 @@ /area/centcom/central_command_areas/armory) "Vh" = ( /obj/structure/table/reinforced, -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full{ pixel_y = 10; pixel_x = 2 }, diff --git a/_maps/map_files/tramstation/tramstation.dmm b/_maps/map_files/tramstation/tramstation.dmm index f8a008a44a4..4ef52187a09 100644 --- a/_maps/map_files/tramstation/tramstation.dmm +++ b/_maps/map_files/tramstation/tramstation.dmm @@ -13449,7 +13449,7 @@ dir = 1 }, /obj/item/radio/intercom/directional/north, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /turf/open/floor/iron/white, /area/station/medical/surgery/aft) "dCG" = ( @@ -48635,7 +48635,7 @@ pixel_y = 8 }, /obj/structure/window/reinforced/spawner/directional/north, -/obj/item/surgery_tray/morgue, +/obj/item/surgery_tray/full/morgue, /obj/structure/window/reinforced/spawner/directional/west, /turf/open/floor/iron/dark, /area/station/medical/morgue) @@ -61859,7 +61859,7 @@ /obj/structure/table/glass, /obj/effect/turf_decal/trimline/blue/filled/line, /obj/item/radio/intercom/directional/south, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /turf/open/floor/iron/white, /area/station/medical/surgery/fore) "uWn" = ( diff --git a/_maps/shuttles/emergency_birdshot.dmm b/_maps/shuttles/emergency_birdshot.dmm index d861d6af348..20ffeb679d7 100644 --- a/_maps/shuttles/emergency_birdshot.dmm +++ b/_maps/shuttles/emergency_birdshot.dmm @@ -751,7 +751,7 @@ /area/shuttle/escape) "Ko" = ( /obj/structure/table/optable, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/item/clothing/mask/surgical, /obj/effect/mapping_helpers/broken_floor, /turf/open/floor/mineral/titanium/white, diff --git a/_maps/shuttles/emergency_donut.dmm b/_maps/shuttles/emergency_donut.dmm index be456bdb4f4..67dc9f62da7 100644 --- a/_maps/shuttles/emergency_donut.dmm +++ b/_maps/shuttles/emergency_donut.dmm @@ -317,7 +317,7 @@ /turf/open/floor/plating/airless, /area/shuttle/escape) "ed" = ( -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/item/clothing/suit/apron/surgical, /obj/item/clothing/mask/surgical, /obj/structure/table/optable, diff --git a/_maps/shuttles/emergency_fish.dmm b/_maps/shuttles/emergency_fish.dmm index 69bf06c0fa3..99e9848a0b0 100644 --- a/_maps/shuttles/emergency_fish.dmm +++ b/_maps/shuttles/emergency_fish.dmm @@ -849,7 +849,7 @@ /area/shuttle/escape) "VD" = ( /obj/structure/table/glass, -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full{ pixel_y = 6 }, /obj/effect/turf_decal/tile/blue/anticorner/contrasted{ diff --git a/_maps/shuttles/emergency_lance.dmm b/_maps/shuttles/emergency_lance.dmm index 81eaec94c61..c6c0d9d9c18 100644 --- a/_maps/shuttles/emergency_lance.dmm +++ b/_maps/shuttles/emergency_lance.dmm @@ -967,8 +967,8 @@ /obj/item/book/manual/wiki/surgery{ pixel_x = -15 }, -/obj/item/surgery_tray, -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full, +/obj/item/surgery_tray/full{ pixel_x = 5 }, /obj/effect/turf_decal/tile/dark_blue/half/contrasted{ diff --git a/_maps/shuttles/emergency_mini.dmm b/_maps/shuttles/emergency_mini.dmm index 29f973398d3..73c5f42b38f 100644 --- a/_maps/shuttles/emergency_mini.dmm +++ b/_maps/shuttles/emergency_mini.dmm @@ -227,7 +227,7 @@ "W" = ( /obj/structure/table, /obj/item/clothing/suit/apron/surgical, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /turf/open/floor/mineral/titanium/white, /area/shuttle/escape) "X" = ( diff --git a/_maps/shuttles/emergency_nature.dmm b/_maps/shuttles/emergency_nature.dmm index 4570d643bee..95eada06cfb 100644 --- a/_maps/shuttles/emergency_nature.dmm +++ b/_maps/shuttles/emergency_nature.dmm @@ -498,7 +498,7 @@ /area/shuttle/escape) "sF" = ( /obj/effect/turf_decal/trimline/blue/filled/line, -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full{ pixel_y = 5 }, /obj/structure/rack, diff --git a/_maps/shuttles/emergency_northstar.dmm b/_maps/shuttles/emergency_northstar.dmm index d51346fb179..20795c72317 100644 --- a/_maps/shuttles/emergency_northstar.dmm +++ b/_maps/shuttles/emergency_northstar.dmm @@ -127,7 +127,7 @@ "nC" = ( /obj/structure/table/reinforced/rglass, /obj/item/defibrillator/loaded, -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full{ pixel_y = 13 }, /obj/effect/turf_decal/tile/blue/anticorner{ diff --git a/_maps/shuttles/emergency_russiafightpit.dmm b/_maps/shuttles/emergency_russiafightpit.dmm index a62e21c6ddb..6d8a0e5e8fb 100644 --- a/_maps/shuttles/emergency_russiafightpit.dmm +++ b/_maps/shuttles/emergency_russiafightpit.dmm @@ -438,7 +438,7 @@ "iJ" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/table, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/item/clothing/gloves/fingerless, /turf/open/floor/iron, /area/shuttle/escape) diff --git a/_maps/shuttles/emergency_shadow.dmm b/_maps/shuttles/emergency_shadow.dmm index a1c4cd7acc7..15593e7e956 100644 --- a/_maps/shuttles/emergency_shadow.dmm +++ b/_maps/shuttles/emergency_shadow.dmm @@ -1000,7 +1000,7 @@ "Sb" = ( /obj/structure/table, /obj/structure/window/reinforced/spawner/directional/west, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/item/clothing/suit/apron/surgical, /obj/item/clothing/mask/surgical, /obj/item/clothing/gloves/latex/nitrile{ diff --git a/_maps/shuttles/emergency_tram.dmm b/_maps/shuttles/emergency_tram.dmm index f76c9aa787e..5ec40d242d6 100644 --- a/_maps/shuttles/emergency_tram.dmm +++ b/_maps/shuttles/emergency_tram.dmm @@ -203,7 +203,7 @@ /area/shuttle/escape) "aX" = ( /obj/structure/table/optable, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/item/clothing/mask/surgical, /turf/open/floor/mineral/titanium/blue, /area/shuttle/escape) diff --git a/_maps/shuttles/emergency_tranquility.dmm b/_maps/shuttles/emergency_tranquility.dmm index 5b66424a623..a8a933b5b70 100644 --- a/_maps/shuttles/emergency_tranquility.dmm +++ b/_maps/shuttles/emergency_tranquility.dmm @@ -2562,7 +2562,7 @@ /obj/effect/turf_decal/tile/blue/opposingcorners, /obj/structure/table, /obj/item/lazarus_injector, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/item/clothing/gloves/latex/nitrile{ pixel_y = 4 }, diff --git a/_maps/shuttles/ruin_cyborg_mothership.dmm b/_maps/shuttles/ruin_cyborg_mothership.dmm index b433eedf008..e7808943d3d 100644 --- a/_maps/shuttles/ruin_cyborg_mothership.dmm +++ b/_maps/shuttles/ruin_cyborg_mothership.dmm @@ -713,7 +713,7 @@ /area/shuttle/ruin/cyborg_mothership) "Oq" = ( /obj/structure/table, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/effect/turf_decal/bot, /obj/structure/sink/directional/east, /obj/item/toy/figure/borg{ diff --git a/_maps/shuttles/whiteship_birdshot.dmm b/_maps/shuttles/whiteship_birdshot.dmm index 51db46c9b8c..25dc64ed0fc 100644 --- a/_maps/shuttles/whiteship_birdshot.dmm +++ b/_maps/shuttles/whiteship_birdshot.dmm @@ -149,7 +149,7 @@ pixel_y = 3 }, /obj/item/reagent_containers/blood, -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full{ pixel_x = 2; pixel_y = 9 }, diff --git a/_maps/shuttles/whiteship_box.dmm b/_maps/shuttles/whiteship_box.dmm index 72c843587f7..48d47820df2 100644 --- a/_maps/shuttles/whiteship_box.dmm +++ b/_maps/shuttles/whiteship_box.dmm @@ -104,7 +104,7 @@ }, /obj/machinery/airalarm/directional/north, /obj/effect/mapping_helpers/airalarm/all_access, -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full{ pixel_y = 4 }, /obj/item/clothing/suit/apron/surgical, diff --git a/_maps/shuttles/whiteship_delta.dmm b/_maps/shuttles/whiteship_delta.dmm index 36df707a668..2ee3a6e691e 100644 --- a/_maps/shuttles/whiteship_delta.dmm +++ b/_maps/shuttles/whiteship_delta.dmm @@ -1623,7 +1623,7 @@ /area/shuttle/abandoned/medbay) "dO" = ( /obj/structure/table, -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full{ pixel_y = 4 }, /obj/effect/decal/cleanable/dirt, diff --git a/_maps/templates/lazy_templates/ninja_den.dmm b/_maps/templates/lazy_templates/ninja_den.dmm index 988f98885e0..eb0785ade46 100644 --- a/_maps/templates/lazy_templates/ninja_den.dmm +++ b/_maps/templates/lazy_templates/ninja_den.dmm @@ -1650,7 +1650,7 @@ /area/centcom/central_command_areas/holding) "Mz" = ( /obj/structure/closet, -/obj/item/surgery_tray, +/obj/item/surgery_tray/full, /obj/machinery/iv_drip, /obj/item/emergency_bed, /obj/item/storage/medkit/regular, diff --git a/_maps/templates/lazy_templates/nukie_base.dmm b/_maps/templates/lazy_templates/nukie_base.dmm index 6a1115b432b..68913efe70d 100644 --- a/_maps/templates/lazy_templates/nukie_base.dmm +++ b/_maps/templates/lazy_templates/nukie_base.dmm @@ -111,7 +111,7 @@ dir = 5 }, /obj/structure/table/reinforced/plasmarglass, -/obj/item/surgery_tray{ +/obj/item/surgery_tray/full{ pixel_y = -11 }, /obj/item/storage/belt/medical, diff --git a/code/datums/components/crafting/furniture.dm b/code/datums/components/crafting/furniture.dm index bdd7372f170..6cfe215a4b7 100644 --- a/code/datums/components/crafting/furniture.dm +++ b/code/datums/components/crafting/furniture.dm @@ -36,3 +36,14 @@ /obj/item/stack/sheet/mineral/silver = 2, ) category = CAT_FURNITURE + +/datum/crafting_recipe/surgery_tray + name = "Surgery Tray" + reqs = list( + /obj/item/stack/sheet/mineral/silver = 1, + /obj/item/stack/rods = 2 + ) + result = /obj/item/surgery_tray + tool_behaviors = list(TOOL_SCREWDRIVER) + category = CAT_FURNITURE + time = 5 SECONDS diff --git a/code/game/objects/items/surgery_tray.dm b/code/game/objects/items/surgery_tray.dm index 1d05bc5ca2f..df597abee25 100644 --- a/code/game/objects/items/surgery_tray.dm +++ b/code/game/objects/items/surgery_tray.dm @@ -38,25 +38,10 @@ /// If true we're currently portable var/is_portable = TRUE - /// List of things that we spawn containing - var/list/initial_contents = list( - /obj/item/blood_filter, - /obj/item/bonesetter, - /obj/item/cautery, - /obj/item/circular_saw, - /obj/item/clothing/mask/surgical, - /obj/item/hemostat, - /obj/item/razor/surgery, - /obj/item/retractor, - /obj/item/scalpel, - /obj/item/stack/medical/bone_gel, - /obj/item/stack/sticky_tape/surgical, - /obj/item/surgical_drapes, - /obj/item/surgicaldrill, - ) -/obj/item/surgery_tray/deployed - is_portable = FALSE +/// Fills the tray with items it should contain on creation +/obj/item/surgery_tray/proc/populate_contents() + return /obj/item/surgery_tray/Initialize(mapload) . = ..() @@ -89,6 +74,7 @@ . += is_portable \ ? span_notice("You can click and drag it to yourself to pick it up, then use it in your hand to make it a cart!") \ : span_notice("You can click and drag it to yourself to turn it into a tray!") + . += span_notice("The top is screwed on.") /obj/item/surgery_tray/update_overlays() . = ..() @@ -125,12 +111,6 @@ for(var/surgery_tool in surgery_overlays) . |= surgery_overlays[surgery_tool] -///Spawn the things we contain on initialisation -/obj/item/surgery_tray/proc/populate_contents() - for (var/thing_path in initial_contents) - new thing_path(src) - update_appearance(UPDATE_OVERLAYS) - ///Sets the surgery tray's deployment state. Silent if user is null. /obj/item/surgery_tray/proc/set_tray_mode(new_mode, mob/user) is_portable = new_mode @@ -177,46 +157,82 @@ user.put_in_hands(grabbies) return TRUE +/obj/item/surgery_tray/screwdriver_act_secondary(mob/living/user, obj/item/tool) + . = ..() + tool.play_tool_sound(src) + to_chat(user, span_notice("You begin taking apart [src].")) + if(!tool.use_tool(src, user, 1 SECONDS)) + return + deconstruct(TRUE) + to_chat(user, span_notice("[src] has been taken apart.")) + /obj/item/surgery_tray/dump_contents() var/atom/drop_point = drop_location() for(var/atom/movable/tool as anything in contents) tool.forceMove(drop_point) /obj/item/surgery_tray/deconstruct(disassembled = TRUE) - dump_contents() + if(!(flags_1 & NODECONSTRUCT_1)) + dump_contents() + new /obj/item/stack/rods(drop_location(), 2) + new /obj/item/stack/sheet/mineral/silver(drop_location()) return ..() -/obj/item/surgery_tray/morgue +/obj/item/surgery_tray/deployed + is_portable = FALSE + +/obj/item/surgery_tray/full + +/obj/item/surgery_tray/full/deployed + is_portable = FALSE + +/obj/item/surgery_tray/full/populate_contents() + new /obj/item/blood_filter(src) + new /obj/item/bonesetter(src) + new /obj/item/cautery(src) + new /obj/item/circular_saw(src) + new /obj/item/clothing/mask/surgical(src) + new /obj/item/hemostat(src) + new /obj/item/razor/surgery(src) + new /obj/item/retractor(src) + new /obj/item/scalpel(src) + new /obj/item/stack/medical/bone_gel(src) + new /obj/item/stack/sticky_tape/surgical(src) + new /obj/item/surgical_drapes(src) + new /obj/item/surgicaldrill(src) + update_appearance(UPDATE_OVERLAYS) + +/obj/item/surgery_tray/full/morgue name = "autopsy tray" desc = "A Deforest brand surgery tray, made for use in morgues. It is a folding model, \ meaning the wheels on the bottom can be extended outwards, making it a cart." - initial_contents = list( - /obj/item/blood_filter, - /obj/item/bonesetter, - /obj/item/cautery/cruel, - /obj/item/circular_saw, - /obj/item/clothing/mask/surgical, - /obj/item/hemostat/cruel, - /obj/item/razor/surgery, - /obj/item/retractor/cruel, - /obj/item/scalpel/cruel, - /obj/item/stack/medical/bone_gel, - /obj/item/stack/sticky_tape/surgical, - /obj/item/surgical_drapes, - /obj/item/surgicaldrill, - ) + +/obj/item/surgery_tray/full/morgue/populate_contents() + new /obj/item/blood_filter(src) + new /obj/item/bonesetter(src) + new /obj/item/cautery/cruel(src) + new /obj/item/circular_saw(src) + new /obj/item/clothing/mask/surgical(src) + new /obj/item/hemostat/cruel(src) + new /obj/item/razor/surgery(src) + new /obj/item/retractor/cruel(src) + new /obj/item/scalpel/cruel(src) + new /obj/item/stack/medical/bone_gel(src) + new /obj/item/stack/sticky_tape/surgical(src) + new /obj/item/surgical_drapes(src) + new /obj/item/surgicaldrill(src) /// Surgery tray with advanced tools for debug -/obj/item/surgery_tray/advanced - initial_contents = list( - /obj/item/scalpel/advanced, - /obj/item/retractor/advanced, - /obj/item/cautery/advanced, - /obj/item/surgical_drapes, - /obj/item/reagent_containers/medigel/sterilizine, - /obj/item/bonesetter, - /obj/item/blood_filter, - /obj/item/stack/medical/bone_gel, - /obj/item/stack/sticky_tape/surgical, - /obj/item/clothing/mask/surgical, - ) +/obj/item/surgery_tray/full/advanced + +/obj/item/surgery_tray/full/advanced/populate_contents() + new /obj/item/scalpel/advanced + new /obj/item/retractor/advanced + new /obj/item/cautery/advanced + new /obj/item/surgical_drapes + new /obj/item/reagent_containers/medigel/sterilizine + new /obj/item/bonesetter + new /obj/item/blood_filter + new /obj/item/stack/medical/bone_gel + new /obj/item/stack/sticky_tape/surgical + new /obj/item/clothing/mask/surgical diff --git a/tools/UpdatePaths/Scripts/78364_full_surgery_tray_pathing.txt b/tools/UpdatePaths/Scripts/78364_full_surgery_tray_pathing.txt new file mode 100644 index 00000000000..bc8eadd4991 --- /dev/null +++ b/tools/UpdatePaths/Scripts/78364_full_surgery_tray_pathing.txt @@ -0,0 +1,5 @@ +#updates mapped-in surgery trays to the full subtype, so empty trays can be crafted +/obj/item/surgery_tray : /obj/item/surgery_tray/full{@OLD} +/obj/item/surgery_tray/deployed : /obj/item/surgery_tray/full/deployed{@OLD} +/obj/item/surgery_tray/morgue : /obj/item/surgery_tray/full/morgue{@OLD} +/obj/item/surgery_tray/advanced : /obj/item/surgery_tray/full/advanced{@OLD}