Add price multiplier for armor component (#24561)
* Add price multiplier for armor component * Fix datafiled
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user