From 6539d88c972b708d0e189d235fcd72d4ed8a7d46 Mon Sep 17 00:00:00 2001 From: Token <56667933+TokenStyle@users.noreply.github.com> Date: Sat, 23 Nov 2024 01:11:14 +0500 Subject: [PATCH 1/9] fix dissapearing head and limbs --- Resources/Prototypes/Body/Parts/base.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/Prototypes/Body/Parts/base.yml b/Resources/Prototypes/Body/Parts/base.yml index 57f239b891a..395f39b6ae3 100644 --- a/Resources/Prototypes/Body/Parts/base.yml +++ b/Resources/Prototypes/Body/Parts/base.yml @@ -30,19 +30,19 @@ - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 75 + damage: 150 # was 75 . TODO gettin dissapear if lower than dettach health behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Slash - damage: 100 + damage: 200 # was 100 . TODO gettin dissapear if lower than dettach health behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Heat - damage: 200 + damage: 400 # was 200 . TODO gettin dissapear if lower than dettach health behaviors: - !type:SpawnEntitiesBehavior spawnInContainer: true From eff3dc9ca3f8e6e2d772368534a685cf29148f98 Mon Sep 17 00:00:00 2001 From: Token <56667933+TokenStyle@users.noreply.github.com> Date: Sat, 23 Nov 2024 03:31:24 +0500 Subject: [PATCH 2/9] revert hotfix for normal fix --- Resources/Prototypes/Body/Parts/base.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/Prototypes/Body/Parts/base.yml b/Resources/Prototypes/Body/Parts/base.yml index 395f39b6ae3..57f239b891a 100644 --- a/Resources/Prototypes/Body/Parts/base.yml +++ b/Resources/Prototypes/Body/Parts/base.yml @@ -30,19 +30,19 @@ - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 150 # was 75 . TODO gettin dissapear if lower than dettach health + damage: 75 behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Slash - damage: 200 # was 100 . TODO gettin dissapear if lower than dettach health + damage: 100 behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Heat - damage: 400 # was 200 . TODO gettin dissapear if lower than dettach health + damage: 200 behaviors: - !type:SpawnEntitiesBehavior spawnInContainer: true From c2d19a1198b3c49a518a566d1e316b6761c47c04 Mon Sep 17 00:00:00 2001 From: Token <56667933+TokenStyle@users.noreply.github.com> Date: Sat, 23 Nov 2024 03:32:07 +0500 Subject: [PATCH 3/9] Fix limbs being gibbable and let head drop brain, eyes etc --- Content.Shared/Body/Systems/SharedBodySystem.Body.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Content.Shared/Body/Systems/SharedBodySystem.Body.cs b/Content.Shared/Body/Systems/SharedBodySystem.Body.cs index e0012c68bee..9fa42522336 100644 --- a/Content.Shared/Body/Systems/SharedBodySystem.Body.cs +++ b/Content.Shared/Body/Systems/SharedBodySystem.Body.cs @@ -409,6 +409,10 @@ public virtual HashSet GibPart( launchCone: splatCone); } + _gibbingSystem.TryGibEntityWithRef(partId, partId, GibType.Gib, GibContentsOption.Drop, ref gibs, + playAudio: true, launchGibs: true, launchDirection: splatDirection, launchImpulse: GibletLaunchImpulse * splatModifier, + launchImpulseVariance: GibletLaunchImpulseVariance, launchCone: splatCone); + if (HasComp(partId)) { foreach (var item in _inventory.GetHandOrInventoryEntities((partId))) From 586245a7f0ebf5afb93394ac2d97a4ff63a6eb87 Mon Sep 17 00:00:00 2001 From: Token <56667933+TokenStyle@users.noreply.github.com> Date: Sat, 23 Nov 2024 03:37:41 +0500 Subject: [PATCH 4/9] cannot fix without more health workaround --- Resources/Prototypes/Body/Parts/base.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/Prototypes/Body/Parts/base.yml b/Resources/Prototypes/Body/Parts/base.yml index 57f239b891a..395f39b6ae3 100644 --- a/Resources/Prototypes/Body/Parts/base.yml +++ b/Resources/Prototypes/Body/Parts/base.yml @@ -30,19 +30,19 @@ - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 75 + damage: 150 # was 75 . TODO gettin dissapear if lower than dettach health behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Slash - damage: 100 + damage: 200 # was 100 . TODO gettin dissapear if lower than dettach health behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Heat - damage: 200 + damage: 400 # was 200 . TODO gettin dissapear if lower than dettach health behaviors: - !type:SpawnEntitiesBehavior spawnInContainer: true From 500359db3600b9d04dca39d17c8bc917c5334b4f Mon Sep 17 00:00:00 2001 From: Token <56667933+TokenStyle@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:08:32 +0500 Subject: [PATCH 5/9] proper limb fix when destroyed on body to drop organs --- .../Body/Systems/SharedBodySystem.Body.cs | 18 +++++++----------- Resources/Prototypes/Body/Parts/base.yml | 6 +++--- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Content.Shared/Body/Systems/SharedBodySystem.Body.cs b/Content.Shared/Body/Systems/SharedBodySystem.Body.cs index 9fa42522336..eb2cfb9ff90 100644 --- a/Content.Shared/Body/Systems/SharedBodySystem.Body.cs +++ b/Content.Shared/Body/Systems/SharedBodySystem.Body.cs @@ -396,17 +396,13 @@ public virtual HashSet GibPart( RemovePartChildren((partId, part), bodyEnt); - _gibbingSystem.TryGibEntityWithRef(partId, - partId, - GibType.Gib, - GibContentsOption.Drop, - ref gibs, - playAudio: true, - launchGibs: true, - launchDirection: splatDirection, - launchImpulse: GibletLaunchImpulse * splatModifier, - launchImpulseVariance: GibletLaunchImpulseVariance, - launchCone: splatCone); + // We have to iterate though every organ to drop it when part is being destroyed + foreach (var organ in GetPartOrgans(partId, part)) + { + _gibbingSystem.TryGibEntityWithRef(bodyEnt, organ.Id, GibType.Drop, GibContentsOption.Skip, + ref gibs, playAudio: false, launchImpulse: GibletLaunchImpulse * splatModifier, + launchImpulseVariance: GibletLaunchImpulseVariance, launchCone: splatCone); + } } _gibbingSystem.TryGibEntityWithRef(partId, partId, GibType.Gib, GibContentsOption.Drop, ref gibs, diff --git a/Resources/Prototypes/Body/Parts/base.yml b/Resources/Prototypes/Body/Parts/base.yml index 395f39b6ae3..57f239b891a 100644 --- a/Resources/Prototypes/Body/Parts/base.yml +++ b/Resources/Prototypes/Body/Parts/base.yml @@ -30,19 +30,19 @@ - trigger: !type:DamageTypeTrigger damageType: Blunt - damage: 150 # was 75 . TODO gettin dissapear if lower than dettach health + damage: 75 behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Slash - damage: 200 # was 100 . TODO gettin dissapear if lower than dettach health + damage: 100 behaviors: - !type:GibPartBehavior { } - trigger: !type:DamageTypeTrigger damageType: Heat - damage: 400 # was 200 . TODO gettin dissapear if lower than dettach health + damage: 200 behaviors: - !type:SpawnEntitiesBehavior spawnInContainer: true From 0bdb683939116f5c2d3e2f617a159bebcbf6a2ce Mon Sep 17 00:00:00 2001 From: Token <56667933+TokenStyle@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:43:09 +0500 Subject: [PATCH 6/9] easier to cut off limbs --- Content.Shared/Body/Part/BodyPartComponent.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Content.Shared/Body/Part/BodyPartComponent.cs b/Content.Shared/Body/Part/BodyPartComponent.cs index 9aef6570062..af49f0a7067 100644 --- a/Content.Shared/Body/Part/BodyPartComponent.cs +++ b/Content.Shared/Body/Part/BodyPartComponent.cs @@ -124,11 +124,11 @@ public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent [DataField, AutoNetworkedField] public Dictionary IntegrityThresholds = new() { - { TargetIntegrity.CriticallyWounded, 90 }, - { TargetIntegrity.HeavilyWounded, 75 }, - { TargetIntegrity.ModeratelyWounded, 60 }, - { TargetIntegrity.SomewhatWounded, 40}, - { TargetIntegrity.LightlyWounded, 20 }, + { TargetIntegrity.CriticallyWounded, 70 }, + { TargetIntegrity.HeavilyWounded, 60 }, + { TargetIntegrity.ModeratelyWounded, 45 }, + { TargetIntegrity.SomewhatWounded, 30}, + { TargetIntegrity.LightlyWounded, 15 }, { TargetIntegrity.Healthy, 10 }, }; @@ -145,7 +145,7 @@ private List BodyPartSlotsVV foreach (var slotId in Children.Keys) { - temp.Add((ContainerSlot) containerSystem.GetContainer(Owner, SharedBodySystem.PartSlotContainerIdPrefix+slotId)); + temp.Add((ContainerSlot)containerSystem.GetContainer(Owner, SharedBodySystem.PartSlotContainerIdPrefix + slotId)); } return temp; @@ -162,7 +162,7 @@ private List OrganSlotsVV foreach (var slotId in Organs.Keys) { - temp.Add((ContainerSlot) containerSystem.GetContainer(Owner, SharedBodySystem.OrganSlotContainerIdPrefix+slotId)); + temp.Add((ContainerSlot)containerSystem.GetContainer(Owner, SharedBodySystem.OrganSlotContainerIdPrefix + slotId)); } return temp; From e7aa14b7a4b87595afa1f8e7af7014087a0d00b2 Mon Sep 17 00:00:00 2001 From: Token <56667933+TokenStyle@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:44:10 +0500 Subject: [PATCH 7/9] remove unnesseccery edits --- Content.Shared/Body/Part/BodyPartComponent.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Body/Part/BodyPartComponent.cs b/Content.Shared/Body/Part/BodyPartComponent.cs index af49f0a7067..b2311c27300 100644 --- a/Content.Shared/Body/Part/BodyPartComponent.cs +++ b/Content.Shared/Body/Part/BodyPartComponent.cs @@ -145,7 +145,7 @@ private List BodyPartSlotsVV foreach (var slotId in Children.Keys) { - temp.Add((ContainerSlot)containerSystem.GetContainer(Owner, SharedBodySystem.PartSlotContainerIdPrefix + slotId)); + temp.Add((ContainerSlot) containerSystem.GetContainer(Owner, SharedBodySystem.PartSlotContainerIdPrefix+slotId)); } return temp; @@ -162,7 +162,7 @@ private List OrganSlotsVV foreach (var slotId in Organs.Keys) { - temp.Add((ContainerSlot)containerSystem.GetContainer(Owner, SharedBodySystem.OrganSlotContainerIdPrefix + slotId)); + temp.Add((ContainerSlot) containerSystem.GetContainer(Owner, SharedBodySystem.OrganSlotContainerIdPrefix+slotId)); } return temp; From 88e88908bd94809323a854de4b477db397d7b84f Mon Sep 17 00:00:00 2001 From: Token <56667933+TokenStyle@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:45:52 +0500 Subject: [PATCH 8/9] easier to cutt off limbs2 --- Content.Shared/Body/Part/BodyPartComponent.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Shared/Body/Part/BodyPartComponent.cs b/Content.Shared/Body/Part/BodyPartComponent.cs index b2311c27300..d7d4c33e09f 100644 --- a/Content.Shared/Body/Part/BodyPartComponent.cs +++ b/Content.Shared/Body/Part/BodyPartComponent.cs @@ -113,7 +113,7 @@ public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent /// to make possible severing it. /// [DataField, AutoNetworkedField] - public float SeverIntegrity = 90; + public float SeverIntegrity = 80; /// /// On what TargetIntegrity we should re-enable the part. @@ -145,7 +145,7 @@ private List BodyPartSlotsVV foreach (var slotId in Children.Keys) { - temp.Add((ContainerSlot) containerSystem.GetContainer(Owner, SharedBodySystem.PartSlotContainerIdPrefix+slotId)); + temp.Add((ContainerSlot)containerSystem.GetContainer(Owner, SharedBodySystem.PartSlotContainerIdPrefix + slotId)); } return temp; @@ -162,7 +162,7 @@ private List OrganSlotsVV foreach (var slotId in Organs.Keys) { - temp.Add((ContainerSlot) containerSystem.GetContainer(Owner, SharedBodySystem.OrganSlotContainerIdPrefix+slotId)); + temp.Add((ContainerSlot)containerSystem.GetContainer(Owner, SharedBodySystem.OrganSlotContainerIdPrefix + slotId)); } return temp; From a6d335ad8e1f404ebf5b7f356966896cee3ca070 Mon Sep 17 00:00:00 2001 From: Token <56667933+TokenStyle@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:47:56 +0500 Subject: [PATCH 9/9] remove unnecessery edits --- Content.Shared/Body/Part/BodyPartComponent.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Body/Part/BodyPartComponent.cs b/Content.Shared/Body/Part/BodyPartComponent.cs index d7d4c33e09f..06934c90ea6 100644 --- a/Content.Shared/Body/Part/BodyPartComponent.cs +++ b/Content.Shared/Body/Part/BodyPartComponent.cs @@ -145,7 +145,7 @@ private List BodyPartSlotsVV foreach (var slotId in Children.Keys) { - temp.Add((ContainerSlot)containerSystem.GetContainer(Owner, SharedBodySystem.PartSlotContainerIdPrefix + slotId)); + temp.Add((ContainerSlot) containerSystem.GetContainer(Owner, SharedBodySystem.PartSlotContainerIdPrefix+slotId)); } return temp; @@ -162,7 +162,7 @@ private List OrganSlotsVV foreach (var slotId in Organs.Keys) { - temp.Add((ContainerSlot)containerSystem.GetContainer(Owner, SharedBodySystem.OrganSlotContainerIdPrefix + slotId)); + temp.Add((ContainerSlot) containerSystem.GetContainer(Owner, SharedBodySystem.OrganSlotContainerIdPrefix+slotId)); } return temp;