Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Хирургия фикс выпадения органов у частей тела вместо хотфикса #74

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Content.Shared/Body/Part/BodyPartComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent
/// to make possible severing it.
/// </summary>
[DataField, AutoNetworkedField]
public float SeverIntegrity = 90;
public float SeverIntegrity = 80; // Corvax-Next-Surgery flavor damage

/// <summary>
/// On what TargetIntegrity we should re-enable the part.
Expand All @@ -131,11 +131,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 }, // Corvax-Next-Surgery flavor damage
{ TargetIntegrity.HeavilyWounded, 60 }, // Corvax-Next-Surgery flavor damage
{ TargetIntegrity.ModeratelyWounded, 45 }, // Corvax-Next-Surgery flavor damage
{ TargetIntegrity.SomewhatWounded, 30}, // Corvax-Next-Surgery flavor damage
{ TargetIntegrity.LightlyWounded, 15 }, // Corvax-Next-Surgery flavor damage
{ TargetIntegrity.Healthy, 10 },
};
// end-_CorvaxNext: surgery
Expand Down
20 changes: 8 additions & 12 deletions Content.Shared/Body/Systems/SharedBodySystem.Body.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,20 +397,16 @@ 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);
}
}

// Corvax-Next-Surgery
// Corvax-Next-Surgery
_gibbingSystem.TryGibEntityWithRef(partId, partId, GibType.Gib, GibContentsOption.Drop, ref gibs,
playAudio: true, launchGibs: true, launchDirection: splatDirection, launchImpulse: GibletLaunchImpulse * splatModifier,
launchImpulseVariance: GibletLaunchImpulseVariance, launchCone: splatCone);
Expand Down
6 changes: 3 additions & 3 deletions Resources/Prototypes/Body/Parts/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading