diff --git a/CalamityMod.cs b/CalamityMod.cs index e9f0a14cd3..e26abe731e 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -83,8 +83,6 @@ namespace CalamityMod { public class CalamityMod : Mod { - public const string CalamityWikiURL = "calamitymod.wiki.gg"; - // TODO -- A huge amount of random floating variables exist here. // These should all be moved to other files, whether that's CalamityLists or brand new ModSystems. // It is best to have a ton of small ModSystems. @@ -222,24 +220,7 @@ namespace CalamityMod ForegroundDrawing.ForegroundManager.Load(); // Wikithis support - if (wikithis is not null) - { - wikithis.Call("AddModURL", this, CalamityWikiURL); - - // Clear up name conflicts - // Items - wikithis.Call(1, new List() { ModContent.ItemType() }, "Blood Orange (calamity)"); - wikithis.Call(1, new List() { ModContent.ItemType() }, "Elderberry (calamity)"); - wikithis.Call(1, new List() { ModContent.ItemType() }, "Pineapple (calamity)"); - wikithis.Call(1, new List() { ModContent.ItemType() }, "Trash Can (pet)"); - wikithis.Call(1, new List() { ModContent.ItemType() }, "Butcher (weapon)"); - wikithis.Call(1, new List() { ModContent.ItemType() }, "Sandstorm (weapon)"); - wikithis.Call(1, new List() { ModContent.ItemType() }, "Thunderstorm (weapon)"); - // Enemies - wikithis.Call(2, new List() { ModContent.NPCType() }, "Catfish (enemy)"); - wikithis.Call(2, new List() { ModContent.NPCType() }, "Hive (enemy)"); - wikithis.Call(2, new List() { ModContent.NPCType() }, "Tooth Ball (Old Duke)"); - } + WeakReferenceSupport.WikiThisSupport(); } CooldownRegistry.Load(); diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index e32c3ccadb..118cdcb0b4 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -29,6 +29,7 @@ using CalamityMod.Items.Weapons.Typeless; using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.AdultEidolonWyrm; using CalamityMod.NPCs.AquaticScourge; +using CalamityMod.NPCs.Astral; using CalamityMod.NPCs.AstrumAureus; using CalamityMod.NPCs.AstrumDeus; using CalamityMod.NPCs.BrimstoneElemental; @@ -46,7 +47,9 @@ using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.GreatSandShark; using CalamityMod.NPCs.HiveMind; using CalamityMod.NPCs.Leviathan; +using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.OldDuke; +using CalamityMod.NPCs.Other; using CalamityMod.NPCs.Perforator; using CalamityMod.NPCs.PlaguebringerGoliath; using CalamityMod.NPCs.Polterghast; @@ -56,6 +59,7 @@ using CalamityMod.NPCs.Ravager; using CalamityMod.NPCs.Signus; using CalamityMod.NPCs.SlimeGod; using CalamityMod.NPCs.StormWeaver; +using CalamityMod.NPCs.SulphurousSea; using CalamityMod.NPCs.SunkenSea; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.TownNPCs; @@ -115,6 +119,8 @@ namespace CalamityMod internal class WeakReferenceSupport { + public const string CalamityWikiURL = "calamitymod.wiki.gg"; + private static readonly Dictionary BossDifficulty = new Dictionary { { "DesertScourge", 1.6f }, @@ -166,6 +172,92 @@ namespace CalamityMod SummonersAssociationSupport(); } + public static void WikiThisSupport() + { + CalamityMod calamity = GetInstance(); + Mod wiki = calamity.wikithis; + if (wiki is null) + return; + + wiki.Call("AddModURL", calamity, CalamityWikiURL); + + // Clear up name conflicts + void ItemRedirect(int item, string pageName) + { + wiki.Call(1, new List() { item }, pageName); + } + void EnemyRedirect(int item, string pageName) + { + wiki.Call(2, new List() { item }, pageName); + } + + // Items + ItemRedirect(ModContent.ItemType(), "Blood Orange (calamity)"); + ItemRedirect(ModContent.ItemType(), "Elderberry (calamity)"); + ItemRedirect(ModContent.ItemType(), "Pineapple (calamity)"); + ItemRedirect(ModContent.ItemType(), "Trash Can (pet)"); + ItemRedirect(ModContent.ItemType(), "Butcher (weapon)"); + ItemRedirect(ModContent.ItemType(), "Sandstorm (weapon)"); + ItemRedirect(ModContent.ItemType(), "Thunderstorm (weapon)"); + // Lore items + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + + // Enemies + EnemyRedirect(ModContent.NPCType(), "Catfish (enemy)"); + EnemyRedirect(ModContent.NPCType(), "Hive (enemy)"); + EnemyRedirect(ModContent.NPCType(), "Crown Jewel (enemy)"); + EnemyRedirect(ModContent.NPCType(), "Tooth Ball (Old Duke)"); + EnemyRedirect(ModContent.NPCType(), "Enchantment"); + EnemyRedirect(ModContent.NPCType(), "%3F%3F%3F"); + } + // Wrapper function to add bosses to Boss Checklist. private static void AddBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, int npcType, Func downed, object summon, List collection, string instructions, string despawn, Func available, Action portrait = null, string bossHeadTex = null) diff --git a/NPCs/Astral/Hive.cs b/NPCs/Astral/HiveEnemy.cs similarity index 99% rename from NPCs/Astral/Hive.cs rename to NPCs/Astral/HiveEnemy.cs index 0bdef59d1b..edde5268ad 100644 --- a/NPCs/Astral/Hive.cs +++ b/NPCs/Astral/HiveEnemy.cs @@ -17,7 +17,7 @@ using CalamityMod.Sounds; namespace CalamityMod.NPCs.Astral { - public class Hive : ModNPC + public class HiveEnemy : ModNPC { private static Texture2D glowmask; diff --git a/NPCs/Astral/Hive.png b/NPCs/Astral/HiveEnemy.png similarity index 100% rename from NPCs/Astral/Hive.png rename to NPCs/Astral/HiveEnemy.png diff --git a/Projectiles/Summon/Hive.cs b/Projectiles/Summon/Hive.cs index 8d339dfc1e..2527552d4f 100644 --- a/Projectiles/Summon/Hive.cs +++ b/Projectiles/Summon/Hive.cs @@ -6,7 +6,7 @@ namespace CalamityMod.Projectiles.Summon { public class Hive : ModProjectile { - public override string Texture => "CalamityMod/NPCs/Astral/Hive"; + public override string Texture => "CalamityMod/NPCs/Astral/HiveEnemy"; public override void SetStaticDefaults() { diff --git a/Utilities/MiscUtils.cs b/Utilities/MiscUtils.cs index 3422ba8c1a..853884cdac 100644 --- a/Utilities/MiscUtils.cs +++ b/Utilities/MiscUtils.cs @@ -847,7 +847,7 @@ namespace CalamityMod npc = ModContent.NPCType(); break; case 40: - npc = ModContent.NPCType(); + npc = ModContent.NPCType(); break; case 41: npc = ModContent.NPCType(); diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index 326949cae5..4189f4264d 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -289,7 +289,7 @@ namespace CalamityMod { ModContent.NPCType(), new Tuple(false, CalamityMod.astralEnemyImmunities) }, { ModContent.NPCType(), new Tuple(false, CalamityMod.astralEnemyImmunities) }, { ModContent.NPCType(), new Tuple(false, CalamityMod.astralEnemyImmunities) }, - { ModContent.NPCType(), new Tuple(false, CalamityMod.astralEnemyImmunities) }, + { ModContent.NPCType(), new Tuple(false, CalamityMod.astralEnemyImmunities) }, { ModContent.NPCType(), new Tuple(false, CalamityMod.astralEnemyImmunities) }, { ModContent.NPCType(), new Tuple(false, CalamityMod.astralEnemyImmunities) }, { ModContent.NPCType(), new Tuple(false, CalamityMod.astralEnemyImmunities) },