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); }
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));
private bool IsLoaded(ItemComponent weapon) => weapon.HasRequiredContainedItems(character, addMessage: false);