/// <summary> /// This function is currently ineffective, but may be later extended to quickly set a validator /// on equipments to narrow them down to a set of ranges beyond just blacklisting. /// </summary> /// <param name="pickup">Takes a PickupIndex that's a valid equipment.</param> /// <returns>True if the given PickupIndex validates, otherwise false.</returns> private static bool EquipmentShared(EquipmentIndex pickup) { if (pickup == EquipmentIndex.None) { return(true); } return(IsEquipment(pickup) && !Blacklist.HasEquipment(pickup)); }
public static void RemoveAllUnBlacklistedEquipment() { foreach (var player in PlayerCharacterMasterController.instances.Select(p => p.master) .Where(p => p.inventory)) { if (!Blacklist.HasEquipment(player.inventory.currentEquipmentIndex)) { player.inventory.SetEquipmentIndex(EquipmentIndex.None); } } }