Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop

This commit is contained in:
EvilFactory
2024-01-11 11:42:33 -03:00
20 changed files with 263 additions and 137 deletions
@@ -255,7 +255,11 @@ namespace Barotrauma
}
if (subObjectives.Any(so => so.CanBeCompleted)) { return; }
UpdateSimpleEscape(deltaTime);
if (cannotFindSafeHull && !character.IsInFriendlySub && objectiveManager.Objectives.None(o => o is AIObjectiveReturn))
bool inFriendlySub =
character.IsInFriendlySub ||
(character.IsEscorted && character.IsInPlayerSub);
if (cannotFindSafeHull && !inFriendlySub && objectiveManager.Objectives.None(o => o is AIObjectiveReturn))
{
if (OrderPrefab.Prefabs.TryGet("return".ToIdentifier(), out OrderPrefab orderPrefab))
{
@@ -436,7 +436,10 @@ namespace Barotrauma
break;
case "statvalue":
var newStatValue = new AppliedStatValue(subElement);
afflictionStatValues.Add(newStatValue.StatType, newStatValue);
if (newStatValue.StatType == StatTypes.None || !afflictionStatValues.TryAdd(newStatValue.StatType, newStatValue))
{
DebugConsole.ThrowError($"Invalid stat value in the affliction \"{parentDebugName}\".", contentPackage: element.ContentPackage);
}
break;
case "abilityflag":
AbilityFlags flagType = subElement.GetAttributeEnum("flagtype", AbilityFlags.None);