Fixed PowerContainer RechargeSpeed being capped to the MaxRechargeSpeed set in the prefab due to RechargeSpeed being loaded before MaxRechargeSpeed. Closes #612
This commit is contained in:
@@ -63,6 +63,14 @@ namespace Barotrauma.Items.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Serialize(10.0f, true), Editable(ToolTip = "How fast the device can be recharged. "+
|
||||||
|
"For example, a recharge speed of 100 kW and a capacity of 1000 kW*min would mean it takes 10 minutes to fully charge the device.")]
|
||||||
|
public float MaxRechargeSpeed
|
||||||
|
{
|
||||||
|
get { return maxRechargeSpeed; }
|
||||||
|
set { maxRechargeSpeed = Math.Max(value, 1.0f); }
|
||||||
|
}
|
||||||
|
|
||||||
[Serialize(10.0f, true), Editable]
|
[Serialize(10.0f, true), Editable]
|
||||||
public float RechargeSpeed
|
public float RechargeSpeed
|
||||||
@@ -76,14 +84,6 @@ namespace Barotrauma.Items.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serialize(10.0f, true), Editable(ToolTip = "How fast the device can be recharged. "+
|
|
||||||
"For example, a recharge speed of 100 kW and a capacity of 1000 kW*min would mean it takes 10 minutes to fully charge the device.")]
|
|
||||||
public float MaxRechargeSpeed
|
|
||||||
{
|
|
||||||
get { return maxRechargeSpeed; }
|
|
||||||
set { maxRechargeSpeed = Math.Max(value, 1.0f); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public PowerContainer(Item item, XElement element)
|
public PowerContainer(Item item, XElement element)
|
||||||
: base(item, element)
|
: base(item, element)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user