Thermal Performance Threshold & Thermal Override
Items will switch themselves off below a customizable threshold to avoid damage Player can toggle thermal override to disable safety shutdown Selecting an item allows player to select whether the item will override Clicking on the background of an inventory panel will display general ship settings (including thermal shutdown threshold) Performance Stat evaluation has been moved to EquippedItem, slight performance improvement Item online and active status are now reactive properties Created player settings file to store e.g. shutdown threshold Fixed crash when entering wormhole while enemies are visible
This commit is contained in:
parent
2f088b5590
commit
1092159063
66 changed files with 756 additions and 206 deletions
|
|
@ -272,27 +272,6 @@ public class ItemManager
|
|||
return result;
|
||||
}
|
||||
|
||||
// Returns stat using ship temperature and modifiers
|
||||
public float Evaluate(PerformanceStat stat, EquippedItem item)
|
||||
{
|
||||
var itemData = GetData(item.EquippableItem);
|
||||
|
||||
var heat = !stat.HeatDependent ? 1 : pow(itemData.Performance(item.Temperature), Evaluate(itemData.HeatExponent, item.EquippableItem) * stat.HeatExponentMultiplier);
|
||||
var durability = !stat.DurabilityDependent ? 1 : pow(item.EquippableItem.Durability / itemData.Durability, Evaluate(itemData.DurabilityExponent,item.EquippableItem));
|
||||
var quality = pow(Quality(stat, item.EquippableItem), stat.QualityExponent);
|
||||
|
||||
var scaleModifier = 1.0f;
|
||||
foreach (var value in stat.GetScaleModifiers(item.Entity).Values) scaleModifier = scaleModifier * value;
|
||||
|
||||
float constantModifier = 0;
|
||||
foreach (var value in stat.GetConstantModifiers(item.Entity).Values) constantModifier += value;
|
||||
|
||||
var result = lerp(stat.Min, stat.Max, durability * quality * heat) * scaleModifier + constantModifier;
|
||||
if (float.IsNaN(result))
|
||||
return stat.Min;
|
||||
return result;
|
||||
}
|
||||
|
||||
// public Entity CreateEntity(Guid zoneID, Guid corporation, Guid loadout)
|
||||
// {
|
||||
// if (!(ItemData.Get(loadout) is LoadoutData loadoutData))
|
||||
|
|
|
|||
Loading…
Reference in a new issue