Unstable 0.17.0.0

This commit is contained in:
Markus Isberg
2022-02-26 02:43:01 +09:00
parent a83f375681
commit 3974067915
913 changed files with 32472 additions and 32364 deletions
@@ -29,49 +29,49 @@ namespace Barotrauma.Items.Components
private readonly Dictionary<Hull, HullData> hullDatas;
[Editable, Serialize(false, true, description: "Does the machine require inputs from water detectors in order to show the water levels inside rooms.")]
[Editable, Serialize(false, IsPropertySaveable.Yes, description: "Does the machine require inputs from water detectors in order to show the water levels inside rooms.")]
public bool RequireWaterDetectors
{
get;
set;
}
[Editable, Serialize(true, true, description: "Does the machine require inputs from oxygen detectors in order to show the oxygen levels inside rooms.")]
[Editable, Serialize(true, IsPropertySaveable.Yes, description: "Does the machine require inputs from oxygen detectors in order to show the oxygen levels inside rooms.")]
public bool RequireOxygenDetectors
{
get;
set;
}
[Editable, Serialize(true, true, description: "Should damaged walls be displayed by the machine.")]
[Editable, Serialize(true, IsPropertySaveable.Yes, description: "Should damaged walls be displayed by the machine.")]
public bool ShowHullIntegrity
{
get;
set;
}
[Editable, Serialize(true, true, description: "Enable hull status mode.")]
[Editable, Serialize(true, IsPropertySaveable.Yes, description: "Enable hull status mode.")]
public bool EnableHullStatus
{
get;
set;
}
[Editable, Serialize(true, true, description: "Enable electrical view mode.")]
[Editable, Serialize(true, IsPropertySaveable.Yes, description: "Enable electrical view mode.")]
public bool EnableElectricalView
{
get;
set;
}
[Editable, Serialize(true, true, description: "Enable item finder mode.")]
[Editable, Serialize(true, IsPropertySaveable.Yes, description: "Enable item finder mode.")]
public bool EnableItemFinder
{
get;
set;
}
public MiniMap(Item item, XElement element)
public MiniMap(Item item, ContentXElement element)
: base(item, element)
{
IsActive = true;
@@ -114,9 +114,6 @@ namespace Barotrauma.Items.Components
}
#endif
currPowerConsumption = powerConsumption;
currPowerConsumption *= MathHelper.Lerp(1.5f, 1.0f, item.Condition / item.MaxCondition);
hasPower = Voltage > MinVoltage;
if (hasPower)
{
@@ -124,6 +121,19 @@ namespace Barotrauma.Items.Components
}
}
/// <summary>
/// Power consumption of the MiniMap. Only consume power when active and adjust consumption based on condition.
/// </summary>
public override float GetCurrentPowerConsumption(Connection connection = null)
{
if (connection != powerIn || !IsActive)
{
return 0;
}
return PowerConsumption * MathHelper.Lerp(1.5f, 1.0f, item.Condition / item.MaxCondition);
}
public override bool Pick(Character picker)
{
return picker != null;