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
🆑
qol: Surgery trays can now be crafted via the crafting menu (two rods,
one silver), and deconstructed via secondary click with a screwdriver!
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
This commit is contained in:
Shadow-Quill
2023-09-18 21:20:08 +00:00
committed by GitHub
co-authored by Jacquerel
parent e871323794
commit a446ac7166
31 changed files with 125 additions and 93 deletions
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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" = (
@@ -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,
@@ -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" = (
+2 -2
View File
@@ -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,
+3 -3
View File
@@ -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{
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
},
+3 -3
View File
@@ -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" = (
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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{
+2 -2
View File
@@ -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{
+1 -1
View File
@@ -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" = (
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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{
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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{
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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
},
+1 -1
View File
@@ -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{
+1 -1
View File
@@ -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
},
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
@@ -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,
@@ -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
+70 -54
View File
@@ -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 <b>screwed</b> 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
@@ -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}