14 private int escapeProgress;
15 private bool isBeingWatched;
17 private readonly
bool shouldSwitchTeams;
19 const string EscapeTeamChangeIdentifier =
"escape";
23 this.shouldSwitchTeams = shouldSwitchTeams;
26 escapeTimer = EscapeIntervalTimer;
34 private float escapeTimer = 60f;
35 private const float EscapeIntervalTimer = 7.5f;
37 private float updateTimer;
38 private const float UpdateIntervalTimer = 4f;
46 public override void Update(
float deltaTime)
48 updateTimer -= deltaTime;
49 if (updateTimer <= 0.0f)
51 if (shouldSwitchTeams)
66 isBeingWatched =
false;
71 isBeingWatched =
true;
76 updateTimer = UpdateIntervalTimer * Rand.Range(0.75f, 1.25f);
80 protected override void Act(
float deltaTime)
84 escapeTimer -= deltaTime;
85 if (escapeTimer <= 0.0f)
87 escapeProgress += Rand.Range(2, 5);
88 if (escapeProgress > 15)
92 if (it.HasTag(Tags.HandLockerItem) && it.IsInteractable(
character))
98 escapeTimer = EscapeIntervalTimer * Rand.Range(0.75f, 1.25f);
IEnumerable< Hull > VisibleHulls
Returns hulls that are visible to the character, including the current hull. Note that this is not an...
override float GetPriority()
AIObjectiveEscapeHandcuffs(Character character, AIObjectiveManager objectiveManager, bool shouldSwitchTeams=true, bool beginInstantly=false, float priorityModifier=1)
override void Update(float deltaTime)
override bool CheckObjectiveState()
Should return whether the objective is completed or not.
override void Act(float deltaTime)
override Identifier Identifier
override bool AllowOutsideSubmarine
override bool AllowAutomaticItemUnequipping
override bool CanBeCompleted
override bool AllowInAnySub
float Priority
Final priority value after all calculations.
readonly Character character
readonly AIObjectiveManager objectiveManager
const float LowestOrderPriority
Maximum priority of an order given to the character (rightmost order in the crew list)
bool HasTeamChange(string identifier)
bool TryRemoveTeamChange(string identifier)
static readonly List< Character > CharacterList
bool TryAddNewTeamChange(string identifier, ActiveTeamChange newTeamChange)
IEnumerable< Item >?? HeldItems
Items the character has in their hand slots. Doesn't return nulls and only returns items held in both...
static bool IsActive(Character c)