Build 0.18.7.0

This commit is contained in:
Markus Isberg
2022-06-08 21:52:38 +09:00
parent 5a10b444ee
commit 4f5a3bf8b9
56 changed files with 401 additions and 245 deletions
@@ -68,7 +68,7 @@ namespace Barotrauma.Items.Components
get { return poweredList; }
}
public static readonly List<Connection> ChangedConnections = new List<Connection>();
public static readonly HashSet<Connection> ChangedConnections = new HashSet<Connection>();
public readonly static Dictionary<int, GridInfo> Grids = new Dictionary<int, GridInfo>();
@@ -158,6 +158,12 @@ namespace Barotrauma.Items.Components
}
}
/// <summary>
/// Essentially Voltage / MinVoltage (= how much of the minimum required voltage has been satisfied), clamped between 0 and 1.
/// Can be used by status effects or sounds to check if the item has enough power to run
/// </summary>
public float RelativeVoltage => minVoltage <= 0.0f ? 1.0f : MathHelper.Clamp(Voltage / minVoltage, 0.0f, 1.0f);
public bool PoweredByTinkering { get; set; }
[Editable, Serialize(true, IsPropertySaveable.Yes, description: "Can the item be damaged by electomagnetic pulses.")]