コード例 #1
0
 public AIObjectiveContainItem(Character character, string itemIdentifier, ItemContainer container, AIObjectiveManager objectiveManager, float priorityModifier = 1)
     : this(character, new string[] { itemIdentifier }, container, objectiveManager, priorityModifier)
 {
 }
コード例 #2
0
 public AIObjectiveFightIntruders(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier)
 {
 }
コード例 #3
0
 public AIObjectiveRepairItems(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1, Item prioritizedItem = null)
     : base(character, objectiveManager, priorityModifier)
 {
     this.prioritizedItem = prioritizedItem;
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 public AIObjectiveRepairItem(Character character, Item item, AIObjectiveManager objectiveManager, float priorityModifier = 1, bool isPriority = false)
     : base(character, objectiveManager, priorityModifier)
 {
     Item            = item;
     this.isPriority = isPriority;
 }
コード例 #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);
 }
コード例 #7
0
 public AIObjectiveExtinguishFires(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1) : base(character, objectiveManager, priorityModifier)
 {
 }
コード例 #8
0
 public AIObjectiveLoop(Character character, AIObjectiveManager objectiveManager, float priorityModifier, string option = null)
     : base(character, objectiveManager, priorityModifier, option)
 {
 }
コード例 #9
0
 public AIObjectiveRepairItem(Character character, Item item, AIObjectiveManager objectiveManager, float priorityModifier = 1) : base(character, objectiveManager, priorityModifier)
 {
     Item = item;
 }
コード例 #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";
 }
コード例 #11
0
 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)
 {
 }
コード例 #12
0
 public AIObjectiveFixLeak(Gap leak, Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1, bool ignoreSeverityAndDistance = false) : base(character, objectiveManager, priorityModifier)
 {
     Leak = leak;
     IgnoreSeverityAndDistance = ignoreSeverityAndDistance;
 }
コード例 #13
0
 public AIObjectiveFindSafety(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1) : base(character, objectiveManager, priorityModifier)
 {
 }
コード例 #14
0
 public AIObjectiveFindDivingGear(Character character, bool needsDivingSuit, AIObjectiveManager objectiveManager, float priorityModifier = 1) : base(character, objectiveManager, priorityModifier)
 {
     gearTag = needsDivingSuit ? HEAVY_DIVING_GEAR : LIGHT_DIVING_GEAR;
 }
コード例 #15
0
 public override float GetPriority(AIObjectiveManager objectiveManager)
 {
     return(1.0f);
 }
コード例 #16
0
 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)
 {
 }
コード例 #17
0
 public AIObjectiveExtinguishFire(Character character, Hull targetHull, AIObjectiveManager objectiveManager, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier)
 {
     this.targetHull = targetHull;
 }
コード例 #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;
        }
コード例 #19
0
 public AIObjectiveFixLeak(Gap leak, Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1, bool isPriority = false) : base(character, objectiveManager, priorityModifier)
 {
     Leak            = leak;
     this.isPriority = isPriority;
 }
コード例 #20
0
 public AIObjectiveChargeBatteries(Character character, AIObjectiveManager objectiveManager, string option, float priorityModifier)
     : base(character, objectiveManager, priorityModifier, option)
 {
 }
コード例 #21
0
 public AIObjectiveRescueAll(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier)
 {
 }
コード例 #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;
 }
コード例 #23
0
 public AIObjectivePumpWater(Character character, AIObjectiveManager objectiveManager, string option, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier, option)
 {
 }
コード例 #24
0
 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)
 {
 }
コード例 #25
0
 public AIObjectiveFixLeaks(Character character, AIObjectiveManager objectiveManager, float priorityModifier = 1, Hull prioritizedHull = null) : base(character, objectiveManager, priorityModifier)
 {
     PrioritizedHull = prioritizedHull;
 }
コード例 #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;
     }
 }
コード例 #27
0
 public AIObjectiveContainItem(Character character, Item item, ItemContainer container, AIObjectiveManager objectiveManager, float priorityModifier = 1)
     : base(character, objectiveManager, priorityModifier)
 {
     this.container = container;
     this.item      = item;
 }