v1.2.6.0 (Winter Update)

This commit is contained in:
Regalis11
2023-12-14 16:11:27 +02:00
parent af8cc89fce
commit b91e85559d
375 changed files with 7771 additions and 2874 deletions
@@ -136,6 +136,12 @@ namespace Barotrauma
public readonly List<ParticleParams> DamageEmitters = new List<ParticleParams>();
public readonly List<InventoryParams> Inventories = new List<InventoryParams>();
public HealthParams Health { get; private set; }
/// <summary>
/// Parameters for EnemyAIController. Not used by HumanAIController.
/// </summary>
/// <returns>
/// AIParams or null. Use <see cref="EnemyAIController.AIParams"/>, if you don't expect nulls.
/// </returns>
public AIParams AI { get; private set; }
public CharacterParams(CharacterFile file)
@@ -559,7 +565,8 @@ namespace Barotrauma
DebugConsole.AddWarning($"Character \"{character.SpeciesName}\" has a negative crush depth. "+
"Previously the crush depths were defined as display units (e.g. -30000 would correspond to 300 meters below the level), "+
"but now they're in meters (e.g. 3000 would correspond to a depth of 3000 meters displayed on the nav terminal). "+
$"Changing the crush depth from {CrushDepth} to {newCrushDepth}.");
$"Changing the crush depth from {CrushDepth} to {newCrushDepth}.",
element.ContentPackage);
CrushDepth = newCrushDepth;
}
}
@@ -602,7 +609,8 @@ namespace Barotrauma
public void AddItem(string identifier = null)
{
identifier = identifier ?? "";
if (Element == null) { return; }
identifier ??= "";
var element = CreateElement("item", new XAttribute("identifier", identifier));
Element.Add(element);
var item = new InventoryItem(element, Character);
@@ -711,7 +719,8 @@ namespace Barotrauma
if (HasTag(tag))
{
target = null;
DebugConsole.AddWarning($"Trying to add multiple targets with the same tag ('{tag}') defined! Only the first will be used!");
DebugConsole.AddWarning($"Trying to add multiple targets with the same tag ('{tag}') defined! Only the first will be used!",
targetElement.ContentPackage);
return false;
}
else
@@ -730,6 +739,11 @@ namespace Barotrauma
public bool TryAddNewTarget(Identifier tag, AIState state, float priority, out TargetParams targetParams)
{
if (Element == null)
{
targetParams = null;
return false;
}
var element = TargetParams.CreateNewElement(Character, tag, state, priority);
if (TryAddTarget(element, out targetParams))
{