diff --git a/_maps/RandomRuins/SpaceRuins/dangerous_research.dmm b/_maps/RandomRuins/SpaceRuins/dangerous_research.dmm index 2263b07e6f5..d2bbe9c5188 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 3ae6031bd71..e2a49a71d1a 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 1ed37f9df00..8f91cc3fee2 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 0062078f5dc..6603903e2da 100644 --- a/_maps/map_files/Birdshot/birdshot.dmm +++ b/_maps/map_files/Birdshot/birdshot.dmm @@ -44328,7 +44328,7 @@ /area/station/maintenance/port/lesser) "pTr" = ( /obj/structure/table, -/obj/item/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray{ pixel_y = -5 }, /obj/item/wirecutters{ @@ -70729,7 +70729,7 @@ /obj/effect/turf_decal/siding/white, /obj/machinery/light/small/directional/south, /obj/structure/table/reinforced, -/obj/item/storage/backpack/duffelbag/coroner/surgery, +/obj/item/surgery_tray/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 ed9a48147a1..3fcdcbae1e7 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -15844,7 +15844,7 @@ /area/station/cargo/lobby) "dRQ" = ( /obj/structure/table/glass, -/obj/item/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /obj/structure/window/reinforced/spawner/directional/west, /obj/item/clothing/gloves/latex, /obj/item/clothing/suit/apron/surgical, @@ -52504,7 +52504,7 @@ dir = 4 }, /obj/structure/table/reinforced, -/obj/item/storage/backpack/duffelbag/coroner/surgery, +/obj/item/surgery_tray/morgue, /obj/effect/turf_decal/tile/dark_blue/half/contrasted{ dir = 4 }, @@ -77237,7 +77237,7 @@ /area/station/engineering/atmos) "tsx" = ( /obj/structure/table/glass, -/obj/item/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 eb5e9efbe47..2380e6cba6f 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -10641,7 +10641,7 @@ pixel_x = -4; pixel_y = 3 }, -/obj/item/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /obj/effect/turf_decal/tile/blue/half/contrasted{ dir = 1 }, @@ -13063,7 +13063,7 @@ network = list("ss13","medbay"); pixel_x = 22 }, -/obj/item/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /obj/effect/turf_decal/tile/blue/half/contrasted{ dir = 1 }, @@ -44623,7 +44623,7 @@ "oiv" = ( /obj/effect/turf_decal/tile/neutral/fourcorners, /obj/structure/table/reinforced, -/obj/item/storage/backpack/duffelbag/coroner/surgery, +/obj/item/surgery_tray/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 575fab9570d..3d63616a009 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -12997,7 +12997,7 @@ dir = 8 }, /obj/machinery/light/small/directional/north, -/obj/item/storage/backpack/duffelbag/coroner/surgery, +/obj/item/surgery_tray/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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 e8c118b8b38..1911289c036 100644 --- a/_maps/map_files/NorthStar/north_star.dmm +++ b/_maps/map_files/NorthStar/north_star.dmm @@ -26313,7 +26313,7 @@ dir = 1 }, /obj/structure/table/reinforced/rglass, -/obj/item/storage/backpack/duffelbag/coroner/surgery, +/obj/item/surgery_tray/morgue, /obj/machinery/digital_clock/directional/north, /turf/open/floor/iron/dark, /area/station/medical/morgue) @@ -54921,7 +54921,7 @@ /turf/open/floor/iron, /area/station/hallway/secondary/exit) "onz" = ( -/obj/item/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray{ pixel_y = 13 }, /obj/item/reagent_containers/medigel/sterilizine{ @@ -58259,7 +58259,7 @@ /turf/open/floor/plating, /area/station/security/execution/transfer) "pjR" = ( -/obj/item/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray{ pixel_y = 13 }, /obj/item/reagent_containers/medigel/sterilizine{ diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index 29a664faf0e..70a8dec0cdf 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/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray{ pixel_y = 10; pixel_x = 2 }, diff --git a/_maps/map_files/tramstation/tramstation.dmm b/_maps/map_files/tramstation/tramstation.dmm index d14c9ba6604..fb7a1392362 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /turf/open/floor/iron/white, /area/station/medical/surgery/aft) "dCG" = ( @@ -48618,7 +48618,7 @@ pixel_y = 8 }, /obj/structure/window/reinforced/spawner/directional/north, -/obj/item/storage/backpack/duffelbag/coroner/surgery, +/obj/item/surgery_tray/morgue, /obj/structure/window/reinforced/spawner/directional/west, /turf/open/floor/iron/dark, /area/station/medical/morgue) @@ -61822,7 +61822,7 @@ /obj/structure/table/glass, /obj/effect/turf_decal/trimline/blue/filled/line, /obj/item/radio/intercom/directional/south, -/obj/item/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 ca46d531d81..608832bf5b3 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 664a70f1e1c..be456bdb4f4 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 9d337de48c6..69bf06c0fa3 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/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray{ 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 ff0dc795797..ee24973d323 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/storage/backpack/duffelbag/med/surgery, -/obj/item/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray, +/obj/item/surgery_tray{ 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 5bad5050e77..29f973398d3 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 c5256bdf6bf..4570d643bee 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/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray{ pixel_y = 5 }, /obj/structure/rack, diff --git a/_maps/shuttles/emergency_northstar.dmm b/_maps/shuttles/emergency_northstar.dmm index 25616f70dde..d51346fb179 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/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray{ 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 020b44e6e14..a62e21c6ddb 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 704ec17a369..a1c4cd7acc7 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 e827adeb3b9..f76c9aa787e 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 ce1262d35c6..5b66424a623 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 34484dc8874..7918c2dd990 100644 --- a/_maps/shuttles/ruin_cyborg_mothership.dmm +++ b/_maps/shuttles/ruin_cyborg_mothership.dmm @@ -714,7 +714,7 @@ /area/shuttle/ruin/cyborg_mothership) "Oq" = ( /obj/structure/table, -/obj/item/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /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 65c3fbc5502..51db46c9b8c 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/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray{ pixel_x = 2; pixel_y = 9 }, diff --git a/_maps/shuttles/whiteship_box.dmm b/_maps/shuttles/whiteship_box.dmm index 1fcda0639e1..e4caf73a4ee 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/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray{ pixel_y = 4 }, /obj/item/clothing/suit/apron/surgical, diff --git a/_maps/shuttles/whiteship_delta.dmm b/_maps/shuttles/whiteship_delta.dmm index c64f0236fa9..74b643e2ebc 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/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray{ 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 32329e596e5..7bcec67c1ae 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/storage/backpack/duffelbag/med/surgery, +/obj/item/surgery_tray, /obj/machinery/iv_drip, /obj/item/roller, /obj/item/storage/medkit/regular, diff --git a/_maps/templates/lazy_templates/nukie_base.dmm b/_maps/templates/lazy_templates/nukie_base.dmm index 9815d45806b..6a1115b432b 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/storage/backpack/duffelbag/med/surgery{ +/obj/item/surgery_tray{ pixel_y = -11 }, /obj/item/storage/belt/medical, diff --git a/code/__DEFINES/dcs/signals/signals_object.dm b/code/__DEFINES/dcs/signals/signals_object.dm index cc17e337791..fee0ca52781 100644 --- a/code/__DEFINES/dcs/signals/signals_object.dm +++ b/code/__DEFINES/dcs/signals/signals_object.dm @@ -473,4 +473,3 @@ /// from /obj/structure/cursed_slot_machine/determine_victor() when someone finally wins. #define COMSIG_GLOB_CURSED_SLOT_MACHINE_WON "cursed_slot_machine_won" - diff --git a/code/datums/storage/subtypes/surgery_tray.dm b/code/datums/storage/subtypes/surgery_tray.dm new file mode 100644 index 00000000000..35886581318 --- /dev/null +++ b/code/datums/storage/subtypes/surgery_tray.dm @@ -0,0 +1,22 @@ +/datum/storage/surgery_tray + max_total_storage = 30 + max_specific_storage = WEIGHT_CLASS_NORMAL + max_slots = 14 + +/datum/storage/surgery_tray/New() + . = ..() + set_holdable(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, + /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, + )) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 693a3ce07a2..688e845165d 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -171,7 +171,8 @@ var/sharpness = NONE ///How a tool acts when you use it on something, such as wirecutters cutting wires while multitools measure power - var/tool_behaviour = NONE + var/tool_behaviour = null + ///How fast does the tool work var/toolspeed = 1 @@ -241,7 +242,6 @@ // Handle adding item associated actions for(var/path in actions_types) add_item_action(path) - actions_types = null if(force_string) @@ -845,6 +845,13 @@ return mutable_appearance(SSgreyscale.GetColoredIconByType(greyscale_config_belt, greyscale_colors), icon_state_to_use) return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state_to_use) +/** + * Extend this to give the item an appearance when placed in a surgical tray. Uses an icon state in `medicart.dmi`. + * * tray_extended - If true, the surgical tray the item is placed on is in "table mode" + */ +/obj/item/proc/get_surgery_tool_overlay(tray_extended) + return null + /obj/item/proc/update_slot_icon() if(!ismob(loc)) return @@ -1630,3 +1637,9 @@ bare_wound_bonus = reset_fantasy_variable("bare_wound_bonus", bare_wound_bonus) toolspeed = reset_fantasy_variable("toolspeed", toolspeed) SEND_SIGNAL(src, COMSIG_ITEM_REMOVE_FANTASY_BONUSES, bonus) + +//automatically finds tool behavior if there is only one. requires an extension of the proc if a tool has multiple behaviors +/obj/item/proc/get_all_tool_behaviours() + if (!isnull(tool_behaviour)) + return list(tool_behaviour) + return null diff --git a/code/game/objects/items/boxcutter.dm b/code/game/objects/items/boxcutter.dm index 4213cfec1b3..62273c1080f 100644 --- a/code/game/objects/items/boxcutter.dm +++ b/code/game/objects/items/boxcutter.dm @@ -18,6 +18,9 @@ /// Used on Initialize, how much time to cut real handcuffs. Null means it can't. var/snap_time_strong_handcuffs = null +/obj/item/boxcutter/get_all_tool_behaviours() + return list(TOOL_KNIFE) + /obj/item/boxcutter/Initialize(mapload) . = ..() AddElement(/datum/element/update_icon_updates_onmob) diff --git a/code/game/objects/items/cosmetics.dm b/code/game/objects/items/cosmetics.dm index 56cb24bf909..662585dd273 100644 --- a/code/game/objects/items/cosmetics.dm +++ b/code/game/objects/items/cosmetics.dm @@ -274,3 +274,12 @@ shave(human_target, location) return return ..() + +/obj/item/razor/surgery + name = "surgical razor" + desc = "A medical grade razor. Its precision blades provide a clean shave for surgical preparation." + icon = 'icons/obj/cosmetic.dmi' + icon_state = "medrazor" + +/obj/item/razor/surgery/get_surgery_tool_overlay(tray_extended) + return "razor" diff --git a/code/game/objects/items/debug_items.dm b/code/game/objects/items/debug_items.dm index 04e8729bee5..68ae291e736 100644 --- a/code/game/objects/items/debug_items.dm +++ b/code/game/objects/items/debug_items.dm @@ -46,6 +46,28 @@ return FALSE return TRUE +/obj/item/debug/omnitool/get_all_tool_behaviours() + return list(TOOL_ANALYZER, + TOOL_BLOODFILTER, + TOOL_BONESET, + TOOL_CAUTERY, + TOOL_CROWBAR, + TOOL_DRILL, + TOOL_HEMOSTAT, + TOOL_KNIFE, + TOOL_MINING, + TOOL_MULTITOOL, + TOOL_RETRACTOR, + TOOL_ROLLINGPIN, + TOOL_RUSTSCRAPER, + TOOL_SAW, + TOOL_SCALPEL, + TOOL_SCREWDRIVER, + TOOL_SHOVEL, + TOOL_WELDER, + TOOL_WIRECUTTER, + TOOL_WRENCH, + ) /obj/item/debug/omnitool/attack_self(mob/user) if(!user) diff --git a/code/game/objects/items/kitchen.dm b/code/game/objects/items/kitchen.dm index 598de287ea2..1c88658dbd5 100644 --- a/code/game/objects/items/kitchen.dm +++ b/code/game/objects/items/kitchen.dm @@ -115,6 +115,9 @@ attack_verb_simple = list("prod", "whiff", "scratch", "poke") tool_behaviour = TOOL_KNIFE +/obj/item/knife/kitchen/silicon/get_all_tool_behaviours() + return list(TOOL_ROLLINGPIN, TOOL_KNIFE) + /obj/item/knife/kitchen/silicon/examine() . = ..() . += " It's fitted with a [tool_behaviour] head." diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index adb57d26ef5..8af7a0b4fb8 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -34,6 +34,9 @@ fire = 100 acid = 30 +/obj/item/melee/energy/get_all_tool_behaviours() + return list(TOOL_SAW) + /obj/item/melee/energy/Initialize(mapload) . = ..() make_transformable() diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 691c3b82986..d071e3465af 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -415,6 +415,9 @@ novariants = TRUE merge_type = /obj/item/stack/medical/bone_gel +/obj/item/stack/medical/bone_gel/get_surgery_tool_overlay(tray_extended) + return "gel" + (tray_extended ? "" : "_out") + /obj/item/stack/medical/bone_gel/attack(mob/living/patient, mob/user) patient.balloon_alert(user, "no fractures!") return diff --git a/code/game/objects/items/stacks/tape.dm b/code/game/objects/items/stacks/tape.dm index 08dbc768070..c8b46e2d281 100644 --- a/code/game/objects/items/stacks/tape.dm +++ b/code/game/objects/items/stacks/tape.dm @@ -124,3 +124,6 @@ merge_type = /obj/item/stack/sticky_tape/surgical greyscale_colors = "#70BAE7#BD6A62" tape_gag = /obj/item/clothing/mask/muzzle/tape/surgical + +/obj/item/stack/sticky_tape/surgical/get_surgery_tool_overlay(tray_extended) + return "tape" + (tray_extended ? "" : "_out") diff --git a/code/game/objects/items/surgery_tray.dm b/code/game/objects/items/surgery_tray.dm new file mode 100644 index 00000000000..5ef5bfdae7a --- /dev/null +++ b/code/game/objects/items/surgery_tray.dm @@ -0,0 +1,207 @@ +/** + * Surgery Trays + * A storage object that displays tools in its contents based on tier, better tools are more visible. + * Can be folded up and carried. Click it to draw a random tool. + * + */ +/obj/item/surgery_tray + name = "surgery tray" + desc = "A Deforest brand medical cart. It is a folding model, meaning the wheels on the bottom can be retracted and the body used as a tray." + icon = 'icons/obj/medicart.dmi' + icon_state = "tray" + w_class = WEIGHT_CLASS_BULKY + slowdown = 1 + item_flags = SLOWS_WHILE_IN_HAND + + /// 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 + +/obj/item/surgery_tray/Initialize(mapload) + . = ..() + AddElement(/datum/element/drag_pickup) + create_storage(storage_type = /datum/storage/surgery_tray) + populate_contents() + register_context() + set_tray_mode(is_portable) + +/obj/item/surgery_tray/add_context(atom/source, list/context, obj/item/held_item, mob/user) + . = ..() + context[SCREENTIP_CONTEXT_LMB] = "Take a random tool" + context[SCREENTIP_CONTEXT_RMB] = "Take a specific tool" + return CONTEXTUAL_SCREENTIP_SET + +/obj/item/surgery_tray/update_icon_state() + . = ..() + icon_state = is_portable ? "tray" : "medicart" + +/obj/item/surgery_tray/update_desc() + . = ..() + if(is_portable) + desc = "The wheels and bottom storage of this medical cart have been stowed away, \ + leaving a cumbersome tray in it's place." + else + desc = initial(desc) + +/obj/item/surgery_tray/examine(mob/living/carbon/human/user) + . = ..() + . += 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!") + +/obj/item/surgery_tray/update_overlays() + . = ..() + // assoc list of all overlays, key = the item generating the overlay, value = the overlay string + var/list/surgery_overlays = list() + // assoc list of tool behaviors to fastest toolspeed of that type we already have + // easy way for us to check if there are any lower quality tools within + var/list/recorded_tool_speeds = list() + // handle drapes separately so they're always on the bottom + if (locate(/obj/item/surgical_drapes) in contents) + . += "drapes" + // compile all the overlays from items inside us + for(var/obj/item/surgery_tool in src) + // the overlay we will use if we want to display this one + var/actual_overlay = surgery_tool.get_surgery_tool_overlay(tray_extended = !is_portable) + if (isnull(actual_overlay)) + continue // nothing to see here + + // if we don't have tool behaviour then just record the overlay + if(!length(surgery_tool.get_all_tool_behaviours())) + surgery_overlays[surgery_tool] = actual_overlay + continue + + // if we have at least one tool behaviour, check if we already recorded a faster one + for (var/surgery_tool_type in surgery_tool.get_all_tool_behaviours()) + var/highest_speed = LAZYACCESS(recorded_tool_speeds, surgery_tool_type) || INFINITY // bigger number = slower + if(surgery_tool.toolspeed > highest_speed) + continue + // the existing tool was worse than us, ditch it + surgery_overlays -= surgery_tool_type + LAZYSET(recorded_tool_speeds, surgery_tool_type, surgery_tool.toolspeed) + surgery_overlays[surgery_tool_type] = actual_overlay + + 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 + density = !is_portable + if(user) + user.visible_message(span_notice("[user] [is_portable ? "retracts" : "extends"] [src]'s wheels."), span_notice("You [is_portable ? "retract" : "extend"] [src]'s wheels.")) + + if(is_portable) + interaction_flags_item |= INTERACT_ITEM_ATTACK_HAND_PICKUP + pass_flags |= PASSTABLE + RemoveElement(/datum/element/noisy_movement) + else + interaction_flags_item &= ~INTERACT_ITEM_ATTACK_HAND_PICKUP + pass_flags &= ~PASSTABLE + AddElement(/datum/element/noisy_movement) + + update_appearance() + +/obj/item/surgery_tray/equipped(mob/user, slot, initial) + . = ..() + if(!is_portable) + set_tray_mode(TRUE, user) + +/obj/item/surgery_tray/attack_self(mob/user, modifiers) + . = ..() + if(.) + return + var/turf/open/placement_turf = get_turf(user) + if(isgroundlessturf(placement_turf) || isclosedturf(placement_turf)) + balloon_alert(user, "can't deploy!") + return TRUE + if(!user.transferItemToLoc(src, placement_turf)) + balloon_alert(user, "tray stuck!") + return TRUE + set_tray_mode(FALSE, user) + return + +/obj/item/surgery_tray/attack_hand(mob/living/user) + if(!user.can_perform_action(src, NEED_HANDS)) + return ..() + var/obj/item/grabbies = pick(contents) + if(grabbies) + atom_storage.remove_single(user, grabbies, drop_location()) + user.put_in_hands(grabbies) + return TRUE + +/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() + return ..() + +/obj/item/surgery_tray/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, + ) + +/datum/storage/surgery_tray + max_total_storage = 30 + max_specific_storage = WEIGHT_CLASS_NORMAL + max_slots = 14 + +/datum/storage/surgery_tray/New() + . = ..() + set_holdable(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, + /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, + )) diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index e5ab806b570..11470620c49 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -107,6 +107,9 @@ /// Used on Initialize, how much time to cut real handcuffs. Null means it can't. var/snap_time_strong_handcuffs = 0 SECONDS +/obj/item/crowbar/power/get_all_tool_behaviours() + return list(TOOL_CROWBAR, TOOL_WIRECUTTER) + /obj/item/crowbar/power/Initialize(mapload) . = ..() AddComponent( \ diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index dc836e1a6c2..2c95d657181 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -101,6 +101,9 @@ greyscale_config_inhand_left = null greyscale_config_inhand_right = null +/obj/item/screwdriver/power/get_all_tool_behaviours() + return list(TOOL_SCREWDRIVER, TOOL_WRENCH) + /obj/item/screwdriver/power/Initialize(mapload) . = ..() AddComponent( \ diff --git a/code/game/objects/items/tools/spess_knife.dm b/code/game/objects/items/tools/spess_knife.dm index da567e9ad77..59195410000 100644 --- a/code/game/objects/items/tools/spess_knife.dm +++ b/code/game/objects/items/tools/spess_knife.dm @@ -23,6 +23,9 @@ ///Chance to select wrong tool var/wrong_tool_prob = 10 +/obj/item/spess_knife/get_all_tool_behaviours() + return list(TOOL_KNIFE, TOOL_SCREWDRIVER, TOOL_WIRECUTTER) + /obj/item/spess_knife/Initialize(mapload) . = ..() AddComponent(/datum/component/butchering, \ diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index c22b7170b03..5b05cddb806 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -420,6 +420,9 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /// Whether the switchblade starts extended or not. var/start_extended = FALSE +/obj/item/switchblade/get_all_tool_behaviours() + return list(TOOL_KNIFE) + /obj/item/switchblade/Initialize(mapload) . = ..() AddElement(/datum/element/update_icon_updates_onmob) diff --git a/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm b/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm index 0c02105f9ed..f1213b47c43 100644 --- a/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm +++ b/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm @@ -556,30 +556,35 @@ Congratulations! You are now trained for invasive xenobiology research!"} name = "alien scalpel" desc = "It's a gleaming sharp knife made out of silvery-green metal." icon = 'icons/obj/antags/abductor.dmi' + surgical_tray_overlay = "scalpel_alien" toolspeed = 0.25 /obj/item/hemostat/alien name = "alien hemostat" desc = "You've never seen this before." icon = 'icons/obj/antags/abductor.dmi' + surgical_tray_overlay = "hemostat_alien" toolspeed = 0.25 /obj/item/retractor/alien name = "alien retractor" desc = "You're not sure if you want the veil pulled back." icon = 'icons/obj/antags/abductor.dmi' + surgical_tray_overlay = "retractor_alien" toolspeed = 0.25 /obj/item/circular_saw/alien name = "alien saw" desc = "Do the aliens also lose this, and need to find an alien hatchet?" icon = 'icons/obj/antags/abductor.dmi' + surgical_tray_overlay = "saw_alien" toolspeed = 0.25 /obj/item/surgicaldrill/alien name = "alien drill" desc = "Maybe alien surgeons have finally found a use for the drill." icon = 'icons/obj/antags/abductor.dmi' + surgical_tray_overlay = "drill_alien" toolspeed = 0.25 /obj/item/cautery/alien @@ -587,6 +592,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} desc = "Why would bloodless aliens have a tool to stop bleeding? \ Unless..." icon = 'icons/obj/antags/abductor.dmi' + surgical_tray_overlay = "cautery_alien" toolspeed = 0.25 /obj/item/clothing/head/helmet/abductor @@ -625,6 +631,24 @@ Congratulations! You are now trained for invasive xenobiology research!"} ///Which toolset do we have active currently? var/active_toolset = TOOLSET_MEDICAL +/obj/item/abductor/alien_omnitool/get_all_tool_behaviours() + return list( + TOOL_BLOODFILTER, + TOOL_BONESET, + TOOL_CAUTERY, + TOOL_CROWBAR, + TOOL_DRILL, + TOOL_HEMOSTAT, + TOOL_MULTITOOL, + TOOL_RETRACTOR, + TOOL_SAW, + TOOL_SCALPEL, + TOOL_SCREWDRIVER, + TOOL_WELDER, + TOOL_WIRECUTTER, + TOOL_WRENCH, + ) + /obj/item/abductor/alien_omnitool/Initialize(mapload) . = ..() set_toolset() //This populates the tool list, and sets it to the hacking configuration. diff --git a/code/modules/mining/equipment/mining_tools.dm b/code/modules/mining/equipment/mining_tools.dm index 3b1d5233dbf..69903d77591 100644 --- a/code/modules/mining/equipment/mining_tools.dm +++ b/code/modules/mining/equipment/mining_tools.dm @@ -217,6 +217,9 @@ attack_verb_simple = list("bash", "bludgeon", "thrash", "whack") wound_bonus = 10 +/obj/item/trench_tool/get_all_tool_behaviours() + return list(TOOL_MINING, TOOL_SHOVEL, TOOL_WRENCH) + /obj/item/trench_tool/Initialize(mapload) . = ..() AddElement(/datum/element/update_icon_updates_onmob) @@ -320,6 +323,9 @@ /// Wether we knock down and launch away out enemies when we attack. var/do_launch = TRUE +/obj/item/shovel/giant_wrench/get_all_tool_behaviours() + return list(TOOL_SHOVEL, TOOL_WRENCH) + /datum/armor/giant_wrench acid = 30 bomb = 100 diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 4f84725b923..05606ac3a2e 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -363,6 +363,9 @@ icon_state = "pendriver" toolspeed = 1.2 // gotta have some downside +/obj/item/pen/screwdriver/get_all_tool_behaviours() + return list(TOOL_SCREWDRIVER) + /obj/item/pen/screwdriver/Initialize(mapload) . = ..() AddComponent( \ diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index 4a1b567a287..8a45e193385 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -12,6 +12,11 @@ w_class = WEIGHT_CLASS_TINY tool_behaviour = TOOL_RETRACTOR toolspeed = 1 + /// How this looks when placed in a surgical tray + var/surgical_tray_overlay = "retractor_normal" + +/obj/item/retractor/get_surgery_tool_overlay(tray_extended) + return surgical_tray_overlay /obj/item/retractor/augment desc = "Micro-mechanical manipulator for retracting stuff." @@ -34,6 +39,11 @@ attack_verb_simple = list("attack", "pinch") tool_behaviour = TOOL_HEMOSTAT toolspeed = 1 + /// How this looks when placed in a surgical tray + var/surgical_tray_overlay = "hemostat_normal" + +/obj/item/hemostat/get_surgery_tool_overlay(tray_extended) + return surgical_tray_overlay /obj/item/hemostat/augment desc = "Tiny servos power a pair of pincers to stop bleeding." @@ -56,6 +66,11 @@ attack_verb_simple = list("burn") tool_behaviour = TOOL_CAUTERY toolspeed = 1 + /// How this looks when placed in a surgical tray + var/surgical_tray_overlay = "cautery_normal" + +/obj/item/cautery/get_surgery_tool_overlay(tray_extended) + return surgical_tray_overlay /obj/item/cautery/ignition_effect(atom/ignitable_atom, mob/user) . = span_notice("[user] touches the end of [src] to \the [ignitable_atom], igniting it with a puff of smoke.") @@ -70,6 +85,7 @@ icon = 'icons/obj/medical/surgery_tools.dmi' icon_state = "e_cautery" inhand_icon_state = "e_cautery" + surgical_tray_overlay = "cautery_advanced" lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT*2, /datum/material/glass =SHEET_MATERIAL_AMOUNT, /datum/material/plasma =SHEET_MATERIAL_AMOUNT, /datum/material/uranium = SHEET_MATERIAL_AMOUNT*1.5, /datum/material/titanium = SHEET_MATERIAL_AMOUNT*1.5) @@ -80,6 +96,9 @@ light_range = 1 light_color = COLOR_SOFT_RED +/obj/item/cautery/advanced/get_all_tool_behaviours() + return list(TOOL_CAUTERY, TOOL_DRILL) + /obj/item/cautery/advanced/Initialize(mapload) . = ..() AddComponent( \ @@ -131,11 +150,16 @@ sharpness = SHARP_POINTY wound_bonus = 10 bare_wound_bonus = 10 + /// How this looks when placed in a surgical tray + var/surgical_tray_overlay = "drill_normal" /obj/item/surgicaldrill/Initialize(mapload) . = ..() AddElement(/datum/element/eyestab) +/obj/item/surgicaldrill/get_surgery_tool_overlay(tray_extended) + return surgical_tray_overlay + /obj/item/surgicaldrill/suicide_act(mob/living/user) user.visible_message(span_suicide("[user] rams [src] into [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!")) addtimer(CALLBACK(user, TYPE_PROC_REF(/mob/living/carbon, gib), null, null, TRUE, TRUE), 25) @@ -174,6 +198,8 @@ toolspeed = 1 wound_bonus = 10 bare_wound_bonus = 15 + /// How this looks when placed in a surgical tray + var/surgical_tray_overlay = "scalpel_normal" /obj/item/scalpel/Initialize(mapload) . = ..() @@ -184,14 +210,17 @@ ) AddElement(/datum/element/eyestab) -/obj/item/scalpel/augment - desc = "Ultra-sharp blade attached directly to your bone for extra-accuracy." - toolspeed = 0.5 +/obj/item/scalpel/get_surgery_tool_overlay(tray_extended) + return surgical_tray_overlay /obj/item/scalpel/suicide_act(mob/living/user) user.visible_message(span_suicide("[user] is slitting [user.p_their()] [pick("wrists", "throat", "stomach")] with [src]! It looks like [user.p_theyre()] trying to commit suicide!")) return BRUTELOSS +/obj/item/scalpel/augment + desc = "Ultra-sharp blade attached directly to your bone for extra-accuracy." + toolspeed = 0.5 + /obj/item/circular_saw name = "circular saw" desc = "For heavy duty cutting." @@ -217,6 +246,8 @@ toolspeed = 1 wound_bonus = 15 bare_wound_bonus = 10 + /// How this looks when placed in a surgical tray + var/surgical_tray_overlay = "saw_normal" /obj/item/circular_saw/Initialize(mapload) . = ..() @@ -228,6 +259,9 @@ ) //saws are very accurate and fast at butchering +/obj/item/circular_saw/get_surgery_tool_overlay(tray_extended) + return surgical_tray_overlay + /obj/item/circular_saw/augment desc = "A small but very fast spinning saw. It rips and tears until it is done." w_class = WEIGHT_CLASS_SMALL @@ -329,6 +363,7 @@ desc = "An advanced scalpel which uses laser technology to cut." icon_state = "e_scalpel" inhand_icon_state = "e_scalpel" + surgical_tray_overlay = "scalpel_advanced" lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT*3, /datum/material/glass =HALF_SHEET_MATERIAL_AMOUNT * 1.5, /datum/material/silver =SHEET_MATERIAL_AMOUNT, /datum/material/gold =HALF_SHEET_MATERIAL_AMOUNT * 1.5, /datum/material/diamond =SMALL_MATERIAL_AMOUNT * 2, /datum/material/titanium = SHEET_MATERIAL_AMOUNT*2) @@ -341,6 +376,9 @@ light_color = LIGHT_COLOR_BLUE sharpness = SHARP_EDGED +/obj/item/scalpel/advanced/get_all_tool_behaviours() + return list(TOOL_SAW, TOOL_SCALPEL) + /obj/item/scalpel/advanced/Initialize(mapload) . = ..() AddComponent( \ @@ -385,11 +423,15 @@ custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT*6, /datum/material/glass = SHEET_MATERIAL_AMOUNT*2, /datum/material/silver = SHEET_MATERIAL_AMOUNT*2, /datum/material/titanium =SHEET_MATERIAL_AMOUNT * 2.5) icon_state = "adv_retractor" inhand_icon_state = "adv_retractor" + surgical_tray_overlay = "retractor_advanced" lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' w_class = WEIGHT_CLASS_NORMAL toolspeed = 0.7 +/obj/item/retractor/advanced/get_all_tool_behaviours() + return list(TOOL_HEMOSTAT, TOOL_RETRACTOR) + /obj/item/retractor/advanced/Initialize(mapload) . = ..() AddComponent( \ @@ -518,6 +560,9 @@ tool_behaviour = TOOL_BONESET toolspeed = 1 +/obj/item/bonesetter/get_surgery_tool_overlay(tray_extended) + return "bonesetter" + (tray_extended ? "" : "_out") + /obj/item/blood_filter name = "blood filter" desc = "For filtering the blood." @@ -535,6 +580,9 @@ /// Assoc list of chem ids to names, used for deciding which chems to filter when used for surgery var/list/whitelist = list() +/obj/item/blood_filter/get_surgery_tool_overlay(tray_extended) + return "filter" + /obj/item/blood_filter/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) @@ -590,24 +638,28 @@ name = "twisted retractor" desc = "Helps reveal secrets that would rather stay buried." icon_state = "cruelretractor" + surgical_tray_overlay = "retractor_cruel" item_flags = SURGICAL_TOOL | CRUEL_IMPLEMENT /obj/item/hemostat/cruel name = "cruel hemostat" desc = "Clamping bleeders, but not so good at fixing breathers." icon_state = "cruelhemostat" + surgical_tray_overlay = "hemostat_cruel" item_flags = SURGICAL_TOOL | CRUEL_IMPLEMENT /obj/item/cautery/cruel name = "savage cautery" desc = "Chalk this one up as another successful vivisection." icon_state = "cruelcautery" + surgical_tray_overlay = "cautery_cruel" item_flags = SURGICAL_TOOL | CRUEL_IMPLEMENT /obj/item/scalpel/cruel name = "hungry scalpel" desc = "I remember every time I hold you. My born companion..." icon_state = "cruelscalpel" + surgical_tray_overlay = "scalpel_cruel" item_flags = SURGICAL_TOOL | CRUEL_IMPLEMENT /obj/item/scalpel/cruel/Initialize(mapload) diff --git a/icons/obj/cosmetic.dmi b/icons/obj/cosmetic.dmi index e53e490b956..b04bde541ad 100644 Binary files a/icons/obj/cosmetic.dmi and b/icons/obj/cosmetic.dmi differ diff --git a/icons/obj/medicart.dmi b/icons/obj/medicart.dmi new file mode 100644 index 00000000000..c25ea0039dc Binary files /dev/null and b/icons/obj/medicart.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 98bffcec2cc..6b7ee6f3217 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1579,6 +1579,7 @@ #include "code\datums\storage\subtypes\organ_box.dm" #include "code\datums\storage\subtypes\pockets.dm" #include "code\datums\storage\subtypes\rped.dm" +#include "code\datums\storage\subtypes\surgery_tray.dm" #include "code\datums\storage\subtypes\trash.dm" #include "code\datums\votes\_vote_datum.dm" #include "code\datums\votes\custom_vote.dm" @@ -2043,6 +2044,7 @@ #include "code\game\objects\items\skub.dm" #include "code\game\objects\items\spear.dm" #include "code\game\objects\items\sticker.dm" +#include "code\game\objects\items\surgery_tray.dm" #include "code\game\objects\items\syndie_spraycan.dm" #include "code\game\objects\items\tail_pin.dm" #include "code\game\objects\items\taster.dm" diff --git a/tools/UpdatePaths/Scripts/77975_surgery_duffels_to_trays.txt b/tools/UpdatePaths/Scripts/77975_surgery_duffels_to_trays.txt new file mode 100644 index 00000000000..028de191f03 --- /dev/null +++ b/tools/UpdatePaths/Scripts/77975_surgery_duffels_to_trays.txt @@ -0,0 +1,4 @@ +#comment updates surgical duffels and coroner duffels to surgery trays and morgue surgery trays + +/obj/item/storage/backpack/duffelbag/med/surgery : /obj/item/surgery_tray{@OLD} +/obj/item/storage/backpack/duffelbag/coroner/surgery : /obj/item/surgery_tray/morgue{@OLD} \ No newline at end of file