Add price multiplier for armor component (#24561)

* Add price multiplier for armor component

* Fix datafiled
This commit is contained in:
MilenVolf
2024-01-26 01:04:01 +03:00
committed by GitHub
parent ff207b2e05
commit 4f3265e950
2 changed files with 9 additions and 2 deletions

View File

@@ -22,13 +22,13 @@ public sealed class ArmorSystem : SharedArmorSystem
foreach (var modifier in component.Modifiers.Coefficients)
{
var damageType = _protoManager.Index<DamageTypePrototype>(modifier.Key);
args.Price += damageType.ArmorPriceCoefficient * 100 * (1 - modifier.Value);
args.Price += component.PriceMultiplier * damageType.ArmorPriceCoefficient * 100 * (1 - modifier.Value);
}
foreach (var modifier in component.Modifiers.FlatReduction)
{
var damageType = _protoManager.Index<DamageTypePrototype>(modifier.Key);
args.Price += damageType.ArmorPriceFlat * modifier.Value;
args.Price += component.PriceMultiplier * damageType.ArmorPriceFlat * modifier.Value;
}
}
}