- Input field for rects.
- Input fields for ItemComponent requiredItems. - Added tooltips to a bunch of editable ItemComponent properties. - Misc fixes.
This commit is contained in:
@@ -32,14 +32,15 @@ namespace Barotrauma.Items.Components
|
||||
private set;
|
||||
}
|
||||
|
||||
[Editable, Serialize(10.0f, true)]
|
||||
[Editable(ToolTip = "Maximum output of the device when fully charged (kW)."), Serialize(10.0f, true)]
|
||||
public float MaxOutPut
|
||||
{
|
||||
set { maxOutput = value; }
|
||||
get { return maxOutput; }
|
||||
}
|
||||
|
||||
[Serialize(10.0f, true), Editable]
|
||||
[Serialize(10.0f, true), Editable(ToolTip = "The maximum capacity of the device (kW * min). "+
|
||||
"For example, a value of 1000 means the device can output 100 kilowatts of power for 10 minutes, or 1000 kilowatts for 1 minute.")]
|
||||
public float Capacity
|
||||
{
|
||||
get { return capacity; }
|
||||
@@ -75,7 +76,8 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
[Serialize(10.0f, false), Editable]
|
||||
[Serialize(10.0f, false), 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; }
|
||||
|
||||
@@ -18,14 +18,16 @@ namespace Barotrauma.Items.Components
|
||||
//the maximum amount of power the item can draw from connected items
|
||||
protected float powerConsumption;
|
||||
|
||||
[Editable, Serialize(0.5f, true)]
|
||||
[Serialize(0.5f, true), Editable(ToolTip = "The minimum voltage required for the device to function. "+
|
||||
"The voltage is calculated as power / powerconsumption, meaning that a device "+
|
||||
"with a power consumption of 1000 kW would need at least 500 kW of power to work if the minimum voltage is set to 0.5.")]
|
||||
public float MinVoltage
|
||||
{
|
||||
get { return minVoltage; }
|
||||
set { minVoltage = value; }
|
||||
}
|
||||
|
||||
[Editable, Serialize(0.0f, true)]
|
||||
[Editable(ToolTip = "How much power the device draws (or attempts to draw) from the electrical grid."), Serialize(0.0f, true)]
|
||||
public float PowerConsumption
|
||||
{
|
||||
get { return powerConsumption; }
|
||||
@@ -33,12 +35,12 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
|
||||
|
||||
[Serialize(false,true)]
|
||||
[Serialize(false, true)]
|
||||
public override bool IsActive
|
||||
{
|
||||
get { return base.IsActive; }
|
||||
set
|
||||
{
|
||||
set
|
||||
{
|
||||
base.IsActive = value;
|
||||
if (!value) currPowerConsumption = 0.0f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user