public AIObjectiveContainItem(Character character, string itemIdentifier, ItemContainer container, AIObjectiveManager objectiveManager, float priorityModifier = 1)
     : this(character, new string[] { itemIdentifier }, container, objectiveManager, priorityModifier)
 {
 }
Example #2
0
 public AIObjectiveFightIntruders(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier)
 {
 }
Example #3
0
 public AIObjectiveRepairItems(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1, Item prioritizedItem = null)
     : base(character, objectiveManager, priorityModifier)
 {
     this.prioritizedItem = prioritizedItem;
 }
 public AIObjectiveDecontainItem(Character character, string[] itemIdentifiers, AIObjectiveManager objectiveManager, ItemContainer sourceContainer, ItemContainer targetContainer = null, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier)
 {
     this.itemIdentifiers = itemIdentifiers;
     for (int i = 0; i < itemIdentifiers.Length; i++)
     {
         itemIdentifiers[i] = itemIdentifiers[i].ToLowerInvariant();
     }
     this.sourceContainer = sourceContainer;
     this.targetContainer = targetContainer;
 }
 public AIObjectiveRepairItem(Character character, Item item, AIObjectiveManager objectiveManager, float priorityModifier = 1, bool isPriority = false)
     : base(character, objectiveManager, priorityModifier)
 {
     Item            = item;
     this.isPriority = isPriority;
 }
Example #6
0
 public AIObjectiveIdle(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1) : base(character, objectiveManager, priorityModifier)
 {
     standStillTimer = Rand.Range(-10.0f, 10.0f);
     walkDuration    = Rand.Range(0.0f, 10.0f);
 }
 public AIObjectiveExtinguishFires(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1) : base(character, objectiveManager, priorityModifier)
 {
 }
Example #8
0
 public AIObjectiveLoop(Character character, AIObjectiveManager objectiveManager, float priorityModifier, string option = null)
     : base(character, objectiveManager, priorityModifier, option)
 {
 }
 public AIObjectiveRepairItem(Character character, Item item, AIObjectiveManager objectiveManager, float priorityModifier = 1) : base(character, objectiveManager, priorityModifier)
 {
     Item = item;
 }
Example #10
0
 public AIObjectiveFindDivingGear(Character character, bool needDivingSuit, AIObjectiveManager objectiveManager, float priorityModifier = 1) : base(character, objectiveManager, priorityModifier)
 {
     gearTag     = needDivingSuit ? "divingsuit" : "divingmask";
     fallbackTag = needDivingSuit ? "divingsuit" : "diving";
 }
 public AIObjectiveGetItem(Character character, string itemIdentifier, AIObjectiveManager objectiveManager, bool equip = false, bool checkInventory = true, float priorityModifier = 1)
     : this(character, new string[] { itemIdentifier }, objectiveManager, equip, checkInventory, priorityModifier)
 {
 }
Example #12
0
 public AIObjectiveFixLeak(Gap leak, Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1, bool ignoreSeverityAndDistance = false) : base(character, objectiveManager, priorityModifier)
 {
     Leak = leak;
     IgnoreSeverityAndDistance = ignoreSeverityAndDistance;
 }
Example #13
0
 public AIObjectiveFindSafety(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1) : base(character, objectiveManager, priorityModifier)
 {
 }
 public AIObjectiveFindDivingGear(Character character, bool needsDivingSuit, AIObjectiveManager objectiveManager, float priorityModifier = 1) : base(character, objectiveManager, priorityModifier)
 {
     gearTag = needsDivingSuit ? HEAVY_DIVING_GEAR : LIGHT_DIVING_GEAR;
 }
Example #15
0
 public override float GetPriority(AIObjectiveManager objectiveManager)
 {
     return(1.0f);
 }
 public AIObjectiveGetItem(Character character, string identifierOrTag, AIObjectiveManager objectiveManager, bool equip = true, bool checkInventory = true, float priorityModifier = 1, bool spawnItemIfNotFound = false)
     : this(character, new string[] { identifierOrTag }, objectiveManager, equip, checkInventory, priorityModifier, spawnItemIfNotFound)
 {
 }
 public AIObjectiveExtinguishFire(Character character, Hull targetHull, AIObjectiveManager objectiveManager, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier)
 {
     this.targetHull = targetHull;
 }
Example #18
0
        public AIObjectiveCombat(Character character, Character enemy, CombatMode mode, AIObjectiveManager objectiveManager, float priorityModifier = 1, float coolDown = 10.0f)
            : base(character, objectiveManager, priorityModifier)
        {
            if (mode == CombatMode.None)
            {
#if DEBUG
                DebugConsole.ThrowError("Combat mode == None");
#endif
                return;
            }
            Enemy         = enemy;
            coolDownTimer = coolDown;
            findSafety    = objectiveManager.GetObjective <AIObjectiveFindSafety>();
            if (findSafety != null)
            {
                findSafety.Priority = 0;
                HumanAIController.UnreachableHulls.Clear();
            }
            Mode        = mode;
            initialMode = Mode;
            if (Enemy == null)
            {
                Mode = CombatMode.Retreat;
            }
            spreadTimer = Rand.Range(-10, 10);
            HumanAIController.SortTimer = 0;
        }
 public AIObjectiveFixLeak(Gap leak, Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1, bool isPriority = false) : base(character, objectiveManager, priorityModifier)
 {
     Leak            = leak;
     this.isPriority = isPriority;
 }
Example #20
0
 public AIObjectiveChargeBatteries(Character character, AIObjectiveManager objectiveManager, string option, float priorityModifier)
     : base(character, objectiveManager, priorityModifier, option)
 {
 }
Example #21
0
 public AIObjectiveRescueAll(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier)
 {
 }
Example #22
0
 public AIObjectiveDecontainItem(Character character, Item targetItem, ItemContainer sourceContainer, AIObjectiveManager objectiveManager, ItemContainer targetContainer = null, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier)
 {
     this.targetItem      = targetItem;
     this.sourceContainer = sourceContainer;
     this.targetContainer = targetContainer;
 }
 public AIObjectivePumpWater(Character character, AIObjectiveManager objectiveManager, string option, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier, option)
 {
 }
 public AIObjectiveDecontainItem(Character character, string itemIdentifier, AIObjectiveManager objectiveManager, ItemContainer sourceContainer, ItemContainer targetContainer = null, float priorityModifier = 1)
     : this(character, new string[] { itemIdentifier }, objectiveManager, sourceContainer, targetContainer, priorityModifier)
 {
 }
Example #25
0
 public AIObjectiveFixLeaks(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1, Hull prioritizedHull = null) : base(character, objectiveManager, priorityModifier)
 {
     PrioritizedHull = prioritizedHull;
 }
Example #26
0
 public AIObjectiveCombat(Character character, Character enemy, CombatMode mode, AIObjectiveManager objectiveManager, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier)
 {
     Enemy         = enemy;
     coolDownTimer = coolDown;
     findSafety    = objectiveManager.GetObjective <AIObjectiveFindSafety>();
     if (findSafety != null)
     {
         findSafety.Priority = 0;
         findSafety.unreachable.Clear();
     }
     Mode        = mode;
     initialMode = Mode;
     if (Enemy == null)
     {
         Mode = CombatMode.Retreat;
     }
 }
 public AIObjectiveContainItem(Character character, Item item, ItemContainer container, AIObjectiveManager objectiveManager, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier)
 {
     this.container = container;
     this.item      = item;
 }