From 029b7631c7f0f4093cd8721ac120990ca0610f83 Mon Sep 17 00:00:00 2001 From: gluesniffler <159397573+gluesniffler@users.noreply.github.com> Date: Sat, 16 Nov 2024 20:32:30 -0400 Subject: [PATCH] Shitmed: Implementing Existing Newmed Code Into SS14 (#1159) # Description ## The mythical surgery system. Heard whispered in hushed tones in the corners of [REDACTED], it has been real since 2 years ago. If you listen very carefully you might be able to hear the sound of arachne crashing the server. Jokes aside. Lets set some expectations, ideally this will not mess too much with existing body code, besides trying to not die from all the fucking test fails, all the while introducing needed systems for handling wounds, surgery, part/organ manipulation, and displaying all of those to the players. The PR in its current state **is** working properly, you can pick it up and get surgery on your server today, though of course its buggy due to the unhandled issues it has right now. If you do pick it up, give me a heads up and I'll see if I can help you out. This PR is mostly intended as a public roasting ground for my shitcode, so that other contribs/maints can pitch in to help improve it as well. --- # TODO - [ ] FIX MY FUCKING SHITCODE AAAAAAAAAAAAAAAAAAAAAAAAAA - [x] Have fun :) --- # Demo/Walkthrough

[![Surgery Demo](https://i.ytimg.com/vi/UhxS5b3LC-A/maxresdefault.jpg)](https://www.youtube.com/watch?v=UhxS5b3LC-A "Surgery Demo")

--- # Tasks currently being worked on: - [x] Porting an upgraded body doll that is less shit to use. - [x] Add a completely innocuous felinization/defelinization surgery. (Highly sought after feature :D ) - [x] Implement pizza limb sprites and add em as a surgery (soon :tm:) - [ ] Add CyberneticsSystem - [ ] Add a series of cybernetic limbs with special properties, and different susceptibilities to EMPs - [ ] Add the associated surgeries to cybernetic implants and their associated maintenance. - [ ] Tweak Cybernetics Traits to use CyberneticsSystem, and overwrite the entity's limbs on spawn (I LOVE SHITCODE) - [ ] Add Cybernetic Limbs to Research - [x] Start adding a shitload of Shitmed comments on wherever I made changes, since we're getting fairly close to what I could call a stable v1 - [ ] Refactor SurgeryBUI to be slightly less shitcodey, and properly use BUI states instead of a half-assed BUIMessage. - [ ] Separate harpy wings into two distinct wings rather than a single layer. --- # Reported bugs that I haven't been able to replicate - Apparently returning to the body kicks you back to the body instead of the entity that the brain is attached to? - Disconnecting and reconnecting after a brain/head transplant makes the client crash. Seems to be related to identity. - Transplanting a head sometimes makes it so that you cannot strip other entities. --- # Changelog :cl: Mocho - add: A week has passed. Surgery is here. --------- Signed-off-by: gluesniffler <159397573+gluesniffler@users.noreply.github.com> Co-authored-by: FoxxoTrystan <45297731+FoxxoTrystan@users.noreply.github.com> Co-authored-by: goet <6637097+goet@users.noreply.github.com> Co-authored-by: Saphire Lattice --- .../Body/Components/BrainComponent.cs | 3 + .../Body/Components/LungComponent.cs | 3 + .../Body/Components/StomachComponent.cs | 3 + Content.Client/Body/Systems/BodySystem.cs | 65 ++ Content.Client/Hands/Systems/HandsSystem.cs | 35 +- .../UI/HealthAnalyzerBoundUserInterface.cs | 7 + .../UI/HealthAnalyzerWindow.xaml | 220 ++++- .../UI/HealthAnalyzerWindow.xaml.cs | 126 ++- .../Humanoid/HumanoidAppearanceSystem.cs | 8 +- Content.Client/Input/ContentContexts.cs | 6 + .../Inventory/ClientInventorySystem.cs | 13 +- .../Inventory/InventorySlotsComponent.cs | 2 +- Content.Client/Medical/Surgery/SurgeryBui.cs | 358 +++++++++ .../Medical/Surgery/SurgeryStepButton.xaml | 4 + .../Medical/Surgery/SurgeryStepButton.xaml.cs | 16 + .../Medical/Surgery/SurgerySystem.cs | 11 + .../Medical/Surgery/SurgeryWindow.xaml | 23 + .../Medical/Surgery/SurgeryWindow.xaml.cs | 14 + .../Options/UI/Tabs/KeyRebindTab.xaml.cs | 8 + Content.Client/Stylesheets/StyleNano.cs | 54 ++ Content.Client/Targeting/TargetingSystem.cs | 102 +++ .../Screens/OverlayChatGameScreen.xaml | 2 + .../Screens/OverlayChatGameScreen.xaml.cs | 1 + .../Screens/SeparatedChatGameScreen.xaml | 2 + .../Screens/SeparatedChatGameScreen.xaml.cs | 1 + .../Systems/Alerts/Widgets/AlertsUI.xaml | 10 +- .../Inventory/InventoryUIController.cs | 4 +- .../PartStatus/PartStatusUIController.cs | 82 ++ .../PartStatus/Widgets/PartStatusControl.xaml | 57 ++ .../Widgets/PartStatusControl.xaml.cs | 50 ++ .../Targeting/TargetingUIController.cs | 82 ++ .../Targeting/Widgets/TargetingControl.xaml | 216 +++++ .../Widgets/TargetingControl.xaml.cs | 58 ++ .../Xenonids/UI/XenoChoiceControl.xaml | 17 + .../Xenonids/UI/XenoChoiceControl.xaml.cs | 26 + .../Tests/Shitmed/Body/SpeciesBUiTest.cs | 63 ++ .../Atmos/EntitySystems/BarotraumaSystem.cs | 4 +- Content.Server/Bed/Sleep/SleepingSystem.cs | 7 +- Content.Server/Body/Systems/BodySystem.cs | 57 +- Content.Server/Body/Systems/BrainSystem.cs | 24 +- .../Body/Systems/RespiratorSystem.cs | 3 +- .../Chemistry/ReagentEffects/HealthChange.cs | 8 +- .../Thresholds/Behaviors/GibBehavior.cs | 5 +- .../Thresholds/Behaviors/GibPartBehavior.cs | 19 + Content.Server/Execution/ExecutionSystem.cs | 4 +- Content.Server/Hands/Systems/HandsSystem.cs | 51 +- .../Components/HealthAnalyzerComponent.cs | 6 + Content.Server/Medical/CryoPodSystem.cs | 1 + Content.Server/Medical/HealingSystem.cs | 28 +- .../Medical/HealthAnalyzerSystem.cs | 71 +- .../Medical/Surgery/SurgerySystem.cs | 189 +++++ Content.Server/Targeting/TargetingSystem.cs | 54 ++ .../Traits/Assorted/LightweightDrunkSystem.cs | 2 +- .../Body/Events/AmputateAttemptEvent.cs | 7 + .../Body/Organ/DebrainedComponent.cs | 7 + Content.Shared/Body/Organ/EarsComponent.cs | 6 + Content.Shared/Body/Organ/EyesComponent.cs | 6 + Content.Shared/Body/Organ/HeartComponent.cs | 6 + Content.Shared/Body/Organ/LiverComponent.cs | 6 + .../Body/Organ/MarkingContainerComponent.cs | 15 + Content.Shared/Body/Organ/OrganComponent.cs | 20 +- Content.Shared/Body/Organ/TailComponent.cs | 6 + .../Body/Part/BodyPartAppearanceComponent.cs | 45 ++ Content.Shared/Body/Part/BodyPartComponent.cs | 111 ++- Content.Shared/Body/Part/BodyPartEvents.cs | 20 + .../Body/Systems/SharedBodySystem.Body.cs | 99 ++- .../Body/Systems/SharedBodySystem.Organs.cs | 11 + .../SharedBodySystem.PartAppearance.cs | 198 +++++ .../Body/Systems/SharedBodySystem.Parts.cs | 270 ++++++- .../Systems/SharedBodySystem.Targeting.cs | 503 ++++++++++++ .../Body/Systems/SharedBodySystem.cs | 5 +- Content.Shared/CCVar/CCVars.cs | 6 + .../Damage/Systems/DamageableSystem.cs | 54 +- .../Hands/Components/HandsComponent.cs | 1 + .../Hands/EntitySystems/SharedHandsSystem.cs | 2 + .../Events/ProfileLoadFinishedEvent.cs | 7 + .../Humanoid/HumanoidVisualLayersExtension.cs | 12 + .../SharedHumanoidAppearanceSystem.cs | 2 + Content.Shared/Input/ContentKeyFunctions.cs | 6 + .../Inventory/InventoryComponent.cs | 1 + .../Inventory/InventorySystem.Slots.cs | 52 +- .../Inventory/InventoryTemplatePrototype.cs | 5 + .../SurgeryCloseIncisionConditionComponent.cs | 6 + .../SurgeryLarvaConditionComponent.cs | 6 + .../SurgeryMarkingConditionComponent.cs | 27 + ...SurgeryOperatingTableConditionComponent.cs | 6 + .../SurgeryOrganConditionComponent.cs | 18 + .../SurgeryPartConditionComponent.cs | 17 + .../Conditions/SurgeryPartPresentCondition.cs | 6 + .../SurgeryPartRemovedConditionComponent.cs | 14 + .../Surgery/Conditions/SurgeryValidEvent.cs | 9 + .../SurgeryWoundedConditionComponent.cs | 7 + .../Effects/Complete/SurgeryCompletedEvent.cs | 7 + .../Complete/SurgeryRemoveLarvaComponent.cs | 6 + .../SurgeryDamageChangeEffectComponent.cs | 17 + ...rgerySpecialDamageChangeEffectComponent.cs | 14 + .../Step/SurgeryStepCavityEffectComponent.cs | 10 + .../Step/SurgeryStepEmoteEffectComponent.cs | 12 + .../Effects/Step/SurgeryStepSpawnEffect.cs | 13 + .../Step/SurgeryTendWoundsEffectComponent.cs | 20 + .../Surgery/OperatingTableComponent.cs | 6 + .../Surgery/SharedSurgerySystem.Steps.cs | 755 ++++++++++++++++++ .../Medical/Surgery/SharedSurgerySystem.cs | 283 +++++++ .../Medical/Surgery/StepInvalidReason.cs | 10 + .../Steps/Parts/BleedersClampedComponent.cs | 6 + .../Parts/BodyPartReattachedComponent.cs | 6 + .../Steps/Parts/BodyPartSawedComponent.cs | 6 + .../Steps/Parts/IncisionOpenComponent.cs | 6 + .../Parts/InternalBleedersClampedComponent.cs | 6 + .../Steps/Parts/OrganReattachedComponent.cs | 6 + .../Steps/Parts/PartRemovedComponent.cs | 6 + .../Steps/Parts/RibcageOpenComponent.cs | 6 + .../Steps/Parts/RibcageSawedComponent.cs | 6 + .../Steps/Parts/SkinRetractedComponent.cs | 6 + .../Steps/SurgeryAddMarkingStepComponent.cs | 34 + .../Steps/SurgeryAddOrganStepComponent.cs | 6 + .../Steps/SurgeryAddPartStepComponent.cs | 6 + .../Steps/SurgeryAffixOrganStepComponent.cs | 6 + .../Steps/SurgeryAffixPartStepComponent.cs | 6 + .../Steps/SurgeryCanPerformStepEvent.cs | 14 + .../SurgeryCutLarvaRootsStepComponent.cs | 6 + .../SurgeryRemoveMarkingStepComponent.cs | 29 + .../Steps/SurgeryRemoveOrganStepComponent.cs | 6 + .../Steps/SurgeryRemovePartStepComponent.cs | 6 + .../Steps/SurgeryRepeatableStepComponent.cs | 6 + .../Steps/SurgeryStepCompleteCheckEvent.cs | 4 + .../Surgery/Steps/SurgeryStepComponent.cs | 22 + .../Medical/Surgery/SurgeryComponent.cs | 18 + .../Medical/Surgery/SurgeryDoAfterEvent.cs | 18 + .../Surgery/SurgerySpeedModifierComponent.cs | 11 + .../Medical/Surgery/SurgeryStepDamageEvent.cs | 9 + .../Medical/Surgery/SurgeryStepEvent.cs | 7 + .../Medical/Surgery/SurgeryTargetComponent.cs | 10 + Content.Shared/Medical/Surgery/SurgeryUI.cs | 32 + .../Medical/Surgery/SurgeryUiRefreshEvent.cs | 14 + .../Medical/Surgery/Tools/BoneGelComponent.cs | 11 + .../Medical/Surgery/Tools/BoneSawComponent.cs | 10 + .../Surgery/Tools/BoneSetterComponent.cs | 6 + .../Medical/Surgery/Tools/CauteryComponent.cs | 10 + .../Surgery/Tools/HemostatComponent.cs | 10 + .../Surgery/Tools/ISurgeryToolComponent.cs | 11 + .../Surgery/Tools/RetractorComponent.cs | 10 + .../Medical/Surgery/Tools/ScalpelComponent.cs | 10 + .../Surgery/Tools/SurgeryToolComponent.cs | 16 + .../Surgery/Tools/SurgicalDrillComponent.cs | 10 + .../HealthAnalyzerScannedUserMessage.cs | 16 +- .../Systems/MobStateSystem.StateMachine.cs | 4 + .../Standing/SharedLayingDownSystem.cs | 6 +- Content.Shared/Targeting/Events.cs | 38 + .../Targeting/SharedTargetingSystem.cs | 26 + Content.Shared/Targeting/TargetBodyPart.cs | 31 + Content.Shared/Targeting/TargetIntegrity.cs | 13 + .../Targeting/TargetingComponent.cs | 59 ++ .../Weapons/Melee/MeleeWeaponComponent.cs | 12 + .../Weapons/Melee/SharedMeleeWeaponSystem.cs | 4 +- .../Audio/Medical/Surgery/attributions.yml | 49 ++ Resources/Audio/Medical/Surgery/cautery1.ogg | Bin 0 -> 34770 bytes Resources/Audio/Medical/Surgery/cautery2.ogg | Bin 0 -> 16854 bytes Resources/Audio/Medical/Surgery/hemostat1.ogg | Bin 0 -> 15729 bytes Resources/Audio/Medical/Surgery/organ1.ogg | Bin 0 -> 18912 bytes Resources/Audio/Medical/Surgery/organ2.ogg | Bin 0 -> 18946 bytes .../Audio/Medical/Surgery/retractor1.ogg | Bin 0 -> 11537 bytes .../Audio/Medical/Surgery/retractor2.ogg | Bin 0 -> 9915 bytes Resources/Audio/Medical/Surgery/saw.ogg | Bin 0 -> 46750 bytes Resources/Audio/Medical/Surgery/scalpel1.ogg | Bin 0 -> 13736 bytes Resources/Audio/Medical/Surgery/scalpel2.ogg | Bin 0 -> 13098 bytes .../en-US/escape-menu/ui/options-menu.ftl | 8 + Resources/Locale/en-US/guidebook/guides.ftl | 4 + .../components/health-analyzer-component.ftl | 1 + Resources/Locale/en-US/mood/mood.ftl | 2 + Resources/Locale/en-US/surgery/surgery-ui.ftl | 12 + Resources/Prototypes/Body/Organs/felinid.yml | 24 + Resources/Prototypes/Body/Organs/human.yml | 15 + Resources/Prototypes/Body/Parts/animal.yml | 2 +- Resources/Prototypes/Body/Parts/base.yml | 55 +- Resources/Prototypes/Body/Parts/harpy.yml | 51 +- Resources/Prototypes/Body/Parts/shadowkin.yml | 2 +- Resources/Prototypes/Body/Parts/skeleton.yml | 31 +- Resources/Prototypes/Body/Parts/vox.yml | 2 +- .../Prototypes/Body/Prototypes/a_ghost.yml | 16 +- .../Prototypes/Body/Prototypes/human.yml | 32 +- .../Catalog/Fills/Backpacks/duffelbag.yml | 2 + .../Catalog/Fills/Crates/medical.yml | 4 +- .../Catalog/Fills/Lockers/heads.yml | 2 + Resources/Prototypes/Damage/containers.yml | 8 + Resources/Prototypes/Damage/modifier_sets.yml | 11 + .../DeltaV/Roles/Jobs/Security/brigmedic.yml | 2 + .../Entities/Clothing/Belt/belts.yml | 2 +- .../Entities/Debugging/debug_sweps.yml | 48 ++ .../Prototypes/Entities/Mobs/NPCs/animals.yml | 8 +- .../Entities/Mobs/Player/silicon_base.yml | 6 +- .../Prototypes/Entities/Mobs/Species/base.yml | 4 + .../Entities/Mobs/Species/skeleton.yml | 3 +- .../Entities/Mobs/Species/slime.yml | 2 + .../Circuitboards/Machine/production.yml | 14 + .../Objects/Specific/Medical/surgery.yml | 188 ++++- .../Furniture/Tables/operating_table.yml | 3 +- .../Entities/Structures/Machines/lathe.yml | 48 ++ .../Prototypes/Entities/Surgery/surgeries.yml | 539 +++++++++++++ .../Entities/Surgery/surgery_steps.yml | 563 +++++++++++++ .../Prototypes/EntityLists/Tools/surgery.yml | 8 +- Resources/Prototypes/Guidebook/medical.yml | 29 + Resources/Prototypes/Mood/genericNeeds.yml | 2 +- .../Mood/genericNegativeEffects.yml | 6 + Resources/Prototypes/Reagents/gases.yml | 16 +- .../Prototypes/Recipes/Lathes/medical.yml | 8 + .../Recipes/Lathes/rehydrateable.yml | 98 +++ .../Prototypes/Roles/Jobs/Medical/chemist.yml | 2 + .../Jobs/Medical/chief_medical_officer.yml | 2 + .../Roles/Jobs/Medical/medical_doctor.yml | 2 + .../Roles/Jobs/Medical/medical_intern.yml | 2 + .../Roles/Jobs/Medical/paramedic.yml | 2 + .../Roles/Jobs/Medical/senior_physician.yml | 2 + Resources/Prototypes/Species/misc.yml | 12 + .../Guidebook/Medical/OrganManipulation.xml | 51 ++ .../Guidebook/Medical/PartManipulation.xml | 51 ++ .../ServerInfo/Guidebook/Medical/Surgery.xml | 40 + .../Guidebook/Medical/UtilitySurgeries.xml | 24 + .../Textures/Interface/Ashen/target_doll.png | Bin 0 -> 422 bytes .../Interface/Clockwork/target_doll.png | Bin 0 -> 1219 bytes .../Interface/Default/target_doll.png | Bin 0 -> 422 bytes .../Interface/Minimalist/target_doll.png | Bin 0 -> 422 bytes .../Interface/Plasmafire/target_doll.png | Bin 0 -> 462 bytes .../Textures/Interface/Retro/target_doll.png | Bin 0 -> 383 bytes .../Interface/Slimecore/target_doll.png | Bin 0 -> 422 bytes .../Interface/Targeting/Doll/eyes.png | Bin 0 -> 5227 bytes .../Interface/Targeting/Doll/eyes_hover.png | Bin 0 -> 6856 bytes .../Interface/Targeting/Doll/groin.png | Bin 0 -> 5485 bytes .../Interface/Targeting/Doll/groin_hover.png | Bin 0 -> 6452 bytes .../Interface/Targeting/Doll/head.png | Bin 0 -> 5663 bytes .../Interface/Targeting/Doll/head_hover.png | Bin 0 -> 7153 bytes .../Interface/Targeting/Doll/leftarm.png | Bin 0 -> 5779 bytes .../Targeting/Doll/leftarm_hover.png | Bin 0 -> 6652 bytes .../Interface/Targeting/Doll/leftfoot.png | Bin 0 -> 5462 bytes .../Targeting/Doll/leftfoot_hover.png | Bin 0 -> 5476 bytes .../Interface/Targeting/Doll/lefthand.png | Bin 0 -> 5462 bytes .../Targeting/Doll/lefthand_hover.png | Bin 0 -> 6174 bytes .../Interface/Targeting/Doll/leftleg.png | Bin 0 -> 5488 bytes .../Targeting/Doll/leftleg_hover.png | Bin 0 -> 6185 bytes .../Interface/Targeting/Doll/mouth.png | Bin 0 -> 5219 bytes .../Interface/Targeting/Doll/mouth_hover.png | Bin 0 -> 5208 bytes .../Interface/Targeting/Doll/rightarm.png | Bin 0 -> 5773 bytes .../Targeting/Doll/rightarm_hover.png | Bin 0 -> 6592 bytes .../Interface/Targeting/Doll/rightfoot.png | Bin 0 -> 5454 bytes .../Targeting/Doll/rightfoot_hover.png | Bin 0 -> 5465 bytes .../Interface/Targeting/Doll/righthand.png | Bin 0 -> 5467 bytes .../Targeting/Doll/righthand_hover.png | Bin 0 -> 6207 bytes .../Interface/Targeting/Doll/rightleg.png | Bin 0 -> 5473 bytes .../Targeting/Doll/rightleg_hover.png | Bin 0 -> 5908 bytes .../Interface/Targeting/Doll/torso.png | Bin 0 -> 5284 bytes .../Interface/Targeting/Doll/torso_hover.png | Bin 0 -> 5672 bytes .../Targeting/Status/groin.rsi/groin_0.png | Bin 0 -> 157 bytes .../Targeting/Status/groin.rsi/groin_1.png | Bin 0 -> 157 bytes .../Targeting/Status/groin.rsi/groin_2.png | Bin 0 -> 157 bytes .../Targeting/Status/groin.rsi/groin_3.png | Bin 0 -> 157 bytes .../Targeting/Status/groin.rsi/groin_4.png | Bin 0 -> 157 bytes .../Targeting/Status/groin.rsi/groin_5.png | Bin 0 -> 157 bytes .../Targeting/Status/groin.rsi/groin_6.png | Bin 0 -> 157 bytes .../Targeting/Status/groin.rsi/groin_7.png | Bin 0 -> 157 bytes .../Targeting/Status/groin.rsi/groin_8.png | Bin 0 -> 178 bytes .../Targeting/Status/groin.rsi/meta.json | 38 + .../Targeting/Status/head.rsi/head_0.png | Bin 0 -> 140 bytes .../Targeting/Status/head.rsi/head_1.png | Bin 0 -> 140 bytes .../Targeting/Status/head.rsi/head_2.png | Bin 0 -> 140 bytes .../Targeting/Status/head.rsi/head_3.png | Bin 0 -> 140 bytes .../Targeting/Status/head.rsi/head_4.png | Bin 0 -> 140 bytes .../Targeting/Status/head.rsi/head_5.png | Bin 0 -> 140 bytes .../Targeting/Status/head.rsi/head_6.png | Bin 0 -> 140 bytes .../Targeting/Status/head.rsi/head_7.png | Bin 0 -> 140 bytes .../Targeting/Status/head.rsi/head_8.png | Bin 0 -> 155 bytes .../Targeting/Status/head.rsi/meta.json | 38 + .../Status/leftarm.rsi/leftarm_0.png | Bin 0 -> 144 bytes .../Status/leftarm.rsi/leftarm_1.png | Bin 0 -> 144 bytes .../Status/leftarm.rsi/leftarm_2.png | Bin 0 -> 144 bytes .../Status/leftarm.rsi/leftarm_3.png | Bin 0 -> 144 bytes .../Status/leftarm.rsi/leftarm_4.png | Bin 0 -> 144 bytes .../Status/leftarm.rsi/leftarm_5.png | Bin 0 -> 144 bytes .../Status/leftarm.rsi/leftarm_6.png | Bin 0 -> 144 bytes .../Status/leftarm.rsi/leftarm_7.png | Bin 0 -> 144 bytes .../Status/leftarm.rsi/leftarm_8.png | Bin 0 -> 154 bytes .../Targeting/Status/leftarm.rsi/meta.json | 38 + .../Status/leftfoot.rsi/leftfoot_0.png | Bin 0 -> 145 bytes .../Status/leftfoot.rsi/leftfoot_1.png | Bin 0 -> 145 bytes .../Status/leftfoot.rsi/leftfoot_2.png | Bin 0 -> 145 bytes .../Status/leftfoot.rsi/leftfoot_3.png | Bin 0 -> 145 bytes .../Status/leftfoot.rsi/leftfoot_4.png | Bin 0 -> 145 bytes .../Status/leftfoot.rsi/leftfoot_5.png | Bin 0 -> 145 bytes .../Status/leftfoot.rsi/leftfoot_6.png | Bin 0 -> 145 bytes .../Status/leftfoot.rsi/leftfoot_7.png | Bin 0 -> 145 bytes .../Status/leftfoot.rsi/leftfoot_8.png | Bin 0 -> 166 bytes .../Targeting/Status/leftfoot.rsi/meta.json | 38 + .../Status/lefthand.rsi/lefthand_0.png | Bin 0 -> 136 bytes .../Status/lefthand.rsi/lefthand_1.png | Bin 0 -> 136 bytes .../Status/lefthand.rsi/lefthand_2.png | Bin 0 -> 136 bytes .../Status/lefthand.rsi/lefthand_3.png | Bin 0 -> 136 bytes .../Status/lefthand.rsi/lefthand_4.png | Bin 0 -> 136 bytes .../Status/lefthand.rsi/lefthand_5.png | Bin 0 -> 136 bytes .../Status/lefthand.rsi/lefthand_6.png | Bin 0 -> 136 bytes .../Status/lefthand.rsi/lefthand_7.png | Bin 0 -> 136 bytes .../Status/lefthand.rsi/lefthand_8.png | Bin 0 -> 152 bytes .../Targeting/Status/lefthand.rsi/meta.json | 38 + .../Status/leftleg.rsi/leftleg_0.png | Bin 0 -> 141 bytes .../Status/leftleg.rsi/leftleg_1.png | Bin 0 -> 141 bytes .../Status/leftleg.rsi/leftleg_2.png | Bin 0 -> 141 bytes .../Status/leftleg.rsi/leftleg_3.png | Bin 0 -> 141 bytes .../Status/leftleg.rsi/leftleg_4.png | Bin 0 -> 141 bytes .../Status/leftleg.rsi/leftleg_5.png | Bin 0 -> 141 bytes .../Status/leftleg.rsi/leftleg_6.png | Bin 0 -> 141 bytes .../Status/leftleg.rsi/leftleg_7.png | Bin 0 -> 141 bytes .../Status/leftleg.rsi/leftleg_8.png | Bin 0 -> 170 bytes .../Targeting/Status/leftleg.rsi/meta.json | 38 + .../Targeting/Status/rightarm.rsi/meta.json | 38 + .../Status/rightarm.rsi/rightarm_0.png | Bin 0 -> 147 bytes .../Status/rightarm.rsi/rightarm_1.png | Bin 0 -> 147 bytes .../Status/rightarm.rsi/rightarm_2.png | Bin 0 -> 147 bytes .../Status/rightarm.rsi/rightarm_3.png | Bin 0 -> 147 bytes .../Status/rightarm.rsi/rightarm_4.png | Bin 0 -> 147 bytes .../Status/rightarm.rsi/rightarm_5.png | Bin 0 -> 147 bytes .../Status/rightarm.rsi/rightarm_6.png | Bin 0 -> 147 bytes .../Status/rightarm.rsi/rightarm_7.png | Bin 0 -> 147 bytes .../Status/rightarm.rsi/rightarm_8.png | Bin 0 -> 158 bytes .../Targeting/Status/rightfoot.rsi/meta.json | 38 + .../Status/rightfoot.rsi/rightfoot_0.png | Bin 0 -> 176 bytes .../Status/rightfoot.rsi/rightfoot_1.png | Bin 0 -> 144 bytes .../Status/rightfoot.rsi/rightfoot_2.png | Bin 0 -> 144 bytes .../Status/rightfoot.rsi/rightfoot_3.png | Bin 0 -> 144 bytes .../Status/rightfoot.rsi/rightfoot_4.png | Bin 0 -> 144 bytes .../Status/rightfoot.rsi/rightfoot_5.png | Bin 0 -> 144 bytes .../Status/rightfoot.rsi/rightfoot_6.png | Bin 0 -> 144 bytes .../Status/rightfoot.rsi/rightfoot_7.png | Bin 0 -> 144 bytes .../Status/rightfoot.rsi/rightfoot_8.png | Bin 0 -> 161 bytes .../Targeting/Status/righthand.rsi/meta.json | 38 + .../Status/righthand.rsi/righthand_0.png | Bin 0 -> 138 bytes .../Status/righthand.rsi/righthand_1.png | Bin 0 -> 138 bytes .../Status/righthand.rsi/righthand_2.png | Bin 0 -> 138 bytes .../Status/righthand.rsi/righthand_3.png | Bin 0 -> 138 bytes .../Status/righthand.rsi/righthand_4.png | Bin 0 -> 138 bytes .../Status/righthand.rsi/righthand_5.png | Bin 0 -> 138 bytes .../Status/righthand.rsi/righthand_6.png | Bin 0 -> 138 bytes .../Status/righthand.rsi/righthand_7.png | Bin 0 -> 138 bytes .../Status/righthand.rsi/righthand_8.png | Bin 0 -> 152 bytes .../Targeting/Status/rightleg.rsi/meta.json | 38 + .../Status/rightleg.rsi/rightleg_0.png | Bin 0 -> 178 bytes .../Status/rightleg.rsi/rightleg_1.png | Bin 0 -> 141 bytes .../Status/rightleg.rsi/rightleg_2.png | Bin 0 -> 141 bytes .../Status/rightleg.rsi/rightleg_3.png | Bin 0 -> 141 bytes .../Status/rightleg.rsi/rightleg_4.png | Bin 0 -> 141 bytes .../Status/rightleg.rsi/rightleg_5.png | Bin 0 -> 141 bytes .../Status/rightleg.rsi/rightleg_6.png | Bin 0 -> 141 bytes .../Status/rightleg.rsi/rightleg_7.png | Bin 0 -> 141 bytes .../Status/rightleg.rsi/rightleg_8.png | Bin 0 -> 166 bytes .../Targeting/Status/torso.rsi/meta.json | 38 + .../Targeting/Status/torso.rsi/torso_0.png | Bin 0 -> 160 bytes .../Targeting/Status/torso.rsi/torso_1.png | Bin 0 -> 160 bytes .../Targeting/Status/torso.rsi/torso_2.png | Bin 0 -> 160 bytes .../Targeting/Status/torso.rsi/torso_3.png | Bin 0 -> 160 bytes .../Targeting/Status/torso.rsi/torso_4.png | Bin 0 -> 160 bytes .../Targeting/Status/torso.rsi/torso_5.png | Bin 0 -> 160 bytes .../Targeting/Status/torso.rsi/torso_6.png | Bin 0 -> 160 bytes .../Targeting/Status/torso.rsi/torso_7.png | Bin 0 -> 160 bytes .../Targeting/Status/torso.rsi/torso_8.png | Bin 0 -> 186 bytes .../Species/Misc/Pizza/parts.rsi/l_arm.png | Bin 0 -> 572 bytes .../Species/Misc/Pizza/parts.rsi/meta.json | 19 + .../Species/Misc/Pizza/parts.rsi/r_arm.png | Bin 0 -> 608 bytes .../Medical/Surgery/bone_gel.rsi/bone-gel.png | Bin 0 -> 432 bytes .../Surgery/bone_gel.rsi/bone-gel_0.png | Bin 0 -> 391 bytes .../Surgery/bone_gel.rsi/bone-gel_25.png | Bin 0 -> 444 bytes .../Surgery/bone_gel.rsi/bone-gel_50.png | Bin 0 -> 456 bytes .../Surgery/bone_gel.rsi/bone-gel_75.png | Bin 0 -> 444 bytes .../Medical/Surgery/bone_gel.rsi/meta.json | 29 + .../bone_gel.rsi/predator_bone-gel.png | Bin 0 -> 585 bytes .../Surgery/bonesetter.rsi/bonesetter.png | Bin 0 -> 581 bytes .../Medical/Surgery/bonesetter.rsi/meta.json | 17 + .../bonesetter.rsi/predator_bonesetter.png | Bin 0 -> 489 bytes .../Surgery/manipulation.rsi/insertion.png | Bin 0 -> 379 bytes .../Surgery/manipulation.rsi/meta.json | 14 + .../limbgrower.rsi/limbgrower_fill.png | Bin 0 -> 9056 bytes .../limbgrower.rsi/limbgrower_idleoff.png | Bin 0 -> 3320 bytes .../limbgrower.rsi/limbgrower_idleon.png | Bin 0 -> 11102 bytes .../limbgrower.rsi/limbgrower_openpanel.png | Bin 0 -> 3981 bytes .../limbgrower.rsi/limbgrower_panelopen.png | Bin 0 -> 2273 bytes .../limbgrower.rsi/limbgrower_unfill.png | Bin 0 -> 9104 bytes .../Machines/limbgrower.rsi/meta.json | 85 ++ Resources/keybinds.yml | 25 + 384 files changed, 8214 insertions(+), 199 deletions(-) create mode 100644 Content.Client/Body/Components/BrainComponent.cs create mode 100644 Content.Client/Body/Components/LungComponent.cs create mode 100644 Content.Client/Body/Components/StomachComponent.cs create mode 100644 Content.Client/Medical/Surgery/SurgeryBui.cs create mode 100644 Content.Client/Medical/Surgery/SurgeryStepButton.xaml create mode 100644 Content.Client/Medical/Surgery/SurgeryStepButton.xaml.cs create mode 100644 Content.Client/Medical/Surgery/SurgerySystem.cs create mode 100644 Content.Client/Medical/Surgery/SurgeryWindow.xaml create mode 100644 Content.Client/Medical/Surgery/SurgeryWindow.xaml.cs create mode 100644 Content.Client/Targeting/TargetingSystem.cs create mode 100644 Content.Client/UserInterface/Systems/PartStatus/PartStatusUIController.cs create mode 100644 Content.Client/UserInterface/Systems/PartStatus/Widgets/PartStatusControl.xaml create mode 100644 Content.Client/UserInterface/Systems/PartStatus/Widgets/PartStatusControl.xaml.cs create mode 100644 Content.Client/UserInterface/Systems/Targeting/TargetingUIController.cs create mode 100644 Content.Client/UserInterface/Systems/Targeting/Widgets/TargetingControl.xaml create mode 100644 Content.Client/UserInterface/Systems/Targeting/Widgets/TargetingControl.xaml.cs create mode 100644 Content.Client/Xenonids/UI/XenoChoiceControl.xaml create mode 100644 Content.Client/Xenonids/UI/XenoChoiceControl.xaml.cs create mode 100644 Content.IntegrationTests/Tests/Shitmed/Body/SpeciesBUiTest.cs create mode 100644 Content.Server/Destructible/Thresholds/Behaviors/GibPartBehavior.cs create mode 100644 Content.Server/Medical/Surgery/SurgerySystem.cs create mode 100644 Content.Server/Targeting/TargetingSystem.cs create mode 100644 Content.Shared/Body/Events/AmputateAttemptEvent.cs create mode 100644 Content.Shared/Body/Organ/DebrainedComponent.cs create mode 100644 Content.Shared/Body/Organ/EarsComponent.cs create mode 100644 Content.Shared/Body/Organ/EyesComponent.cs create mode 100644 Content.Shared/Body/Organ/HeartComponent.cs create mode 100644 Content.Shared/Body/Organ/LiverComponent.cs create mode 100644 Content.Shared/Body/Organ/MarkingContainerComponent.cs create mode 100644 Content.Shared/Body/Organ/TailComponent.cs create mode 100644 Content.Shared/Body/Part/BodyPartAppearanceComponent.cs create mode 100644 Content.Shared/Body/Systems/SharedBodySystem.PartAppearance.cs create mode 100644 Content.Shared/Body/Systems/SharedBodySystem.Targeting.cs create mode 100644 Content.Shared/Humanoid/Events/ProfileLoadFinishedEvent.cs create mode 100644 Content.Shared/Medical/Surgery/Conditions/SurgeryCloseIncisionConditionComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Conditions/SurgeryLarvaConditionComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Conditions/SurgeryMarkingConditionComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Conditions/SurgeryOperatingTableConditionComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Conditions/SurgeryOrganConditionComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Conditions/SurgeryPartConditionComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Conditions/SurgeryPartPresentCondition.cs create mode 100644 Content.Shared/Medical/Surgery/Conditions/SurgeryPartRemovedConditionComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Conditions/SurgeryValidEvent.cs create mode 100644 Content.Shared/Medical/Surgery/Conditions/SurgeryWoundedConditionComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Effects/Complete/SurgeryCompletedEvent.cs create mode 100644 Content.Shared/Medical/Surgery/Effects/Complete/SurgeryRemoveLarvaComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Effects/Step/SurgeryDamageChangeEffectComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Effects/Step/SurgerySpecialDamageChangeEffectComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Effects/Step/SurgeryStepCavityEffectComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Effects/Step/SurgeryStepEmoteEffectComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Effects/Step/SurgeryStepSpawnEffect.cs create mode 100644 Content.Shared/Medical/Surgery/Effects/Step/SurgeryTendWoundsEffectComponent.cs create mode 100644 Content.Shared/Medical/Surgery/OperatingTableComponent.cs create mode 100644 Content.Shared/Medical/Surgery/SharedSurgerySystem.Steps.cs create mode 100644 Content.Shared/Medical/Surgery/SharedSurgerySystem.cs create mode 100644 Content.Shared/Medical/Surgery/StepInvalidReason.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/Parts/BleedersClampedComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/Parts/BodyPartReattachedComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/Parts/BodyPartSawedComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/Parts/IncisionOpenComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/Parts/InternalBleedersClampedComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/Parts/OrganReattachedComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/Parts/PartRemovedComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/Parts/RibcageOpenComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/Parts/RibcageSawedComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/Parts/SkinRetractedComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryAddMarkingStepComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryAddOrganStepComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryAddPartStepComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryAffixOrganStepComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryAffixPartStepComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryCanPerformStepEvent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryCutLarvaRootsStepComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryRemoveMarkingStepComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryRemoveOrganStepComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryRemovePartStepComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryRepeatableStepComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryStepCompleteCheckEvent.cs create mode 100644 Content.Shared/Medical/Surgery/Steps/SurgeryStepComponent.cs create mode 100644 Content.Shared/Medical/Surgery/SurgeryComponent.cs create mode 100644 Content.Shared/Medical/Surgery/SurgeryDoAfterEvent.cs create mode 100644 Content.Shared/Medical/Surgery/SurgerySpeedModifierComponent.cs create mode 100644 Content.Shared/Medical/Surgery/SurgeryStepDamageEvent.cs create mode 100644 Content.Shared/Medical/Surgery/SurgeryStepEvent.cs create mode 100644 Content.Shared/Medical/Surgery/SurgeryTargetComponent.cs create mode 100644 Content.Shared/Medical/Surgery/SurgeryUI.cs create mode 100644 Content.Shared/Medical/Surgery/SurgeryUiRefreshEvent.cs create mode 100644 Content.Shared/Medical/Surgery/Tools/BoneGelComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Tools/BoneSawComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Tools/BoneSetterComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Tools/CauteryComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Tools/HemostatComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Tools/ISurgeryToolComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Tools/RetractorComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Tools/ScalpelComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Tools/SurgeryToolComponent.cs create mode 100644 Content.Shared/Medical/Surgery/Tools/SurgicalDrillComponent.cs create mode 100644 Content.Shared/Targeting/Events.cs create mode 100644 Content.Shared/Targeting/SharedTargetingSystem.cs create mode 100644 Content.Shared/Targeting/TargetBodyPart.cs create mode 100644 Content.Shared/Targeting/TargetIntegrity.cs create mode 100644 Content.Shared/Targeting/TargetingComponent.cs create mode 100644 Resources/Audio/Medical/Surgery/attributions.yml create mode 100644 Resources/Audio/Medical/Surgery/cautery1.ogg create mode 100644 Resources/Audio/Medical/Surgery/cautery2.ogg create mode 100644 Resources/Audio/Medical/Surgery/hemostat1.ogg create mode 100644 Resources/Audio/Medical/Surgery/organ1.ogg create mode 100644 Resources/Audio/Medical/Surgery/organ2.ogg create mode 100644 Resources/Audio/Medical/Surgery/retractor1.ogg create mode 100644 Resources/Audio/Medical/Surgery/retractor2.ogg create mode 100644 Resources/Audio/Medical/Surgery/saw.ogg create mode 100644 Resources/Audio/Medical/Surgery/scalpel1.ogg create mode 100644 Resources/Audio/Medical/Surgery/scalpel2.ogg create mode 100644 Resources/Locale/en-US/surgery/surgery-ui.ftl create mode 100644 Resources/Prototypes/Body/Organs/felinid.yml create mode 100644 Resources/Prototypes/Entities/Surgery/surgeries.yml create mode 100644 Resources/Prototypes/Entities/Surgery/surgery_steps.yml create mode 100644 Resources/Prototypes/Species/misc.yml create mode 100644 Resources/ServerInfo/Guidebook/Medical/OrganManipulation.xml create mode 100644 Resources/ServerInfo/Guidebook/Medical/PartManipulation.xml create mode 100644 Resources/ServerInfo/Guidebook/Medical/Surgery.xml create mode 100644 Resources/ServerInfo/Guidebook/Medical/UtilitySurgeries.xml create mode 100644 Resources/Textures/Interface/Ashen/target_doll.png create mode 100644 Resources/Textures/Interface/Clockwork/target_doll.png create mode 100644 Resources/Textures/Interface/Default/target_doll.png create mode 100644 Resources/Textures/Interface/Minimalist/target_doll.png create mode 100644 Resources/Textures/Interface/Plasmafire/target_doll.png create mode 100644 Resources/Textures/Interface/Retro/target_doll.png create mode 100644 Resources/Textures/Interface/Slimecore/target_doll.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/eyes.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/eyes_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/groin.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/groin_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/head.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/head_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/leftarm.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/leftarm_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/leftfoot.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/leftfoot_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/lefthand.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/lefthand_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/leftleg.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/leftleg_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/mouth.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/mouth_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/rightarm.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/rightarm_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/rightfoot.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/rightfoot_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/righthand.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/righthand_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/rightleg.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/rightleg_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/torso.png create mode 100644 Resources/Textures/Interface/Targeting/Doll/torso_hover.png create mode 100644 Resources/Textures/Interface/Targeting/Status/groin.rsi/groin_0.png create mode 100644 Resources/Textures/Interface/Targeting/Status/groin.rsi/groin_1.png create mode 100644 Resources/Textures/Interface/Targeting/Status/groin.rsi/groin_2.png create mode 100644 Resources/Textures/Interface/Targeting/Status/groin.rsi/groin_3.png create mode 100644 Resources/Textures/Interface/Targeting/Status/groin.rsi/groin_4.png create mode 100644 Resources/Textures/Interface/Targeting/Status/groin.rsi/groin_5.png create mode 100644 Resources/Textures/Interface/Targeting/Status/groin.rsi/groin_6.png create mode 100644 Resources/Textures/Interface/Targeting/Status/groin.rsi/groin_7.png create mode 100644 Resources/Textures/Interface/Targeting/Status/groin.rsi/groin_8.png create mode 100644 Resources/Textures/Interface/Targeting/Status/groin.rsi/meta.json create mode 100644 Resources/Textures/Interface/Targeting/Status/head.rsi/head_0.png create mode 100644 Resources/Textures/Interface/Targeting/Status/head.rsi/head_1.png create mode 100644 Resources/Textures/Interface/Targeting/Status/head.rsi/head_2.png create mode 100644 Resources/Textures/Interface/Targeting/Status/head.rsi/head_3.png create mode 100644 Resources/Textures/Interface/Targeting/Status/head.rsi/head_4.png create mode 100644 Resources/Textures/Interface/Targeting/Status/head.rsi/head_5.png create mode 100644 Resources/Textures/Interface/Targeting/Status/head.rsi/head_6.png create mode 100644 Resources/Textures/Interface/Targeting/Status/head.rsi/head_7.png create mode 100644 Resources/Textures/Interface/Targeting/Status/head.rsi/head_8.png create mode 100644 Resources/Textures/Interface/Targeting/Status/head.rsi/meta.json create mode 100644 Resources/Textures/Interface/Targeting/Status/leftarm.rsi/leftarm_0.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftarm.rsi/leftarm_1.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftarm.rsi/leftarm_2.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftarm.rsi/leftarm_3.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftarm.rsi/leftarm_4.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftarm.rsi/leftarm_5.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftarm.rsi/leftarm_6.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftarm.rsi/leftarm_7.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftarm.rsi/leftarm_8.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftarm.rsi/meta.json create mode 100644 Resources/Textures/Interface/Targeting/Status/leftfoot.rsi/leftfoot_0.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftfoot.rsi/leftfoot_1.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftfoot.rsi/leftfoot_2.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftfoot.rsi/leftfoot_3.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftfoot.rsi/leftfoot_4.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftfoot.rsi/leftfoot_5.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftfoot.rsi/leftfoot_6.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftfoot.rsi/leftfoot_7.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftfoot.rsi/leftfoot_8.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftfoot.rsi/meta.json create mode 100644 Resources/Textures/Interface/Targeting/Status/lefthand.rsi/lefthand_0.png create mode 100644 Resources/Textures/Interface/Targeting/Status/lefthand.rsi/lefthand_1.png create mode 100644 Resources/Textures/Interface/Targeting/Status/lefthand.rsi/lefthand_2.png create mode 100644 Resources/Textures/Interface/Targeting/Status/lefthand.rsi/lefthand_3.png create mode 100644 Resources/Textures/Interface/Targeting/Status/lefthand.rsi/lefthand_4.png create mode 100644 Resources/Textures/Interface/Targeting/Status/lefthand.rsi/lefthand_5.png create mode 100644 Resources/Textures/Interface/Targeting/Status/lefthand.rsi/lefthand_6.png create mode 100644 Resources/Textures/Interface/Targeting/Status/lefthand.rsi/lefthand_7.png create mode 100644 Resources/Textures/Interface/Targeting/Status/lefthand.rsi/lefthand_8.png create mode 100644 Resources/Textures/Interface/Targeting/Status/lefthand.rsi/meta.json create mode 100644 Resources/Textures/Interface/Targeting/Status/leftleg.rsi/leftleg_0.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftleg.rsi/leftleg_1.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftleg.rsi/leftleg_2.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftleg.rsi/leftleg_3.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftleg.rsi/leftleg_4.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftleg.rsi/leftleg_5.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftleg.rsi/leftleg_6.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftleg.rsi/leftleg_7.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftleg.rsi/leftleg_8.png create mode 100644 Resources/Textures/Interface/Targeting/Status/leftleg.rsi/meta.json create mode 100644 Resources/Textures/Interface/Targeting/Status/rightarm.rsi/meta.json create mode 100644 Resources/Textures/Interface/Targeting/Status/rightarm.rsi/rightarm_0.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightarm.rsi/rightarm_1.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightarm.rsi/rightarm_2.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightarm.rsi/rightarm_3.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightarm.rsi/rightarm_4.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightarm.rsi/rightarm_5.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightarm.rsi/rightarm_6.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightarm.rsi/rightarm_7.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightarm.rsi/rightarm_8.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightfoot.rsi/meta.json create mode 100644 Resources/Textures/Interface/Targeting/Status/rightfoot.rsi/rightfoot_0.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightfoot.rsi/rightfoot_1.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightfoot.rsi/rightfoot_2.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightfoot.rsi/rightfoot_3.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightfoot.rsi/rightfoot_4.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightfoot.rsi/rightfoot_5.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightfoot.rsi/rightfoot_6.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightfoot.rsi/rightfoot_7.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightfoot.rsi/rightfoot_8.png create mode 100644 Resources/Textures/Interface/Targeting/Status/righthand.rsi/meta.json create mode 100644 Resources/Textures/Interface/Targeting/Status/righthand.rsi/righthand_0.png create mode 100644 Resources/Textures/Interface/Targeting/Status/righthand.rsi/righthand_1.png create mode 100644 Resources/Textures/Interface/Targeting/Status/righthand.rsi/righthand_2.png create mode 100644 Resources/Textures/Interface/Targeting/Status/righthand.rsi/righthand_3.png create mode 100644 Resources/Textures/Interface/Targeting/Status/righthand.rsi/righthand_4.png create mode 100644 Resources/Textures/Interface/Targeting/Status/righthand.rsi/righthand_5.png create mode 100644 Resources/Textures/Interface/Targeting/Status/righthand.rsi/righthand_6.png create mode 100644 Resources/Textures/Interface/Targeting/Status/righthand.rsi/righthand_7.png create mode 100644 Resources/Textures/Interface/Targeting/Status/righthand.rsi/righthand_8.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightleg.rsi/meta.json create mode 100644 Resources/Textures/Interface/Targeting/Status/rightleg.rsi/rightleg_0.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightleg.rsi/rightleg_1.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightleg.rsi/rightleg_2.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightleg.rsi/rightleg_3.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightleg.rsi/rightleg_4.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightleg.rsi/rightleg_5.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightleg.rsi/rightleg_6.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightleg.rsi/rightleg_7.png create mode 100644 Resources/Textures/Interface/Targeting/Status/rightleg.rsi/rightleg_8.png create mode 100644 Resources/Textures/Interface/Targeting/Status/torso.rsi/meta.json create mode 100644 Resources/Textures/Interface/Targeting/Status/torso.rsi/torso_0.png create mode 100644 Resources/Textures/Interface/Targeting/Status/torso.rsi/torso_1.png create mode 100644 Resources/Textures/Interface/Targeting/Status/torso.rsi/torso_2.png create mode 100644 Resources/Textures/Interface/Targeting/Status/torso.rsi/torso_3.png create mode 100644 Resources/Textures/Interface/Targeting/Status/torso.rsi/torso_4.png create mode 100644 Resources/Textures/Interface/Targeting/Status/torso.rsi/torso_5.png create mode 100644 Resources/Textures/Interface/Targeting/Status/torso.rsi/torso_6.png create mode 100644 Resources/Textures/Interface/Targeting/Status/torso.rsi/torso_7.png create mode 100644 Resources/Textures/Interface/Targeting/Status/torso.rsi/torso_8.png create mode 100644 Resources/Textures/Mobs/Species/Misc/Pizza/parts.rsi/l_arm.png create mode 100644 Resources/Textures/Mobs/Species/Misc/Pizza/parts.rsi/meta.json create mode 100644 Resources/Textures/Mobs/Species/Misc/Pizza/parts.rsi/r_arm.png create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/bone_gel.rsi/bone-gel.png create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/bone_gel.rsi/bone-gel_0.png create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/bone_gel.rsi/bone-gel_25.png create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/bone_gel.rsi/bone-gel_50.png create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/bone_gel.rsi/bone-gel_75.png create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/bone_gel.rsi/meta.json create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/bone_gel.rsi/predator_bone-gel.png create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/bonesetter.rsi/bonesetter.png create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/bonesetter.rsi/meta.json create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/bonesetter.rsi/predator_bonesetter.png create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/manipulation.rsi/insertion.png create mode 100644 Resources/Textures/Objects/Specific/Medical/Surgery/manipulation.rsi/meta.json create mode 100644 Resources/Textures/Structures/Machines/limbgrower.rsi/limbgrower_fill.png create mode 100644 Resources/Textures/Structures/Machines/limbgrower.rsi/limbgrower_idleoff.png create mode 100644 Resources/Textures/Structures/Machines/limbgrower.rsi/limbgrower_idleon.png create mode 100644 Resources/Textures/Structures/Machines/limbgrower.rsi/limbgrower_openpanel.png create mode 100644 Resources/Textures/Structures/Machines/limbgrower.rsi/limbgrower_panelopen.png create mode 100644 Resources/Textures/Structures/Machines/limbgrower.rsi/limbgrower_unfill.png create mode 100644 Resources/Textures/Structures/Machines/limbgrower.rsi/meta.json diff --git a/Content.Client/Body/Components/BrainComponent.cs b/Content.Client/Body/Components/BrainComponent.cs new file mode 100644 index 00000000000..5ef9cea9901 --- /dev/null +++ b/Content.Client/Body/Components/BrainComponent.cs @@ -0,0 +1,3 @@ +namespace Content.Client.Body.Components; +[RegisterComponent] +public sealed partial class BrainComponent : Component { } diff --git a/Content.Client/Body/Components/LungComponent.cs b/Content.Client/Body/Components/LungComponent.cs new file mode 100644 index 00000000000..71a19323b87 --- /dev/null +++ b/Content.Client/Body/Components/LungComponent.cs @@ -0,0 +1,3 @@ +namespace Content.Client.Body.Components; +[RegisterComponent] +public sealed partial class LungComponent : Component { } diff --git a/Content.Client/Body/Components/StomachComponent.cs b/Content.Client/Body/Components/StomachComponent.cs new file mode 100644 index 00000000000..fbc06ac7d75 --- /dev/null +++ b/Content.Client/Body/Components/StomachComponent.cs @@ -0,0 +1,3 @@ +namespace Content.Client.Body.Components; +[RegisterComponent] +public sealed partial class StomachComponent : Component { } diff --git a/Content.Client/Body/Systems/BodySystem.cs b/Content.Client/Body/Systems/BodySystem.cs index bab785525b0..10dc057a8fd 100644 --- a/Content.Client/Body/Systems/BodySystem.cs +++ b/Content.Client/Body/Systems/BodySystem.cs @@ -1,7 +1,72 @@ using Content.Shared.Body.Systems; +using Content.Shared.Body.Part; +using Content.Shared.Humanoid; +using Content.Shared.Humanoid.Markings; +using Robust.Client.GameObjects; +using Robust.Shared.Utility; +using Content.Shared.Body.Components; namespace Content.Client.Body.Systems; public sealed class BodySystem : SharedBodySystem { + [Dependency] private readonly MarkingManager _markingManager = default!; + + private void ApplyMarkingToPart(MarkingPrototype markingPrototype, + IReadOnlyList? colors, + bool visible, + SpriteComponent sprite) + { + for (var j = 0; j < markingPrototype.Sprites.Count; j++) + { + var markingSprite = markingPrototype.Sprites[j]; + + if (markingSprite is not SpriteSpecifier.Rsi rsi) + continue; + + var layerId = $"{markingPrototype.ID}-{rsi.RsiState}"; + + if (!sprite.LayerMapTryGet(layerId, out _)) + { + var layer = sprite.AddLayer(markingSprite, j + 1); + sprite.LayerMapSet(layerId, layer); + sprite.LayerSetSprite(layerId, rsi); + } + + sprite.LayerSetVisible(layerId, visible); + + if (!visible) + continue; + + // Okay so if the marking prototype is modified but we load old marking data this may no longer be valid + // and we need to check the index is correct. So if that happens just default to white? + if (colors != null && j < colors.Count) + sprite.LayerSetColor(layerId, colors[j]); + else + sprite.LayerSetColor(layerId, Color.White); + } + } + + protected override void ApplyPartMarkings(EntityUid target, BodyPartAppearanceComponent component) + { + if (!TryComp(target, out SpriteComponent? sprite)) + return; + + if (component.Color != null) + sprite.Color = component.Color.Value; + + foreach (var (visualLayer, markingList) in component.Markings) + foreach (var marking in markingList) + { + if (!_markingManager.TryGetMarking(marking, out var markingPrototype)) + continue; + + ApplyMarkingToPart(markingPrototype, marking.MarkingColors, marking.Visible, sprite); + } + } + + protected override void RemoveBodyMarkings(EntityUid target, BodyPartAppearanceComponent partAppearance, HumanoidAppearanceComponent bodyAppearance) + { + return; + } } diff --git a/Content.Client/Hands/Systems/HandsSystem.cs b/Content.Client/Hands/Systems/HandsSystem.cs index 7319b97b42b..7ea3b69de57 100644 --- a/Content.Client/Hands/Systems/HandsSystem.cs +++ b/Content.Client/Hands/Systems/HandsSystem.cs @@ -3,6 +3,7 @@ using Content.Client.Examine; using Content.Client.Strip; using Content.Client.Verbs.UI; +using Content.Shared.Body.Part; using Content.Shared.Hands; using Content.Shared.Hands.Components; using Content.Shared.Hands.EntitySystems; @@ -38,7 +39,6 @@ public sealed class HandsSystem : SharedHandsSystem public event Action? OnPlayerItemRemoved; public event Action? OnPlayerHandBlocked; public event Action? OnPlayerHandUnblocked; - public override void Initialize() { base.Initialize(); @@ -49,6 +49,8 @@ public override void Initialize() SubscribeLocalEvent(OnHandsShutdown); SubscribeLocalEvent(HandleComponentState); SubscribeLocalEvent(OnVisualsChanged); + SubscribeLocalEvent(HandleBodyPartRemoved); + SubscribeLocalEvent(HandleBodyPartDisabled); OnHandSetActive += OnHandActivated; } @@ -236,8 +238,38 @@ public void UIHandAltActivateItem(string handName) RaisePredictiveEvent(new RequestHandAltInteractEvent(handName)); } + #region pulling + + #endregion + #region visuals + private void HideLayers(EntityUid uid, HandsComponent component, Entity part, SpriteComponent? sprite = null) + { + if (part.Comp.PartType != BodyPartType.Hand || !Resolve(uid, ref sprite, logMissing: false)) + return; + + var location = part.Comp.Symmetry switch + { + BodyPartSymmetry.None => HandLocation.Middle, + BodyPartSymmetry.Left => HandLocation.Left, + BodyPartSymmetry.Right => HandLocation.Right, + _ => throw new ArgumentOutOfRangeException(nameof(part.Comp.Symmetry)) + }; + + if (component.RevealedLayers.TryGetValue(location, out var revealedLayers)) + { + foreach (var key in revealedLayers) + sprite.RemoveLayer(key); + + revealedLayers.Clear(); + } + } + + private void HandleBodyPartRemoved(EntityUid uid, HandsComponent component, ref BodyPartRemovedEvent args) => HideLayers(uid, component, args.Part); + + private void HandleBodyPartDisabled(EntityUid uid, HandsComponent component, ref BodyPartDisabledEvent args) => HideLayers(uid, component, args.Part); + protected override void HandleEntityInserted(EntityUid uid, HandsComponent hands, EntInsertedIntoContainerMessage args) { base.HandleEntityInserted(uid, hands, args); @@ -262,6 +294,7 @@ protected override void HandleEntityRemoved(EntityUid uid, HandsComponent hands, if (!hands.Hands.TryGetValue(args.Container.ID, out var hand)) return; + UpdateHandVisuals(uid, args.Entity, hand); _stripSys.UpdateUi(uid); diff --git a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerBoundUserInterface.cs b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerBoundUserInterface.cs index dc0a3e9fccd..39bb52d72c0 100644 --- a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerBoundUserInterface.cs +++ b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerBoundUserInterface.cs @@ -1,4 +1,5 @@ using Content.Shared.MedicalScanner; +using Content.Shared.Targeting; using JetBrains.Annotations; using Robust.Client.GameObjects; @@ -22,6 +23,7 @@ protected override void Open() Title = EntMan.GetComponent(Owner).EntityName, }; _window.OnClose += Close; + _window.OnBodyPartSelected += SendBodyPartMessage; _window.OpenCentered(); } @@ -36,6 +38,8 @@ protected override void ReceiveMessage(BoundUserInterfaceMessage message) _window.Populate(cast); } + private void SendBodyPartMessage(TargetBodyPart? part, EntityUid target) => SendMessage(new HealthAnalyzerPartMessage(EntMan.GetNetEntity(target), part ?? null)); + protected override void Dispose(bool disposing) { base.Dispose(disposing); @@ -43,7 +47,10 @@ protected override void Dispose(bool disposing) return; if (_window != null) + { _window.OnClose -= Close; + _window.OnBodyPartSelected -= SendBodyPartMessage; + } _window?.Dispose(); } diff --git a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml index e070af95d82..0a0b5ac89e7 100644 --- a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml +++ b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml @@ -2,7 +2,7 @@ xmlns="https://spacestation14.io" xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" MaxHeight="525" - MinWidth="300"> + MinWidth="350">