Release 1.11.5.0 - Winter Update 2025 Hotfix 1

This commit is contained in:
Regalis11
2025-12-18 12:26:30 +02:00
parent b6c3724bf8
commit 4dc0ce9a2f
13 changed files with 46 additions and 23 deletions
@@ -440,13 +440,14 @@ namespace Barotrauma
if (Identifier == Tags.DeconstructThis && item.AllowDeconstruct)
{
if (item.AllowDeconstruct && !Item.DeconstructItems.Contains(item) &&
//only allow deconstructing if there are deconstruction recipes that
if (item.AllowDeconstruct && !Item.DeconstructItems.Contains(item) &&
//only allow deconstructing if there are no deconstruction recipes (= deconstructing yields nothing), or deconstruction recipes that
(item.Prefab.DeconstructItems.None() ||
item.Prefab.DeconstructItems.Any(deconstructItem =>
//1. don't require any additional items (bots can't handle that)
deconstructItem.RequiredOtherItem.None() &&
//2. don't require a research station (bots don't know how to use those)
(deconstructItem.RequiredDeconstructor.Length == 0 || deconstructItem.RequiredDeconstructor.Any(d => d != Tags.GeneticResearchStation))))
(deconstructItem.RequiredDeconstructor.Length == 0 || deconstructItem.RequiredDeconstructor.Any(d => d != Tags.GeneticResearchStation)))))
{
return true;
}
@@ -624,9 +624,9 @@ namespace Barotrauma
{
get
{
if (IsPet)
if (IsPet && AIController is EnemyAIController { PetBehavior: { } petBehavior })
{
string petName = (AIController as EnemyAIController).PetBehavior.GetTagName();
string petName = petBehavior.GetTagName();
if (!string.IsNullOrEmpty(petName)) { return petName; }
}
@@ -311,7 +311,7 @@ namespace Barotrauma
if (Character.AnimController.Limbs.None(l => l.HealthIndex == i))
{
DebugConsole.AddWarning(
$"Potential error in character {Character.DisplayName}: none of the limbs have been set to use the LimbHealth #{i}, and it will do nothing. "
$"Potential error in character \"{Character.Prefab.Identifier}\": none of the limbs have been set to use the LimbHealth #{i}, and it will do nothing. "
+ "Did you forget to set the HealthIndex values of the limbs?", contentPackage: Character.ContentPackage);
}
}
@@ -1,8 +1,9 @@
#nullable enable
#nullable enable
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Barotrauma.Items.Components;
using Microsoft.Xna.Framework;
@@ -142,7 +143,7 @@ namespace Barotrauma
Vector2 drawPos = Position;
drawPos.Y = -drawPos.Y;
foreach (var c in Connectors)
foreach (var c in Connectors.OrderBy(static c => c.Connection.DisplayOrder))
{
bool isOutput = c.IsOutput;
@@ -462,18 +462,18 @@ namespace Barotrauma
}
private float impactTolerance;
[Serialize(0.0f, IsPropertySaveable.No), ConditionallyEditable(ConditionallyEditable.ConditionType.ReceivesSubmarineImpacts, MinValueFloat = 0, MaxValueFloat = 100)]
[Serialize(0.0f, IsPropertySaveable.Yes), ConditionallyEditable(ConditionallyEditable.ConditionType.ReceivesSubmarineImpacts, MinValueFloat = 0, MaxValueFloat = 100)]
public float ImpactTolerance
{
get { return impactTolerance; }
set { impactTolerance = Math.Max(value, 0.0f); }
}
[Serialize(0.0f, IsPropertySaveable.No, description: "The amount of damage the item takes from impacts. Acts as a multiplier on the strength of the impact. Note that ImpactTolerance must be set for impacts to register."),
[Serialize(0.0f, IsPropertySaveable.Yes, description: "The amount of damage the item takes from impacts. Acts as a multiplier on the strength of the impact. Note that ImpactTolerance must be set for impacts to register."),
ConditionallyEditable(ConditionallyEditable.ConditionType.ReceivesSubmarineImpacts, MinValueFloat = 0, MaxValueFloat = 100)]
public float ImpactDamage { get; set; }
[Serialize(1.0f, IsPropertySaveable.No, description: "Probability for impacts to register. Defaults to 1. Note that ImpactTolerance must also be set for impacts to register."),
[Serialize(1.0f, IsPropertySaveable.Yes, description: "Probability for impacts to register. Defaults to 1. Note that ImpactTolerance must also be set for impacts to register."),
ConditionallyEditable(ConditionallyEditable.ConditionType.ReceivesSubmarineImpacts, MinValueFloat = 0, MaxValueFloat = 1)]
public float ImpactDamageProbability { get; set; }