sharpened fix (#209)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -43,6 +43,4 @@
|
||||
- type: ClothingSpeedModifier
|
||||
walkModifier: 0.9
|
||||
sprintModifier: 0.8
|
||||
- type: HeldSpeedModifier
|
||||
- type: CP14Sharpened
|
||||
sharpnessDamageByHit: 0.02
|
||||
- type: HeldSpeedModifier
|
||||
Reference in New Issue
Block a user