This commit is contained in:
EvilFactory
2025-04-29 07:27:36 -03:00
26 changed files with 198 additions and 76 deletions
@@ -550,14 +550,14 @@ namespace Barotrauma
if (subObjective.IsCompleted)
{
#if DEBUG
DebugConsole.NewMessage($"{character.Name}: Removing SUBobjective {subObjective.DebugTag} of {DebugTag}, because it is completed.", Color.LightGreen);
DebugConsole.NewMessage($"{character.Name}: Removing subObjective \"{subObjective.DebugTag}\" of \"{DebugTag}\", because it is completed.", Color.LightGreen);
#endif
subObjectives.Remove(subObjective);
}
else if (!subObjective.CanBeCompleted)
{
#if DEBUG
DebugConsole.NewMessage($"{character.Name}: Removing SUBobjective {subObjective.DebugTag} of {DebugTag}, because it cannot be completed.", Color.Red);
DebugConsole.NewMessage($"{character.Name}: Removing subObjective \"{subObjective.DebugTag}\" of \"{DebugTag}\", because it cannot be completed.", Color.Red);
#endif
subObjectives.Remove(subObjective);
if (AbandonWhenCannotCompleteSubObjectives)
@@ -12,6 +12,7 @@ namespace Barotrauma
class AIObjectiveGetItem : AIObjective
{
public override Identifier Identifier { get; set; } = "get item".ToIdentifier();
public override string DebugTag => $"{Identifier} ({(IdentifiersOrTags == null || IdentifiersOrTags.None() ? "none" : string.Join(", ", IdentifiersOrTags))})";
public override bool AbandonWhenCannotCompleteSubObjectives => false;
public override bool AllowMultipleInstances => true;
@@ -10,6 +10,7 @@ namespace Barotrauma
class AIObjectiveGoTo : AIObjective
{
public override Identifier Identifier { get; set; } = "go to".ToIdentifier();
public override string DebugTag => $"{Identifier} ({Target?.ToString() ?? "none"})";
public override bool KeepDivingGearOn => GetTargetHull() == null;
@@ -10,7 +10,7 @@ namespace Barotrauma
class AIObjectiveOperateItem : AIObjective
{
public override Identifier Identifier { get; set; } = "operate item".ToIdentifier();
public override string DebugTag => $"{Identifier} {component.Name}";
public override string DebugTag => $"{Identifier} ({component.Name})";
public override bool AllowAutomaticItemUnequipping => true;
public override bool AllowMultipleInstances => true;
@@ -10,6 +10,8 @@ namespace Barotrauma
{
public override Identifier Identifier { get; set; } = "repair item".ToIdentifier();
public override string DebugTag => $"{Identifier} ({Item?.Name ?? "null"})";
protected override bool AllowInFriendlySubs => true;
public override bool KeepDivingGearOn => Item?.CurrentHull == null;
protected override bool AllowWhileHandcuffed => false;