Exemplo n.º 1
0
        private float CalculateWeaponPriority(ItemComponent weapon)
        {
            float priority = weapon.CombatPriority;

            // Halve the priority for weapons that don't have proper ammunition loaded.
            if (!weapon.HasRequiredContainedItems(character, addMessage: false))
            {
                priority /= 2;
            }
            return(priority);
        }
Exemplo n.º 2
0
 private bool IsLoaded(ItemComponent weapon, bool checkContainedItems = true) => 
     weapon.HasRequiredContainedItems(character, addMessage: false) &&
     (!checkContainedItems || weapon.Item.OwnInventory == null || weapon.Item.OwnInventory.AllItems.Any(i => i.Condition > 0));
Exemplo n.º 3
0
 private bool IsLoaded(ItemComponent weapon) => weapon.HasRequiredContainedItems(character, addMessage: false);