Stair improvements, inventory "tooltip" & condition progressbar, reactor tries to match the highest load of the connected junction boxes (instead of the sum of the loads)

This commit is contained in:
Regalis
2015-11-25 17:58:17 +02:00
parent 4b5126675c
commit f1e1b0b4f0
9 changed files with 65 additions and 187 deletions
@@ -198,7 +198,9 @@ namespace Barotrauma.Items.Components
if (it == null) continue;
PowerTransfer pt = it.GetComponent<PowerTransfer>();
if (pt != null) load += pt.PowerLoad;
if (pt == null) continue;
load = Math.Max(load,pt.PowerLoad);
}
}
}
@@ -39,14 +39,14 @@ namespace Barotrauma.Items.Components
}
}
[HasDefaultValue(10.0f, false), Editable]
[HasDefaultValue(10.0f, true), Editable]
public float Capacity
{
get { return capacity; }
set { capacity = Math.Max(value, 1.0f); }
}
[HasDefaultValue(10.0f, false), Editable]
[HasDefaultValue(10.0f, true), Editable]
public float RechargeSpeed
{
get { return rechargeSpeed; }