From ee599b6dba47382d3a6eddbb321874e5080f4b4a Mon Sep 17 00:00:00 2001 From: gluesniffler Date: Tue, 12 Nov 2024 01:16:58 -0400 Subject: [PATCH] Megasquached Surgery Updates Megasquached Surgery Updates Quick patch to see if tests shut up Please do not cherrypick this one yet. Refactored body parts to use damageablecomponent newmed health analyzer real, also refactors and some bugfixes --- Content.Client/Backmen/Body/BodySystem.cs | 2 +- Content.Client/Backmen/Surgery/SurgeryBui.cs | 2 - .../Backmen/Targeting/TargetingSystem.cs | 8 + .../PartStatus/Widgets/PartStatusControl.xaml | 22 +- .../Widgets/PartStatusControl.xaml.cs | 7 +- .../Targeting/TargetingUIController.cs | 26 +- .../Targeting/Widgets/TargetingControl.xaml | 252 ++++++++++++--- .../Widgets/TargetingControl.xaml.cs | 47 +-- Content.Client/Hands/Systems/HandsSystem.cs | 22 +- Content.Client/Stylesheets/StyleNano.cs | 55 ++++ .../Screens/DefaultGameScreen.xaml.cs | 2 +- .../Screens/SeparatedChatGameScreen.xaml.cs | 2 +- .../Backmen/Surgery/SurgerySystem.cs | 54 +--- .../Backmen/Targeting/TargetingSystem.cs | 2 + Content.Server/Body/Systems/BodySystem.cs | 11 +- Content.Server/Body/Systems/BrainSystem.cs | 25 +- .../Body/Systems/RespiratorSystem.cs | 4 +- .../EntityEffects/Effects/HealthChange.cs | 2 +- .../Components/HealthAnalyzerComponent.cs | 6 + Content.Server/Medical/HealingSystem.cs | 42 +-- .../Standing/SharedLayingDownSystem.cs | 2 +- .../Body/BodyPartAppearanceComponent.cs | 2 - .../Surgery/Body/DebrainedComponent.cs | 7 + .../Surgery/Body/Organs/EarsComponent.cs | 6 + .../Body/{ => Organs}/EyesComponent.cs | 2 +- .../Body/{ => Organs}/HeartComponent.cs | 2 +- .../Body/{ => Organs}/LiverComponent.cs | 2 +- .../Body/Organs/MarkingContainerComponent.cs | 15 + .../Body/SharedBodySystem.PartAppearance.cs | 77 +++-- ...grity.cs => SharedBodySystem.Targeting.cs} | 288 ++++++++++++------ .../SurgeryMarkingConditionComponent.cs | 27 ++ .../SurgeryDamageChangeEffectComponent.cs | 4 +- .../SurgeryStepAffixPartEffectComponent.cs | 6 - .../Step/SurgeryStepCavityEffectComponent.cs | 4 +- .../Step/SurgeryStepEmoteEffectComponent.cs | 4 +- .../Effects/Step/SurgeryStepSpawnEffect.cs | 4 +- .../Step/SurgeryTendWoundsEffectComponent.cs | 4 +- .../Surgery/SharedSurgerySystem.Steps.cs | 197 ++++++++++-- .../Backmen/Surgery/SharedSurgerySystem.cs | 46 ++- .../Steps/SurgeryAddMarkingStepComponent.cs | 34 +++ .../Steps/SurgeryAffixOrganStepComponent.cs | 6 + .../Steps/SurgeryAffixPartStepComponent.cs | 6 + .../SurgeryRemoveMarkingStepComponent.cs | 29 ++ .../Targeting/SharedTargetingSystem.cs | 5 + .../Backmen/Targeting/TargetBodyPart.cs | 20 +- .../Backmen/Targeting/TargetingComponent.cs | 22 +- Content.Shared/Body/Organ/TailComponent.cs | 6 + Content.Shared/Body/Part/BodyPartComponent.cs | 76 ++--- .../Body/Systems/SharedBodySystem.Body.cs | 62 +--- .../Body/Systems/SharedBodySystem.Parts.cs | 14 +- .../Damage/Systems/DamageableSystem.cs | 142 ++------- .../Humanoid/HumanoidVisualLayersExtension.cs | 12 + .../Systems/MobStateSystem.StateMachine.cs | 6 +- Resources/Locale/en-US/surgery/surgery-ui.ftl | 1 + Resources/Prototypes/Body/Organs/felinid.yml | 24 ++ Resources/Prototypes/Body/Organs/human.yml | 1 + Resources/Prototypes/Body/Parts/animal.yml | 2 +- Resources/Prototypes/Body/Parts/base.yml | 4 +- Resources/Prototypes/Body/Parts/skeleton.yml | 2 +- Resources/Prototypes/Body/Parts/vox.yml | 2 +- Resources/Prototypes/Damage/modifier_sets.yml | 11 + .../Entities/Mobs/Player/silicon_base.yml | 4 + .../Entities/Mobs/Species/slime.yml | 2 + .../_Backmen/Body/Parts/shadowkin.yml | 4 +- .../Prototypes/_Backmen/Damage/containers.yml | 15 +- .../_Backmen/Damage/modifier_sets.yml | 12 + .../_Backmen/Entities/Surgery/surgeries.yml | 78 ++++- .../Entities/Surgery/surgery_steps.yml | 103 ++++++- .../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 +++ .../Status/leftarm.rsi/leftarm_0.png | Bin 129 -> 144 bytes .../Status/leftarm.rsi/leftarm_1.png | Bin 129 -> 144 bytes .../Status/leftarm.rsi/leftarm_2.png | Bin 129 -> 144 bytes .../Status/leftarm.rsi/leftarm_3.png | Bin 129 -> 144 bytes .../Status/leftarm.rsi/leftarm_4.png | Bin 129 -> 144 bytes .../Status/leftarm.rsi/leftarm_5.png | Bin 129 -> 144 bytes .../Status/leftarm.rsi/leftarm_6.png | Bin 129 -> 144 bytes .../Status/leftarm.rsi/leftarm_7.png | Bin 129 -> 144 bytes .../Status/leftarm.rsi/leftarm_8.png | Bin 145 -> 154 bytes .../Targeting/Status/leftarm.rsi/meta.json | 2 +- .../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 126 -> 141 bytes .../Status/leftleg.rsi/leftleg_1.png | Bin 126 -> 141 bytes .../Status/leftleg.rsi/leftleg_2.png | Bin 126 -> 141 bytes .../Status/leftleg.rsi/leftleg_3.png | Bin 126 -> 141 bytes .../Status/leftleg.rsi/leftleg_4.png | Bin 126 -> 141 bytes .../Status/leftleg.rsi/leftleg_5.png | Bin 126 -> 141 bytes .../Status/leftleg.rsi/leftleg_6.png | Bin 126 -> 141 bytes .../Status/leftleg.rsi/leftleg_7.png | Bin 126 -> 141 bytes .../Status/leftleg.rsi/leftleg_8.png | Bin 153 -> 170 bytes .../Targeting/Status/leftleg.rsi/meta.json | 2 +- .../Targeting/Status/rightarm.rsi/meta.json | 2 +- .../Status/rightarm.rsi/rightarm_0.png | Bin 129 -> 147 bytes .../Status/rightarm.rsi/rightarm_1.png | Bin 129 -> 147 bytes .../Status/rightarm.rsi/rightarm_2.png | Bin 129 -> 147 bytes .../Status/rightarm.rsi/rightarm_3.png | Bin 129 -> 147 bytes .../Status/rightarm.rsi/rightarm_4.png | Bin 129 -> 147 bytes .../Status/rightarm.rsi/rightarm_5.png | Bin 129 -> 147 bytes .../Status/rightarm.rsi/rightarm_6.png | Bin 129 -> 147 bytes .../Status/rightarm.rsi/rightarm_7.png | Bin 129 -> 147 bytes .../Status/rightarm.rsi/rightarm_8.png | Bin 146 -> 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 | 2 +- .../Status/rightleg.rsi/rightleg_0.png | Bin 126 -> 178 bytes .../Status/rightleg.rsi/rightleg_1.png | Bin 126 -> 141 bytes .../Status/rightleg.rsi/rightleg_2.png | Bin 126 -> 141 bytes .../Status/rightleg.rsi/rightleg_3.png | Bin 126 -> 141 bytes .../Status/rightleg.rsi/rightleg_4.png | Bin 126 -> 141 bytes .../Status/rightleg.rsi/rightleg_5.png | Bin 126 -> 141 bytes .../Status/rightleg.rsi/rightleg_6.png | Bin 126 -> 141 bytes .../Status/rightleg.rsi/rightleg_7.png | Bin 126 -> 141 bytes .../Status/rightleg.rsi/rightleg_8.png | Bin 153 -> 166 bytes .../Targeting/Status/torso.rsi/meta.json | 2 +- .../Targeting/Status/torso.rsi/torso_0.png | Bin 155 -> 160 bytes .../Targeting/Status/torso.rsi/torso_1.png | Bin 155 -> 160 bytes .../Targeting/Status/torso.rsi/torso_2.png | Bin 155 -> 160 bytes .../Targeting/Status/torso.rsi/torso_3.png | Bin 155 -> 160 bytes .../Targeting/Status/torso.rsi/torso_4.png | Bin 155 -> 160 bytes .../Targeting/Status/torso.rsi/torso_5.png | Bin 155 -> 160 bytes .../Targeting/Status/torso.rsi/torso_6.png | Bin 155 -> 160 bytes .../Targeting/Status/torso.rsi/torso_7.png | Bin 155 -> 160 bytes .../Targeting/Status/torso.rsi/torso_8.png | Bin 180 -> 186 bytes .../Textures/Interface/Targeting/doll.png | Bin 876 -> 0 bytes 202 files changed, 1563 insertions(+), 634 deletions(-) create mode 100644 Content.Shared/Backmen/Surgery/Body/DebrainedComponent.cs create mode 100644 Content.Shared/Backmen/Surgery/Body/Organs/EarsComponent.cs rename Content.Shared/Backmen/Surgery/Body/{ => Organs}/EyesComponent.cs (66%) rename Content.Shared/Backmen/Surgery/Body/{ => Organs}/HeartComponent.cs (67%) rename Content.Shared/Backmen/Surgery/Body/{ => Organs}/LiverComponent.cs (67%) create mode 100644 Content.Shared/Backmen/Surgery/Body/Organs/MarkingContainerComponent.cs rename Content.Shared/Backmen/Surgery/Body/{SharedBodySystem.Integrity.cs => SharedBodySystem.Targeting.cs} (52%) create mode 100644 Content.Shared/Backmen/Surgery/Conditions/SurgeryMarkingConditionComponent.cs delete mode 100644 Content.Shared/Backmen/Surgery/Effects/Step/SurgeryStepAffixPartEffectComponent.cs create mode 100644 Content.Shared/Backmen/Surgery/Steps/SurgeryAddMarkingStepComponent.cs create mode 100644 Content.Shared/Backmen/Surgery/Steps/SurgeryAffixOrganStepComponent.cs create mode 100644 Content.Shared/Backmen/Surgery/Steps/SurgeryAffixPartStepComponent.cs create mode 100644 Content.Shared/Backmen/Surgery/Steps/SurgeryRemoveMarkingStepComponent.cs create mode 100644 Content.Shared/Body/Organ/TailComponent.cs create mode 100644 Resources/Prototypes/Body/Organs/felinid.yml 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/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/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 delete mode 100644 Resources/Textures/Interface/Targeting/doll.png diff --git a/Content.Client/Backmen/Body/BodySystem.cs b/Content.Client/Backmen/Body/BodySystem.cs index bee569c1011..41117d7fdc2 100644 --- a/Content.Client/Backmen/Body/BodySystem.cs +++ b/Content.Client/Backmen/Body/BodySystem.cs @@ -76,7 +76,7 @@ protected override void ApplyPartMarkings(EntityUid target, BodyPartAppearanceCo } } - protected override void RemovePartMarkings(EntityUid target, BodyPartAppearanceComponent partAppearance, HumanoidAppearanceComponent bodyAppearance) + protected override void RemoveBodyMarkings(EntityUid target, BodyPartAppearanceComponent partAppearance, HumanoidAppearanceComponent bodyAppearance) { return; } diff --git a/Content.Client/Backmen/Surgery/SurgeryBui.cs b/Content.Client/Backmen/Surgery/SurgeryBui.cs index 31389d31f13..bfdd3d5295a 100644 --- a/Content.Client/Backmen/Surgery/SurgeryBui.cs +++ b/Content.Client/Backmen/Surgery/SurgeryBui.cs @@ -33,8 +33,6 @@ public sealed class SurgeryBui : BoundUserInterface private bool _isBody = false; private (EntityUid Ent, EntProtoId Proto)? _surgery; private readonly List _previousSurgeries = new(); - private DateTime _lastRefresh = DateTime.UtcNow; - private (string handName, EntityUid item) _throttling = ("", new EntityUid()); public SurgeryBui(EntityUid owner, Enum uiKey) : base(owner, uiKey) { _system = _entities.System(); diff --git a/Content.Client/Backmen/Targeting/TargetingSystem.cs b/Content.Client/Backmen/Targeting/TargetingSystem.cs index 7be8c61bef8..5f476cd46b9 100644 --- a/Content.Client/Backmen/Targeting/TargetingSystem.cs +++ b/Content.Client/Backmen/Targeting/TargetingSystem.cs @@ -31,12 +31,20 @@ public override void Initialize() InputCmdHandler.FromDelegate((session) => HandleTargetChange(session, TargetBodyPart.Torso))) .Bind(ContentKeyFunctions.TargetLeftArm, InputCmdHandler.FromDelegate((session) => HandleTargetChange(session, TargetBodyPart.LeftArm))) +/* .Bind(ContentKeyFunctions.TargetLeftHand, + InputCmdHandler.FromDelegate((session) => HandleTargetChange(session, TargetBodyPart.LeftHand))) SOON :TM: */ .Bind(ContentKeyFunctions.TargetRightArm, InputCmdHandler.FromDelegate((session) => HandleTargetChange(session, TargetBodyPart.RightArm))) +/* .Bind(ContentKeyFunctions.TargetRightHand, + InputCmdHandler.FromDelegate((session) => HandleTargetChange(session, TargetBodyPart.RightHand)))*/ .Bind(ContentKeyFunctions.TargetLeftLeg, InputCmdHandler.FromDelegate((session) => HandleTargetChange(session, TargetBodyPart.LeftLeg))) +/* .Bind(ContentKeyFunctions.TargetLeftFoot, + InputCmdHandler.FromDelegate((session) => HandleTargetChange(session, TargetBodyPart.LeftFoot)))*/ .Bind(ContentKeyFunctions.TargetRightLeg, InputCmdHandler.FromDelegate((session) => HandleTargetChange(session, TargetBodyPart.RightLeg))) +/* .Bind(ContentKeyFunctions.TargetRightFoot, + InputCmdHandler.FromDelegate((session) => HandleTargetChange(session, TargetBodyPart.RightFoot)))*/ .Register(); } diff --git a/Content.Client/Backmen/UserInterface/Systems/PartStatus/Widgets/PartStatusControl.xaml b/Content.Client/Backmen/UserInterface/Systems/PartStatus/Widgets/PartStatusControl.xaml index 90461b31a93..6cb13deaa66 100644 --- a/Content.Client/Backmen/UserInterface/Systems/PartStatus/Widgets/PartStatusControl.xaml +++ b/Content.Client/Backmen/UserInterface/Systems/PartStatus/Widgets/PartStatusControl.xaml @@ -12,26 +12,46 @@ Name="DollHead" Stretch="KeepAspectCentered" SetSize="64 64"/> + + + + + diff --git a/Content.Client/Backmen/UserInterface/Systems/PartStatus/Widgets/PartStatusControl.xaml.cs b/Content.Client/Backmen/UserInterface/Systems/PartStatus/Widgets/PartStatusControl.xaml.cs index 70c67865f74..27af41d866f 100644 --- a/Content.Client/Backmen/UserInterface/Systems/PartStatus/Widgets/PartStatusControl.xaml.cs +++ b/Content.Client/Backmen/UserInterface/Systems/PartStatus/Widgets/PartStatusControl.xaml.cs @@ -20,10 +20,15 @@ public PartStatusControl() { { TargetBodyPart.Head, DollHead }, { TargetBodyPart.Torso, DollTorso }, + { TargetBodyPart.Groin, DollGroin }, { TargetBodyPart.LeftArm, DollLeftArm }, + { TargetBodyPart.LeftHand, DollLeftHand }, { TargetBodyPart.RightArm, DollRightArm }, + { TargetBodyPart.RightHand, DollRightHand }, { TargetBodyPart.LeftLeg, DollLeftLeg }, - { TargetBodyPart.RightLeg, DollRightLeg } + { TargetBodyPart.LeftFoot, DollLeftFoot }, + { TargetBodyPart.RightLeg, DollRightLeg }, + { TargetBodyPart.RightFoot, DollRightFoot } }; } diff --git a/Content.Client/Backmen/UserInterface/Systems/Targeting/TargetingUIController.cs b/Content.Client/Backmen/UserInterface/Systems/Targeting/TargetingUIController.cs index 4ccf46fb6da..1e767706a2f 100644 --- a/Content.Client/Backmen/UserInterface/Systems/Targeting/TargetingUIController.cs +++ b/Content.Client/Backmen/UserInterface/Systems/Targeting/TargetingUIController.cs @@ -32,13 +32,13 @@ public void OnSystemUnloaded(TargetingSystem system) public void OnStateEntered(GameplayState state) { - if (TargetingControl != null) - { - TargetingControl.SetVisible(_targetingComponent != null); + if (TargetingControl == null) + return; - if (_targetingComponent != null) - TargetingControl.SetColors(_targetingComponent.Target); - } + TargetingControl.SetTargetDollVisible(_targetingComponent != null); + + if (_targetingComponent != null) + TargetingControl.SetBodyPartsVisible(_targetingComponent.Target); } public void AddTargetingControl(TargetingComponent component) @@ -47,10 +47,10 @@ public void AddTargetingControl(TargetingComponent component) if (TargetingControl != null) { - TargetingControl.SetVisible(_targetingComponent != null); + TargetingControl.SetTargetDollVisible(_targetingComponent != null); if (_targetingComponent != null) - TargetingControl.SetColors(_targetingComponent.Target); + TargetingControl.SetBodyPartsVisible(_targetingComponent.Target); } } @@ -58,7 +58,7 @@ public void AddTargetingControl(TargetingComponent component) public void RemoveTargetingControl() { if (TargetingControl != null) - TargetingControl.SetVisible(false); + TargetingControl.SetTargetDollVisible(false); _targetingComponent = null; } @@ -66,8 +66,8 @@ public void RemoveTargetingControl() public void CycleTarget(TargetBodyPart bodyPart) { if (_playerManager.LocalEntity is not { } user - || _entManager.GetComponent(user) is not { } targetingComponent - || TargetingControl == null) + || _entManager.GetComponent(user) is not { } targetingComponent + || TargetingControl == null) return; var player = _entManager.GetNetEntity(user); @@ -75,9 +75,7 @@ public void CycleTarget(TargetBodyPart bodyPart) { var msg = new TargetChangeEvent(player, bodyPart); _net.SendSystemNetworkMessage(msg); - TargetingControl?.SetColors(bodyPart); + TargetingControl?.SetBodyPartsVisible(bodyPart); } } - - } diff --git a/Content.Client/Backmen/UserInterface/Systems/Targeting/Widgets/TargetingControl.xaml b/Content.Client/Backmen/UserInterface/Systems/Targeting/Widgets/TargetingControl.xaml index 8be5992e5db..afd36901354 100644 --- a/Content.Client/Backmen/UserInterface/Systems/Targeting/Widgets/TargetingControl.xaml +++ b/Content.Client/Backmen/UserInterface/Systems/Targeting/Widgets/TargetingControl.xaml @@ -4,63 +4,215 @@ xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" xmlns:widgets="clr-namespace:Content.Client.Backmen.UserInterface.Systems.Targeting.Widgets" Name="TargetingButton" + VerticalExpand="True" VerticalAlignment="Bottom" HorizontalAlignment="Right"> - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - + + - - - - - - + + + + + - - - - - - - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + diff --git a/Content.Client/Backmen/UserInterface/Systems/Targeting/Widgets/TargetingControl.xaml.cs b/Content.Client/Backmen/UserInterface/Systems/Targeting/Widgets/TargetingControl.xaml.cs index 19df6fc1b06..ecef150f9b4 100644 --- a/Content.Client/Backmen/UserInterface/Systems/Targeting/Widgets/TargetingControl.xaml.cs +++ b/Content.Client/Backmen/UserInterface/Systems/Targeting/Widgets/TargetingControl.xaml.cs @@ -11,27 +11,35 @@ namespace Content.Client.Backmen.UserInterface.Systems.Targeting.Widgets; public sealed partial class TargetingControl : UIWidget { private readonly TargetingUIController _controller; - private readonly Dictionary _bodyPartControls; + private readonly Dictionary _bodyPartControls; public TargetingControl() { RobustXamlLoader.Load(this); _controller = UserInterfaceManager.GetUIController(); - _bodyPartControls = new Dictionary + _bodyPartControls = new Dictionary { - { TargetBodyPart.Head, (HeadButton, (PanelContainer)HeadButton.Children.First()) }, - { TargetBodyPart.Torso, (TorsoButton, (PanelContainer)TorsoButton.Children.First()) }, - { TargetBodyPart.LeftArm, (LeftArmButton, (PanelContainer)LeftArmButton.Children.First()) }, - { TargetBodyPart.RightArm, (RightArmButton, (PanelContainer)RightArmButton.Children.First()) }, - { TargetBodyPart.LeftLeg, (LeftLegButton, (PanelContainer)LeftLegButton.Children.First()) }, - { TargetBodyPart.RightLeg, (RightLegButton, (PanelContainer)RightLegButton.Children.First()) } + // TODO: ADD EYE AND MOUTH TARGETING + { TargetBodyPart.Head, HeadButton }, + { TargetBodyPart.Torso, ChestButton }, + { TargetBodyPart.Groin, GroinButton }, + { TargetBodyPart.LeftArm, LeftArmButton }, + { TargetBodyPart.LeftHand, LeftHandButton }, + { TargetBodyPart.RightArm, RightArmButton }, + { TargetBodyPart.RightHand, RightHandButton }, + { TargetBodyPart.LeftLeg, LeftLegButton }, + { TargetBodyPart.LeftFoot, LeftFootButton }, + { TargetBodyPart.RightLeg, RightLegButton }, + { TargetBodyPart.RightFoot, RightFootButton }, }; - foreach (var buttonPair in _bodyPartControls) + foreach (var bodyPartButton in _bodyPartControls) { - buttonPair.Value.Button.MouseFilter = MouseFilterMode.Stop; - buttonPair.Value.Button.OnPressed += args => SetActiveBodyPart(buttonPair.Key); + bodyPartButton.Value.MouseFilter = MouseFilterMode.Stop; + bodyPartButton.Value.OnPressed += _ => SetActiveBodyPart(bodyPartButton.Key); + + TargetDoll.Texture = Theme.ResolveTexture("target_doll"); } } private void SetActiveBodyPart(TargetBodyPart bodyPart) @@ -39,18 +47,21 @@ private void SetActiveBodyPart(TargetBodyPart bodyPart) _controller.CycleTarget(bodyPart); } - public void SetColors(TargetBodyPart bodyPart) + public void SetBodyPartsVisible(TargetBodyPart bodyPart) { - foreach (var buttonPair in _bodyPartControls) + foreach (var bodyPartButton in _bodyPartControls) { - var styleBox = (StyleBoxFlat) buttonPair.Value.Panel.PanelOverride!; - styleBox.BackgroundColor = buttonPair.Key == bodyPart ? new Color(243, 10, 12, 51) : new Color(0, 0, 0, 0); - styleBox.BorderColor = buttonPair.Key == bodyPart ? new Color(243, 10, 12, 255) : new Color(0, 0, 0, 0); + bodyPartButton.Value.Children.First().Visible = bodyPartButton.Key == bodyPart; } } - public void SetVisible(bool visible) + protected override void OnThemeUpdated() + { + TargetDoll.Texture = Theme.ResolveTexture("target_doll"); + } + + public void SetTargetDollVisible(bool visible) { - this.Visible = visible; + Visible = visible; } } diff --git a/Content.Client/Hands/Systems/HandsSystem.cs b/Content.Client/Hands/Systems/HandsSystem.cs index 07803690c21..f237a1dfe05 100644 --- a/Content.Client/Hands/Systems/HandsSystem.cs +++ b/Content.Client/Hands/Systems/HandsSystem.cs @@ -52,6 +52,7 @@ public override void Initialize() SubscribeLocalEvent(HandleComponentState); SubscribeLocalEvent(OnVisualsChanged); SubscribeLocalEvent(HandleBodyPartRemoved); + SubscribeLocalEvent(HandleBodyPartDisabled); OnHandSetActive += OnHandActivated; } @@ -244,17 +245,18 @@ public void UIHandAltActivateItem(string handName) #endregion #region visuals - private void HandleBodyPartRemoved(EntityUid uid, HandsComponent component, ref BodyPartRemovedEvent args) + + private void HideLayers(EntityUid uid, HandsComponent component, Entity part, SpriteComponent? sprite = null) { - if (args.Part.Comp.PartType != BodyPartType.Hand || !TryComp(uid, out SpriteComponent? sprite)) + if (part.Comp.PartType != BodyPartType.Hand || !Resolve(uid, ref sprite, logMissing: false)) return; - var location = args.Part.Comp.Symmetry switch + var location = part.Comp.Symmetry switch { BodyPartSymmetry.None => HandLocation.Middle, BodyPartSymmetry.Left => HandLocation.Left, BodyPartSymmetry.Right => HandLocation.Right, - _ => throw new ArgumentOutOfRangeException(nameof(args.Part.Comp.Symmetry)) + _ => throw new ArgumentOutOfRangeException(nameof(part.Comp.Symmetry)) }; if (component.RevealedLayers.TryGetValue(location, out var revealedLayers)) @@ -268,6 +270,16 @@ private void HandleBodyPartRemoved(EntityUid uid, HandsComponent component, ref } } + 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); @@ -467,4 +479,4 @@ private void OnHandActivated(Entity? ent) OnPlayerSetActiveHand?.Invoke(hand.Comp.ActiveHand.Name); } } -} \ No newline at end of file +} diff --git a/Content.Client/Stylesheets/StyleNano.cs b/Content.Client/Stylesheets/StyleNano.cs index 0409a0086a3..a90fb92f9a9 100644 --- a/Content.Client/Stylesheets/StyleNano.cs +++ b/Content.Client/Stylesheets/StyleNano.cs @@ -1671,6 +1671,60 @@ public StyleNano(IResourceCache resCache) : base(resCache) BackgroundColor = FancyTreeSelectedRowColor, }), + // Shitmed Edit Start + Element().Class("TargetDollButtonHead") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/head_hover.png")), + + Element().Class("TargetDollButtonChest") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/torso_hover.png")), + + Element().Class("TargetDollButtonGroin") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/groin_hover.png")), + + Element().Class("TargetDollButtonLeftArm") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/leftarm_hover.png")), + + Element().Class("TargetDollButtonLeftHand") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/lefthand_hover.png")), + + Element().Class("TargetDollButtonRightArm") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/rightarm_hover.png")), + + Element().Class("TargetDollButtonRightHand") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/righthand_hover.png")), + + Element().Class("TargetDollButtonLeftLeg") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/leftleg_hover.png")), + + Element().Class("TargetDollButtonLeftFoot") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/leftfoot_hover.png")), + + Element().Class("TargetDollButtonRightLeg") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/rightleg_hover.png")), + + Element().Class("TargetDollButtonRightFoot") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/rightfoot_hover.png")), + + Element().Class("TargetDollButtonEyes") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/eyes_hover.png")), + + Element().Class("TargetDollButtonMouth") + .Pseudo(TextureButton.StylePseudoClassHover) + .Prop(TextureButton.StylePropertyTexture, resCache.GetTexture("/Textures/Interface/Targeting/Doll/mouth_hover.png")), + // Shitmed Edit End + // Silicon law edit ui Element