Skip to content

Commit

Permalink
[Fix] Surgery Hotfix: Head and Limbs dissapears (#932)
Browse files Browse the repository at this point in the history
* fix dissapearing head and limbs

* revert hotfix for normal fix

* Fix limbs being gibbable and let head drop brain, eyes etc

* cannot fix without more health workaround

* proper limb fix when destroyed on body to drop organs

* easier to cut off limbs

* remove unnesseccery edits

* easier to cutt off limbs2

* remove unnecessery edits
  • Loading branch information
TokenStyle authored Nov 23, 2024
1 parent 42cfafb commit 5d3225b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions Content.Shared/Body/Part/BodyPartComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent
/// to make possible severing it.
/// </summary>
[DataField, AutoNetworkedField]
public float SeverIntegrity = 90;
public float SeverIntegrity = 80;

/// <summary>
/// On what TargetIntegrity we should re-enable the part.
Expand All @@ -124,11 +124,11 @@ public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent
[DataField, AutoNetworkedField]
public Dictionary<TargetIntegrity, float> 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 },
};

Expand Down
22 changes: 11 additions & 11 deletions Content.Shared/Body/Systems/SharedBodySystem.Body.cs
Original file line number Diff line number Diff line change
Expand Up @@ -396,19 +396,19 @@ public virtual HashSet<EntityUid> 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,
playAudio: true, launchGibs: true, launchDirection: splatDirection, launchImpulse: GibletLaunchImpulse * splatModifier,
launchImpulseVariance: GibletLaunchImpulseVariance, launchCone: splatCone);

if (HasComp<InventoryComponent>(partId))
{
foreach (var item in _inventory.GetHandOrInventoryEntities((partId)))
Expand Down

0 comments on commit 5d3225b

Please sign in to comment.