public static void AddDefaultShrineDrops() { var t1 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier1); var t2 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier2); var t3 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier3); var eq = ItemDropAPI.GetDefaultEquipmentDropList(); var shrineSelections = new[] { new List <ItemIndex> { ItemIndex.None }.ToSelection(ItemDropAPI.DefaultShrineFailureWeight), t1.ToSelection(ItemDropAPI.DefaultShrineTier1Weight), t2.ToSelection(ItemDropAPI.DefaultShrineTier2Weight), t3.ToSelection(ItemDropAPI.DefaultShrineTier3Weight), eq.ToSelection(ItemDropAPI.DefaultShrineEquipmentWeight) }; foreach (var sel in shrineSelections) { sel.IsDefaults = true; } RemoveDefaultDrops(ItemDropLocation.Shrine); ItemDropAPI.AddDrops(ItemDropLocation.Shrine, shrineSelections); }
public static void AddBossDefaultDrops() { ItemDropAPI.IncludeSpecialBossDrops = true; var t2 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier2); ItemDropAPI.AddDrops(ItemDropLocation.Boss, t2.ToSelection()); }
public static void AddLunarChestDefaultDrops() { var lun = ItemDropAPI.GetDefaultLunarDropList(); var lunarSelections = lun.ToSelection(); lunarSelections.IsDefaults = true; RemoveDefaultDrops(ItemDropLocation.LunarChest); ItemDropAPI.AddDrops(ItemDropLocation.LunarChest, lunarSelections); }
public static void AddEquipmentChestDefaultDrops() { var eq = ItemDropAPI.GetDefaultEquipmentDropList(); var equipmentSelections = eq.ToSelection(); equipmentSelections.IsDefaults = true; RemoveDefaultDrops(ItemDropLocation.EquipmentChest); ItemDropAPI.AddDrops(ItemDropLocation.EquipmentChest, eq.ToSelection()); }
public static void AddChestDefaultDrops() { var t1 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier1); var t2 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier2); var t3 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier3); var chestSelections = new[] { t1.ToSelection(ItemDropAPI.DefaultSmallChestTier1DropChance), t2.ToSelection(ItemDropAPI.DefaultSmallChestTier2DropChance), t3.ToSelection(ItemDropAPI.DefaultSmallChestTier3DropChance) }; var lockboxSelections = new[] { ItemDropAPI.GetDefaultDropList(ItemTier.Tier1).ToSelection(ItemDropAPI.DefaultSmallChestTier1DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier2).ToSelection(ItemDropAPI.DefaultSmallChestTier2DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier3).ToSelection(ItemDropAPI.DefaultSmallChestTier3DropChance) }; var utilitySelections = new[] { ItemDropAPI.GetDefaultDropList(ItemTier.Tier1, ItemTag.Utility).ToSelection(ItemDropAPI.DefaultSmallChestTier1DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier2, ItemTag.Utility).ToSelection(ItemDropAPI.DefaultSmallChestTier2DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier3, ItemTag.Utility).ToSelection(ItemDropAPI.DefaultSmallChestTier3DropChance), }; var damageSelections = new[] { ItemDropAPI.GetDefaultDropList(ItemTier.Tier1, ItemTag.Damage).ToSelection(ItemDropAPI.DefaultSmallChestTier1DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier2, ItemTag.Damage).ToSelection(ItemDropAPI.DefaultSmallChestTier2DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier3, ItemTag.Damage).ToSelection(ItemDropAPI.DefaultSmallChestTier3DropChance), }; var healingSelections = new[] { ItemDropAPI.GetDefaultDropList(ItemTier.Tier1, ItemTag.Healing).ToSelection(ItemDropAPI.DefaultSmallChestTier1DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier2, ItemTag.Healing).ToSelection(ItemDropAPI.DefaultSmallChestTier2DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier3, ItemTag.Healing).ToSelection(ItemDropAPI.DefaultSmallChestTier3DropChance), }; var scavSelections = new[] { ItemDropAPI.GetDefaultDropList(ItemTier.Tier1).ToSelection(ItemDropAPI.DefaultScavBackpackTier1DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier2).ToSelection(ItemDropAPI.DefaultScavBackpackTier2DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier3).ToSelection(ItemDropAPI.DefaultScavBackpackTier3DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Lunar).ToSelection(ItemDropAPI.DefaultScavBackpackLunarDropChance), }; ItemDropAPI.AddDrops(ItemDropLocation.UtilityChest, utilitySelections); ItemDropAPI.AddDrops(ItemDropLocation.DamageChest, damageSelections); ItemDropAPI.AddDrops(ItemDropLocation.HealingChest, healingSelections); ItemDropAPI.AddDrops(ItemDropLocation.Lockbox, lockboxSelections); ItemDropAPI.AddDrops(ItemDropLocation.SmallChest, chestSelections); ItemDropAPI.AddDrops(ItemDropLocation.MediumChest, t2.ToSelection(ItemDropAPI.DefaultMediumChestTier2DropChance), t3.ToSelection(ItemDropAPI.DefaultMediumChestTier3DropChance)); ItemDropAPI.AddDrops(ItemDropLocation.LargeChest, t3.ToSelection(ItemDropAPI.DefaultLargeChestTier3DropChance)); ItemDropAPI.AddDrops(ItemDropLocation.ScavBackPack, scavSelections); }
public static void AddChestDefaultDrops() { var t1 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier1); var t2 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier2); var t3 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier3); var chestSelections = new [] { t1.ToSelection(ItemDropAPI.DefaultChestTier1DropChance), t2.ToSelection(ItemDropAPI.DefaultChestTier2DropChance), t3.ToSelection(ItemDropAPI.DefaultChestTier3DropChance) }; ItemDropAPI.AddDrops(ItemDropLocation.SmallChest, chestSelections); ItemDropAPI.AddDrops(ItemDropLocation.MediumChest, t2.ToSelection(0.8f), t3.ToSelection(0.2f)); ItemDropAPI.AddDrops(ItemDropLocation.LargeChest, t3.ToSelection()); }
private static void AddEquipmentAction(List <EquipmentDef> equipmentDefinitions) { foreach (var customEquipment in EquipmentDefinitions) { equipmentDefinitions.Add(customEquipment.EquipmentDef); R2API.Logger.LogInfo($"Custom Equipment: {customEquipment.EquipmentDef.nameToken} added"); } var equipments = EquipmentDefinitions.Where(c => c.EquipmentDef.canDrop && !c.EquipmentDef.isLunar).Select(x => x.EquipmentDef.equipmentIndex).ToArray(); var lunarEquipments = EquipmentDefinitions.Where(c => c.EquipmentDef.canDrop && c.EquipmentDef.isLunar).Select(x => x.EquipmentDef.equipmentIndex).ToList(); ItemDropAPI.AddToDefaultEquipment(equipments); ItemDropAPI.AddDrops(ItemDropLocation.LunarChest, lunarEquipments.ToSelection()); _equipmentCatalogInitialized = true; }
public static void AddChestDefaultDrops() { var t1 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier1); var t2 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier2); var t3 = ItemDropAPI.GetDefaultDropList(ItemTier.Tier3); var chestSelections = new[] { t1.ToSelection(ItemDropAPI.DefaultSmallChestTier1DropChance), t2.ToSelection(ItemDropAPI.DefaultSmallChestTier2DropChance), t3.ToSelection(ItemDropAPI.DefaultSmallChestTier3DropChance) }; var lockboxSelections = new[] { ItemDropAPI.GetDefaultDropList(ItemTier.Tier1).ToSelection(ItemDropAPI.DefaultSmallChestTier1DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier2).ToSelection(ItemDropAPI.DefaultSmallChestTier2DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier3).ToSelection(ItemDropAPI.DefaultSmallChestTier3DropChance) }; var utilitySelections = new[] { ItemDropAPI.GetDefaultDropList(ItemTier.Tier1, ItemTag.Utility).ToSelection(ItemDropAPI.DefaultSmallChestTier1DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier2, ItemTag.Utility).ToSelection(ItemDropAPI.DefaultSmallChestTier2DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier3, ItemTag.Utility).ToSelection(ItemDropAPI.DefaultSmallChestTier3DropChance), }; var damageSelections = new[] { ItemDropAPI.GetDefaultDropList(ItemTier.Tier1, ItemTag.Damage).ToSelection(ItemDropAPI.DefaultSmallChestTier1DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier2, ItemTag.Damage).ToSelection(ItemDropAPI.DefaultSmallChestTier2DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier3, ItemTag.Damage).ToSelection(ItemDropAPI.DefaultSmallChestTier3DropChance), }; var healingSelections = new[] { ItemDropAPI.GetDefaultDropList(ItemTier.Tier1, ItemTag.Healing).ToSelection(ItemDropAPI.DefaultSmallChestTier1DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier2, ItemTag.Healing).ToSelection(ItemDropAPI.DefaultSmallChestTier2DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier3, ItemTag.Healing).ToSelection(ItemDropAPI.DefaultSmallChestTier3DropChance), }; var scavSelections = new[] { ItemDropAPI.GetDefaultDropList(ItemTier.Tier1).ToSelection(ItemDropAPI.DefaultScavBackpackTier1DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier2).ToSelection(ItemDropAPI.DefaultScavBackpackTier2DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Tier3).ToSelection(ItemDropAPI.DefaultScavBackpackTier3DropChance), ItemDropAPI.GetDefaultDropList(ItemTier.Lunar).ToSelection(ItemDropAPI.DefaultScavBackpackLunarDropChance), }; var allSelections = new[] { chestSelections, lockboxSelections, utilitySelections, damageSelections, healingSelections, scavSelections }; foreach (var selGroup in allSelections) { foreach (var sel in selGroup) { sel.IsDefaults = true; } } var allLocations = new[] { ItemDropLocation.UtilityChest, ItemDropLocation.DamageChest, ItemDropLocation.HealingChest, ItemDropLocation.Lockbox, ItemDropLocation.SmallChest, ItemDropLocation.MediumChest, ItemDropLocation.LargeChest, ItemDropLocation.ScavBackPack }; foreach (var selLoc in allLocations) { RemoveDefaultDrops(selLoc); } ItemDropAPI.AddDrops(ItemDropLocation.UtilityChest, utilitySelections); ItemDropAPI.AddDrops(ItemDropLocation.DamageChest, damageSelections); ItemDropAPI.AddDrops(ItemDropLocation.HealingChest, healingSelections); ItemDropAPI.AddDrops(ItemDropLocation.Lockbox, lockboxSelections); ItemDropAPI.AddDrops(ItemDropLocation.SmallChest, chestSelections); ItemDropAPI.AddDrops(ItemDropLocation.MediumChest, t2.ToSelection(ItemDropAPI.DefaultMediumChestTier2DropChance), t3.ToSelection(ItemDropAPI.DefaultMediumChestTier3DropChance)); ItemDropAPI.AddDrops(ItemDropLocation.LargeChest, t3.ToSelection(ItemDropAPI.DefaultLargeChestTier3DropChance)); ItemDropAPI.AddDrops(ItemDropLocation.ScavBackPack, scavSelections); }
public static void AddEquipmentChestDefaultDrops() { var eq = ItemDropAPI.GetDefaultEquipmentDropList(); ItemDropAPI.AddDrops(ItemDropLocation.EquipmentChest, eq.ToSelection()); }
public static void AddLunarChestDefaultDrops() { var lun = ItemDropAPI.GetDefaultLunarDropList(); ItemDropAPI.AddDrops(ItemDropLocation.LunarChest, lun.ToSelection()); }