sharpened fix (#209)

This commit is contained in:
Ed
2024-06-04 16:59:53 +03:00
committed by GitHub
parent 16bc737d9a
commit fdf9413088
3 changed files with 3 additions and 5 deletions

View File

@@ -11,5 +11,5 @@ public sealed partial class CP14SharpenedComponent : Component
public float Sharpness = 1f;
[DataField]
public float SharpnessDamageByHit = 0.01f;
public float SharpnessDamageBy1Damage = 0.002f; //500 damage
}

View File

@@ -33,7 +33,7 @@ public sealed class CP14SharpeningSystem : EntitySystem
if (!args.HitEntities.Any())
return;
sharpened.Comp.Sharpness = MathHelper.Clamp(sharpened.Comp.Sharpness - sharpened.Comp.SharpnessDamageByHit, 0.1f, 1f);
sharpened.Comp.Sharpness = MathHelper.Clamp(sharpened.Comp.Sharpness - args.BaseDamage.GetTotal().Float() * sharpened.Comp.SharpnessDamageBy1Damage, 0.1f, 1f);
}
private void OnInteract(Entity<CP14SharpeningStoneComponent> stone, ref ActivateInWorldEvent args)

View File

@@ -43,6 +43,4 @@
- type: ClothingSpeedModifier
walkModifier: 0.9
sprintModifier: 0.8
- type: HeldSpeedModifier
- type: CP14Sharpened
sharpnessDamageByHit: 0.02
- type: HeldSpeedModifier