Release 1.9.7.0 - Summer Update 2025

This commit is contained in:
Regalis11
2025-06-17 16:38:11 +03:00
parent 22227f13e5
commit ea5a2bc693
297 changed files with 7344 additions and 2421 deletions
@@ -233,6 +233,7 @@ namespace Barotrauma.Items.Components
var cloneNode = InputOutputNodes[ioIndex];
cloneNode.Position = origNode.Position;
cloneNode.ReplaceAllConnectionLabelOverrides(origNode.ConnectionLabelOverrides);
}
if (!clonedContainedItems.Any()) { return; }
@@ -18,7 +18,14 @@ namespace Barotrauma.Items.Components
public readonly int MaxWires = 5;
public readonly string Name;
public readonly LocalizedString DisplayName;
private readonly LocalizedString _displayName;
public LocalizedString DisplayName
{
get => DisplayNameOverride ?? _displayName;
private init => _displayName = value;
}
public LocalizedString DisplayNameOverride;
private readonly HashSet<Wire> wires;
public IReadOnlyCollection<Wire> Wires => wires;
@@ -160,8 +167,7 @@ namespace Barotrauma.Items.Components
DisplayName = Name;
}
IsPower = Name == "power_in" || Name == "power" || Name == "power_out";
IsPower = element.GetAttributeBool("ispower", Name is "power_in" or "power" or "power_out");
LoadedWires = new List<(ushort wireId, int? connectionIndex)>();
foreach (var subElement in element.Elements())
@@ -325,23 +325,18 @@ namespace Barotrauma.Items.Components
private bool TriggersOn(Character character, bool triggerFromHumans, bool triggerFromPets, bool triggerFromMonsters)
{
if (IgnoreDead && character.IsDead) { return false; }
if (character.IsHuman)
{
if (!triggerFromHumans) { return false; }
}
else if (character.IsPet)
if (character.IsPet)
{
if (!triggerFromPets) { return false; }
}
else if (character.IsHuman || CharacterParams.CompareGroup(character.Group, CharacterPrefab.HumanGroup))
{
if (!triggerFromHumans) { return false; }
}
else
{
// Not a human or a pet -> monster?
if (!triggerFromMonsters) { return false; }
if (CharacterParams.CompareGroup(character.Group, CharacterPrefab.HumanGroup))
{
//characters in the "human" group aren't considered monsters (even if they were something like a friendly mudraptor)
return false;
}
}
// Check matching character, if defined.
if (targetCharacters.Any())
@@ -553,9 +553,9 @@ namespace Barotrauma.Items.Components
return new List<Vector2>(nodes);
}
public void SetNodes(List<Vector2> nodes)
public void SetNodes(IEnumerable<Vector2> nodes)
{
this.nodes = new List<Vector2>(nodes);
this.nodes = nodes.ToList();
UpdateSections();
}