From 3efedc5c8f7358b81121ea5490f57c18adb3eb89 Mon Sep 17 00:00:00 2001 From: Roudenn Date: Sat, 16 Nov 2024 14:35:22 +0300 Subject: [PATCH] fixes? --- .../EntityEffects/Effects/HealthChange.cs | 1 - .../Surgery/SharedSurgerySystem.Steps.cs | 3 +- .../Body/Systems/SharedBodySystem.Body.cs | 2 +- .../Body/Systems/SharedBodySystem.Parts.cs | 3 +- Resources/Prototypes/Body/Organs/felinid.yml | 2 +- Resources/Prototypes/Body/Parts/base.yml | 33 ++++++++++------- Resources/Prototypes/Body/Parts/skeleton.yml | 34 +++++++++++------- Resources/Prototypes/Damage/modifier_sets.yml | 11 ------ .../_Backmen/Body/Parts/shadowkin.yml | 35 ++++++++++++------- 9 files changed, 68 insertions(+), 56 deletions(-) diff --git a/Content.Server/EntityEffects/Effects/HealthChange.cs b/Content.Server/EntityEffects/Effects/HealthChange.cs index 6c0648dddd8..6efcbd68940 100644 --- a/Content.Server/EntityEffects/Effects/HealthChange.cs +++ b/Content.Server/EntityEffects/Effects/HealthChange.cs @@ -3,7 +3,6 @@ using Content.Shared.EntityEffects; using Content.Shared.FixedPoint; using Content.Shared.Localizations; -using Content.Shared.Targeting; // Shitmed using JetBrains.Annotations; using Robust.Shared.Prototypes; using System.Linq; diff --git a/Content.Shared/Backmen/Surgery/SharedSurgerySystem.Steps.cs b/Content.Shared/Backmen/Surgery/SharedSurgerySystem.Steps.cs index 91c217bf13a..34ea5a352df 100644 --- a/Content.Shared/Backmen/Surgery/SharedSurgerySystem.Steps.cs +++ b/Content.Shared/Backmen/Surgery/SharedSurgerySystem.Steps.cs @@ -334,9 +334,8 @@ private void OnAddPartStep(Entity ent, ref SurgeryS var slotName = removedComp.Symmetry != null ? $"{removedComp.Symmetry?.ToString().ToLower()} {removedComp.Part.ToString().ToLower()}" : removedComp.Part.ToString().ToLower(); - _body.TryCreatePartSlot(args.Part, slotName, partComp.PartType, out var _); + _body.TryCreatePartSlot(args.Part, slotName, partComp.PartType, out _); _body.AttachPart(args.Part, slotName, tool); - _body.ChangeSlotState((tool, partComp), false); EnsureComp(tool); var ev = new BodyPartAttachedEvent((tool, partComp)); RaiseLocalEvent(args.Body, ref ev); diff --git a/Content.Shared/Body/Systems/SharedBodySystem.Body.cs b/Content.Shared/Body/Systems/SharedBodySystem.Body.cs index 524fa629316..ec4df450985 100644 --- a/Content.Shared/Body/Systems/SharedBodySystem.Body.cs +++ b/Content.Shared/Body/Systems/SharedBodySystem.Body.cs @@ -397,7 +397,7 @@ public virtual HashSet GibPart( if (HasComp(partId)) { - foreach (var item in _inventory.GetHandOrInventoryEntities((partId, null, inventory))) + foreach (var item in _inventory.GetHandOrInventoryEntities((partId))) { SharedTransform.AttachToGridOrMap(item); gibs.Add(item); diff --git a/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs b/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs index 42fa06b8564..01371c21bbb 100644 --- a/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs +++ b/Content.Shared/Body/Systems/SharedBodySystem.Parts.cs @@ -170,7 +170,6 @@ protected virtual void RemovePart( protected virtual void DropPart(Entity partEnt) { - ChangeSlotState(partEnt, true); // I don't know if this can cause issues, since any part that's being detached HAS to have a Body. // though I really just want the compiler to shut the fuck up. var body = partEnt.Comp.Body.GetValueOrDefault(); @@ -289,6 +288,7 @@ private void EnablePart(Entity partEnt) // I hate having to hardcode these checks so much. if (partEnt.Comp.PartType == BodyPartType.Leg) + { AddLeg(partEnt, (partEnt.Comp.Body.Value, body)); RaiseLocalEvent(partEnt.Comp.Body.Value, new MoodRemoveEffectEvent("SurgeryNoLeg")); } @@ -323,6 +323,7 @@ private void DisablePart(Entity partEnt) return; if (partEnt.Comp.PartType == BodyPartType.Leg) + { RemoveLeg(partEnt, (partEnt.Comp.Body.Value, body)); RaiseLocalEvent(partEnt.Comp.Body.Value, new MoodEffectEvent("SurgeryNoLeg")); } diff --git a/Resources/Prototypes/Body/Organs/felinid.yml b/Resources/Prototypes/Body/Organs/felinid.yml index 0c6c7ea91d2..a7704b71a52 100644 --- a/Resources/Prototypes/Body/Organs/felinid.yml +++ b/Resources/Prototypes/Body/Organs/felinid.yml @@ -17,7 +17,7 @@ description: "Should you really have this?" components: - type: Sprite - sprite: Nyanotrasen/Mobs/Customization/felinid_tails.rsi + sprite: Backmen/Mobs/Customization/felinid_tails.rsi state: basic_tail_tip - type: MarkingContainer marking: FelinidTailBasic diff --git a/Resources/Prototypes/Body/Parts/base.yml b/Resources/Prototypes/Body/Parts/base.yml index e5e9f8cfda8..a69f62bdaa0 100644 --- a/Resources/Prototypes/Body/Parts/base.yml +++ b/Resources/Prototypes/Body/Parts/base.yml @@ -14,7 +14,6 @@ endSound: path: /Audio/Medical/Surgery/organ2.ogg # end-backmen: surgery - - type: Gibbable - type: ContainerContainer containers: bodypart: !type:Container @@ -24,13 +23,21 @@ - type: Tag tags: - Trash - # start-backmen: surgery + +# start-backmen: surgery +- type: entity + id: BasePartDestructible + parent: BasePart + name: "body part" + abstract: true + components: + - type: Gibbable - type: Destructible thresholds: - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 50 + damage: 70 behaviors: - !type:GibPartBehavior { } - trigger: @@ -45,7 +52,7 @@ damage: 200 behaviors: - !type:SpawnEntitiesBehavior - spawnInContainer: true + spawnInContainer: false spawn: Ash: min: 1 @@ -75,7 +82,7 @@ - type: entity id: BaseHead name: "head" - parent: BasePart + parent: BasePartDestructible # backmen: surgery abstract: true components: - type: BodyPart @@ -91,7 +98,7 @@ - type: entity id: BaseLeftArm name: "left arm" - parent: BasePart + parent: BasePartDestructible # backmen: surgery abstract: true components: - type: BodyPart @@ -102,7 +109,7 @@ - type: entity id: BaseRightArm name: "right arm" - parent: BasePart + parent: BasePartDestructible # backmen: surgery abstract: true components: - type: BodyPart @@ -113,7 +120,7 @@ - type: entity id: BaseLeftHand name: "left hand" - parent: BasePart + parent: BasePartDestructible # backmen: surgery abstract: true components: - type: BodyPart @@ -124,7 +131,7 @@ - type: entity id: BaseRightHand name: "right hand" - parent: BasePart + parent: BasePartDestructible # backmen: surgery abstract: true components: - type: BodyPart @@ -135,7 +142,7 @@ - type: entity id: BaseLeftLeg name: "left leg" - parent: BasePart + parent: BasePartDestructible # backmen: surgery abstract: true components: - type: BodyPart @@ -147,7 +154,7 @@ - type: entity id: BaseRightLeg name: "right leg" - parent: BasePart + parent: BasePartDestructible # backmen: surgery abstract: true components: - type: BodyPart @@ -159,7 +166,7 @@ - type: entity id: BaseLeftFoot name: "left foot" - parent: BasePart + parent: BasePartDestructible # backmen: surgery abstract: true components: - type: BodyPart @@ -170,7 +177,7 @@ - type: entity id: BaseRightFoot name: "right foot" - parent: BasePart + parent: BasePartDestructible # backmen: surgery abstract: true components: - type: BodyPart diff --git a/Resources/Prototypes/Body/Parts/skeleton.yml b/Resources/Prototypes/Body/Parts/skeleton.yml index f19c5055a2b..099bb187e04 100644 --- a/Resources/Prototypes/Body/Parts/skeleton.yml +++ b/Resources/Prototypes/Body/Parts/skeleton.yml @@ -1,4 +1,3 @@ -# TODO BODY: Part damage - type: entity id: PartSkeleton parent: BaseItem @@ -6,7 +5,7 @@ abstract: true components: - type: Damageable - damageContainer: OrganicPart # Shitmed + damageContainer: OrganicPart # backmen: surgery - type: BodyPart - type: ContainerContainer containers: @@ -14,16 +13,24 @@ ents: [] - type: StaticPrice price: 20 - - type: Gibbable - type: Tag tags: - Trash + +# start-backmen: surgery +- type: entity + id: PartSkeletonDestructible + parent: PartSkeleton + name: "body part" + abstract: true + components: + - type: Gibbable - type: Destructible thresholds: - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 50 + damage: 70 behaviors: - !type:GibPartBehavior { } - trigger: @@ -47,6 +54,7 @@ - !type:PlaySoundBehavior sound: collection: MeatLaserImpact +# end-backmen: surgery - type: entity id: TorsoSkeleton @@ -66,7 +74,7 @@ id: HeadSkeleton name: "skull" description: Alas poor Yorick... - parent: PartSkeleton + parent: PartSkeletonDestructible # backmen: surgery components: - type: Sprite sprite: Mobs/Species/Skeleton/parts.rsi @@ -104,7 +112,7 @@ - type: entity id: LeftArmSkeleton name: "left skeleton arm" - parent: PartSkeleton + parent: PartSkeletonDestructible # backmen: surgery components: - type: Sprite sprite: Mobs/Species/Skeleton/parts.rsi @@ -119,7 +127,7 @@ - type: entity id: RightArmSkeleton name: "right skeleton arm" - parent: PartSkeleton + parent: PartSkeletonDestructible # backmen: surgery components: - type: Sprite sprite: Mobs/Species/Skeleton/parts.rsi @@ -134,7 +142,7 @@ - type: entity id: LeftHandSkeleton name: "left skeleton hand" - parent: PartSkeleton + parent: PartSkeletonDestructible # backmen: surgery components: - type: Sprite sprite: Mobs/Species/Skeleton/parts.rsi @@ -149,7 +157,7 @@ - type: entity id: RightHandSkeleton name: "right skeleton hand" - parent: PartSkeleton + parent: PartSkeletonDestructible # backmen: surgery components: - type: Sprite sprite: Mobs/Species/Skeleton/parts.rsi @@ -164,7 +172,7 @@ - type: entity id: LeftLegSkeleton name: "left skeleton leg" - parent: PartSkeleton + parent: PartSkeletonDestructible # backmen: surgery components: - type: Sprite sprite: Mobs/Species/Skeleton/parts.rsi @@ -180,7 +188,7 @@ - type: entity id: RightLegSkeleton name: "right skeleton leg" - parent: PartSkeleton + parent: PartSkeletonDestructible # backmen: surgery components: - type: Sprite sprite: Mobs/Species/Skeleton/parts.rsi @@ -196,7 +204,7 @@ - type: entity id: LeftFootSkeleton name: "left skeleton foot" - parent: PartSkeleton + parent: PartSkeletonDestructible # backmen: surgery components: - type: Sprite sprite: Mobs/Species/Skeleton/parts.rsi @@ -211,7 +219,7 @@ - type: entity id: RightFootSkeleton name: "right skeleton foot" - parent: PartSkeleton + parent: PartSkeletonDestructible # backmen: surgery components: - type: Sprite sprite: Mobs/Species/Skeleton/parts.rsi diff --git a/Resources/Prototypes/Damage/modifier_sets.yml b/Resources/Prototypes/Damage/modifier_sets.yml index d70fd3562c1..cd3a3425fcf 100644 --- a/Resources/Prototypes/Damage/modifier_sets.yml +++ b/Resources/Prototypes/Damage/modifier_sets.yml @@ -315,14 +315,3 @@ id: PotassiumIodide coefficients: Radiation: 0.1 - -# backmen surgery modification: Change this if you want to alter how damage types affect part severing/integrity. -- type: damageModifierSet - id: PartDamage - coefficients: - Blunt: 0.8 - Slash: 1.2 - Piercing: 0.5 - Cold: 0.5 - Heat: 0.8 - Shock: 0.5 diff --git a/Resources/Prototypes/_Backmen/Body/Parts/shadowkin.yml b/Resources/Prototypes/_Backmen/Body/Parts/shadowkin.yml index a594c1ac4af..0b737364c36 100644 --- a/Resources/Prototypes/_Backmen/Body/Parts/shadowkin.yml +++ b/Resources/Prototypes/_Backmen/Body/Parts/shadowkin.yml @@ -10,8 +10,7 @@ - type: Icon sprite: Backmen/Mobs/Species/shadowkin.rsi - type: Damageable - damageContainer: OrganicPart # Shitmed - - type: Gibbable + damageContainer: OrganicPart # backmen: surgery - type: SurgeryTool - type: BodyPart - type: ContainerContainer @@ -23,12 +22,21 @@ - type: Tag tags: - Trash + +# start-backmen: surgery +- type: entity + id: PartShadowkinDestructible + parent: PartShadowkin + name: "body part" + abstract: true + components: + - type: Gibbable - type: Destructible thresholds: - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 50 + damage: 70 behaviors: - !type:GibPartBehavior { } - trigger: @@ -52,11 +60,12 @@ - !type:PlaySoundBehavior sound: collection: MeatLaserImpact +# end-backmen: surgery - type: entity id: TorsoShadowkin name: "Shadowkin torso" - parent: PartShadowkin + parent: PartShadowkinDestructible # backmen: surgery components: - type: Sprite state: "torso_m" @@ -73,7 +82,7 @@ - type: entity id: HeadShadowkin name: "Shadowkin head" - parent: PartShadowkin + parent: PartShadowkinDestructible # backmen: surgery components: - type: Sprite state: "head_m" @@ -94,7 +103,7 @@ - type: entity id: LeftArmShadowkin name: "left Shadowkin arm" - parent: PartShadowkin + parent: PartShadowkinDestructible # backmen: surgery components: - type: Sprite state: "l_arm" @@ -108,7 +117,7 @@ - type: entity id: RightArmShadowkin name: "right Shadowkin arm" - parent: PartShadowkin + parent: PartShadowkinDestructible # backmen: surgery components: - type: Sprite state: "r_arm" @@ -122,7 +131,7 @@ - type: entity id: LeftHandShadowkin name: "left Shadowkin hand" - parent: PartShadowkin + parent: PartShadowkinDestructible # backmen: surgery components: - type: Sprite state: "l_hand" @@ -136,7 +145,7 @@ - type: entity id: RightHandShadowkin name: "right Shadowkin hand" - parent: PartShadowkin + parent: PartShadowkinDestructible # backmen: surgery components: - type: Sprite state: "r_hand" @@ -150,7 +159,7 @@ - type: entity id: LeftLegShadowkin name: "left Shadowkin leg" - parent: PartShadowkin + parent: PartShadowkinDestructible # backmen: surgery components: - type: Sprite state: "l_leg" @@ -165,7 +174,7 @@ - type: entity id: RightLegShadowkin name: "right Shadowkin leg" - parent: PartShadowkin + parent: PartShadowkinDestructible # backmen: surgery components: - type: Sprite state: "r_leg" @@ -180,7 +189,7 @@ - type: entity id: LeftFootShadowkin name: "left Shadowkin foot" - parent: PartShadowkin + parent: PartShadowkinDestructible # backmen: surgery components: - type: Sprite state: "l_foot" @@ -194,7 +203,7 @@ - type: entity id: RightFootShadowkin name: "right Shadowkin foot" - parent: PartShadowkin + parent: PartShadowkinDestructible # backmen: surgery components: - type: Sprite state: "r_foot"