From 9b76ff33dced6f575484eedfd5cb3e12aba7cf84 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 13 Jun 2022 16:16:22 -0400 Subject: [PATCH 01/11] Added a huge amount of TODOs for ModSystem de-godclassing --- Balancing/BalancingChangesManager.cs | 1 + CalPlayer/Dashes/PlayerDashManager.cs | 1 + CalamityLists.cs | 1 + CalamityMod.cs | 15 +++++++++++++-- Cooldowns/CooldownRegistry.cs | 1 + DataStructures/Attunement.cs | 1 + DataStructures/NPCStats.cs | 1 + Effects/CalamityShaders.cs | 1 + Events/BossRushEvent.cs | 1 + ILEditing/ILChangesLoading.cs | 1 + Items/CalamityGlobalItemTweaks.cs | 2 ++ .../VanillaArmorChangeManager.cs | 3 ++- Particles/FusableParticleManager.cs | 2 ++ Particles/GeneralParticleHandler.cs | 1 + .../BaseProjectiles/BaseIdleHoldoutProjectile.cs | 2 ++ Schematics/SchematicManager.cs | 1 + Systems/SpeedrunTimerStoppingSystem.cs | 1 + UI/AstralArcanumUI.cs | 1 + UI/CalamitasEnchantments/EnchantmentManager.cs | 1 + UI/ChargeMeterUI.cs | 1 + UI/InvasionProgressUIManager.cs | 3 ++- UI/PopupGUIManager.cs | 3 ++- UI/RipperUI.cs | 1 + UI/SpeedrunTimerUI.cs | 1 + UI/StealthUI.cs | 1 + Utilities/CalamityRecipes.cs | 1 + Utilities/TileFraming.cs | 2 ++ Waters/CustomLavaManagement.cs | 1 + World/DraedonStructures.cs | 1 + 29 files changed, 48 insertions(+), 5 deletions(-) diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 4a7b99e0b1..7bbe75d4cd 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -20,6 +20,7 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Balancing { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class BalancingChangesManager { internal static List UniversalBalancingChanges = null; diff --git a/CalPlayer/Dashes/PlayerDashManager.cs b/CalPlayer/Dashes/PlayerDashManager.cs index ba201a57c1..c0f3f54b0b 100644 --- a/CalPlayer/Dashes/PlayerDashManager.cs +++ b/CalPlayer/Dashes/PlayerDashManager.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; namespace CalamityMod.CalPlayer.Dashes { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class PlayerDashManager { internal static Dictionary DashIdentificationTable = new(); diff --git a/CalamityLists.cs b/CalamityLists.cs index b01d8862a0..87956e9fbb 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -75,6 +75,7 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public class CalamityLists { public static IList donatorList; diff --git a/CalamityMod.cs b/CalamityMod.cs index f8ecb74332..e3ce48e267 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -74,7 +74,9 @@ namespace CalamityMod { public class CalamityMod : Mod { - // CONSIDER -- I have been advised by Jopo that Mods should never contain static variables + // 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. // Boss Spawners public static int ghostKillCount = 0; @@ -117,8 +119,11 @@ namespace CalamityMod public static int[] holyEnemyImmunities = new int[4] { BuffID.OnFire, BuffID.OnFire3, ModContent.BuffType(), ModContent.BuffType() }; internal static CalamityMod Instance; + + // TODO -- Mod references should be contained in a ModSystem (example name "ModLoadedChecker") internal Mod musicMod = null; // This is Calamity's official music mod, CalamityModMusic internal bool MusicAvailable => !(musicMod is null); + internal Mod ancientsAwakened = null; internal Mod bossChecklist = null; internal Mod census = null; @@ -144,7 +149,7 @@ namespace CalamityMod manaOriginal = TextureAssets.Mana; carpetOriginal = TextureAssets.FlyingCarpet; - // Apply IL edits instantly afterwards. + // Apply IL edits as soon as possible. ILChanges.Load(); // If any of these mods aren't loaded, it will simply keep them as null. @@ -198,6 +203,7 @@ namespace CalamityMod CooldownRegistry.Load(); BossRushEvent.Load(); + // TODO -- As ModBossBarStyle is a ModType, its Load function does not need to be called directly here. BossHealthBarManager.Load(this); DraedonStructures.Load(); EnchantmentManager.LoadAllEnchantments(); @@ -219,6 +225,7 @@ namespace CalamityMod { AstralSky = ModContent.Request("CalamityMod/ExtraTextures/AstralSky", AssetRequestMode.ImmediateLoad).Value; + // TODO -- Sky shaders should probably be loaded in a ModSystem Filters.Scene["CalamityMod:DevourerofGodsHead"] = new Filter(new DoGScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:DevourerofGodsHead"] = new DoGSky(); @@ -271,6 +278,8 @@ namespace CalamityMod ChargeMeterUI.Load(); AstralArcanumUI.Load(this); + // TODO -- Is this not possible to place in ModNPC.Load or ModNPC.SetStaticDefaults ? + // Centralizing head texture registration like this seems absurdly stiff Apollo.LoadHeadIcons(); Artemis.LoadHeadIcons(); DevourerofGodsHead.LoadHeadIcons(); @@ -285,6 +294,8 @@ namespace CalamityMod ThanatosBody2.LoadHeadIcons(); ThanatosTail.LoadHeadIcons(); + // TODO -- Is this not possible to place in ModItem.Load or ModItem.SetStaticDefaults ? + // Centralizing hair dye shaders like this seems absurdly stiff GameShaders.Hair.BindShader(ModContent.ItemType(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(0, 255, 171), ((float)player.Calamity().adrenaline / (float)player.Calamity().adrenalineMax)))); GameShaders.Hair.BindShader(ModContent.ItemType(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(255, 83, 48), ((float)player.Calamity().rage / (float)player.Calamity().rageMax)))); GameShaders.Hair.BindShader(ModContent.ItemType(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(139, 205, 255), ((float)player.wingTime / (float)player.wingTimeMax)))); diff --git a/Cooldowns/CooldownRegistry.cs b/Cooldowns/CooldownRegistry.cs index 76328fbcad..e8b078d334 100644 --- a/Cooldowns/CooldownRegistry.cs +++ b/Cooldowns/CooldownRegistry.cs @@ -6,6 +6,7 @@ using Terraria.ModLoader.Core; namespace CalamityMod.Cooldowns { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public class CooldownRegistry { // Indexed by ushort netID. Contains every registered cooldown. diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index 7c69e90b33..ddb83e0ca1 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -18,6 +18,7 @@ namespace CalamityMod.DataStructures Phoenix, Aries, Polaris, Andromeda //Galaxia } + // TODO -- Attunements should be managed by an Attunement ModSystem public abstract class Attunement { public static Attunement[] attunementArray; diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index 6e84e3521c..1a6bf73040 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -41,6 +41,7 @@ using CalamityMod.NPCs.AcidRain; namespace CalamityMod { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static partial class NPCStats { private const double ExpertContactVanillaMultiplier = 2D; diff --git a/Effects/CalamityShaders.cs b/Effects/CalamityShaders.cs index 553b0d522d..5ad4d373db 100644 --- a/Effects/CalamityShaders.cs +++ b/Effects/CalamityShaders.cs @@ -7,6 +7,7 @@ using Terraria.Graphics.Shaders; namespace CalamityMod.Effects { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public class CalamityShaders { public static Effect AstralFogShader; diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index 0a9968e5b3..f129dc7317 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -39,6 +39,7 @@ using Terraria.DataStructures; namespace CalamityMod.Events { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public class BossRushEvent { public enum TimeChangeContext diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index c73157c015..5d43a38f81 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.ILEditing { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public partial class ILChanges { /// diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index d39efe5028..b6318a102d 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -7,6 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items { + // TODO -- The item tweaks database and functions should be stored in a ModSystem. + // ApplyTweaks(ref Item item) would be the one exposed function, which CalamityGlobalItem would call in SetDefaults. public partial class CalamityGlobalItem : GlobalItem { #region Database and Initialization diff --git a/Items/VanillaArmorChanges/VanillaArmorChangeManager.cs b/Items/VanillaArmorChanges/VanillaArmorChangeManager.cs index 8708ebc62a..9de535f8ee 100644 --- a/Items/VanillaArmorChanges/VanillaArmorChangeManager.cs +++ b/Items/VanillaArmorChanges/VanillaArmorChangeManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; @@ -7,6 +7,7 @@ using Terraria.ID; namespace CalamityMod.Items.VanillaArmorChanges { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class VanillaArmorChangeManager { internal static List ArmorChanges; diff --git a/Particles/FusableParticleManager.cs b/Particles/FusableParticleManager.cs index b8c3f171e1..50989324a8 100644 --- a/Particles/FusableParticleManager.cs +++ b/Particles/FusableParticleManager.cs @@ -16,6 +16,8 @@ namespace CalamityMod.Particles // As such, it is littered with many netMode checks. While some may be overprotective in their nature it is critical that // failsafes exist there, as visual failures tend to result in engine crashes, which will kill a lot of MP servers. // If someone other than me for any reason attempts to notably expand upon this system you must keep this in mind. -Dominic + + // TODO -- This can be made into a ModSystem. Its main thread load dependency with render targets is safe to put in OnModLoad. public static class FusableParticleManager { internal static List ParticleSets = new List(); diff --git a/Particles/GeneralParticleHandler.cs b/Particles/GeneralParticleHandler.cs index 1c113bd1bc..827da34280 100644 --- a/Particles/GeneralParticleHandler.cs +++ b/Particles/GeneralParticleHandler.cs @@ -11,6 +11,7 @@ using Terraria.ModLoader.Core; namespace CalamityMod.Particles { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class GeneralParticleHandler { private static List particles; diff --git a/Projectiles/BaseProjectiles/BaseIdleHoldoutProjectile.cs b/Projectiles/BaseProjectiles/BaseIdleHoldoutProjectile.cs index 977a39de53..b8e90601eb 100644 --- a/Projectiles/BaseProjectiles/BaseIdleHoldoutProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseIdleHoldoutProjectile.cs @@ -17,6 +17,8 @@ namespace CalamityMod.Projectiles.BaseProjectiles public abstract int IntendedProjectileType { get; } public static Dictionary ItemProjectileRelationship = new(); + // TODO -- There is no reason this load hook should need to be called from CalamityMod. + // All subclasses of this should be ILoadable and should load themselves. public static void LoadAll() { ItemProjectileRelationship = new Dictionary(); diff --git a/Schematics/SchematicManager.cs b/Schematics/SchematicManager.cs index 95a0bbb3e0..fb4db262ff 100644 --- a/Schematics/SchematicManager.cs +++ b/Schematics/SchematicManager.cs @@ -10,6 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.Schematics { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class SchematicManager { internal const string RustedWorkshopKey = "Rusted Workshop"; diff --git a/Systems/SpeedrunTimerStoppingSystem.cs b/Systems/SpeedrunTimerStoppingSystem.cs index c67b0b3911..0923a54879 100644 --- a/Systems/SpeedrunTimerStoppingSystem.cs +++ b/Systems/SpeedrunTimerStoppingSystem.cs @@ -2,6 +2,7 @@ namespace CalamityMod.Systems { + // TODO -- Expand this ModSystem to contain the Speedrun Timer itself, as well as the UI. public class SpeedrunTimerStoppingSystem : ModSystem { public override void PreSaveAndQuit() => CalamityMod.SpeedrunTimer?.Stop(); diff --git a/UI/AstralArcanumUI.cs b/UI/AstralArcanumUI.cs index b614015ea1..f86695a739 100644 --- a/UI/AstralArcanumUI.cs +++ b/UI/AstralArcanumUI.cs @@ -10,6 +10,7 @@ using ReLogic.Content; namespace CalamityMod.UI { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class AstralArcanumUI { enum CircleStyle diff --git a/UI/CalamitasEnchantments/EnchantmentManager.cs b/UI/CalamitasEnchantments/EnchantmentManager.cs index 2871dc1ac5..dc0631ac55 100644 --- a/UI/CalamitasEnchantments/EnchantmentManager.cs +++ b/UI/CalamitasEnchantments/EnchantmentManager.cs @@ -13,6 +13,7 @@ using Terraria.ModLoader; namespace CalamityMod.UI.CalamitasEnchants { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class EnchantmentManager { internal const int ClearEnchantmentID = -18591774; diff --git a/UI/ChargeMeterUI.cs b/UI/ChargeMeterUI.cs index b6ea73e722..064decaeeb 100644 --- a/UI/ChargeMeterUI.cs +++ b/UI/ChargeMeterUI.cs @@ -9,6 +9,7 @@ using Terraria.ModLoader; namespace CalamityMod.UI { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public class ChargeMeterUI { // These values were handpicked on a 1080p screen by Ozzatron. Please disregard the bizarre precision. diff --git a/UI/InvasionProgressUIManager.cs b/UI/InvasionProgressUIManager.cs index 3081d57271..b673f5b890 100644 --- a/UI/InvasionProgressUIManager.cs +++ b/UI/InvasionProgressUIManager.cs @@ -1,10 +1,11 @@ -using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Graphics; using System; using System.Collections.Generic; using System.Linq; namespace CalamityMod.UI { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class InvasionProgressUIManager { private static readonly List gUIs = new List(); diff --git a/UI/PopupGUIManager.cs b/UI/PopupGUIManager.cs index 513378c193..61c72bbf6e 100644 --- a/UI/PopupGUIManager.cs +++ b/UI/PopupGUIManager.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Graphics; using System; using System.Collections.Generic; using System.Linq; @@ -6,6 +6,7 @@ using Terraria; namespace CalamityMod.UI { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class PopupGUIManager { private static readonly List gUIs = new List(); diff --git a/UI/RipperUI.cs b/UI/RipperUI.cs index d7d4c944ea..1d5f7e7ff0 100644 --- a/UI/RipperUI.cs +++ b/UI/RipperUI.cs @@ -11,6 +11,7 @@ using Terraria.ModLoader; namespace CalamityMod.UI { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class RipperUI { // These values were handpicked on a 1080p screen by Ozzatron. Please disregard the bizarre precision. diff --git a/UI/SpeedrunTimerUI.cs b/UI/SpeedrunTimerUI.cs index eed608a72f..8cd76263fb 100644 --- a/UI/SpeedrunTimerUI.cs +++ b/UI/SpeedrunTimerUI.cs @@ -32,6 +32,7 @@ using Terraria.ModLoader; namespace CalamityMod.UI { + // TODO -- Combine with SpeedrunTimerStoppingSystem, which should be renamed and call the UI draw code in this file. public class SpeedrunTimerUI { // These values put the Speedrun Timer roughly at the top center of a 1080p screen. diff --git a/UI/StealthUI.cs b/UI/StealthUI.cs index d6f81d3296..4d43be5df0 100644 --- a/UI/StealthUI.cs +++ b/UI/StealthUI.cs @@ -9,6 +9,7 @@ using Terraria.ModLoader; namespace CalamityMod.UI { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public class StealthUI { // These values were handpicked on a 1080p screen by Ozzatron. Please disregard the bizarre precision. diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 81b909184c..f1045ceafe 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -18,6 +18,7 @@ using Terraria.ModLoader; namespace CalamityMod { + // TODO -- Change this to a ModSystem so it does not need to be manually loaded from CalamityMod internal class CalamityRecipes { private static Recipe CreateRecipe(int itemID, int stack = 1) => CalamityMod.Instance.CreateRecipe(itemID, stack); diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index d490efc7b8..6ffeacb591 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -13,6 +13,8 @@ using Terraria.ModLoader; namespace CalamityMod { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. + // OnModLoad is guaranteed to be run after all content has autoloaded. public static class TileFraming { private static int[][] PlantCheckAgainst; diff --git a/Waters/CustomLavaManagement.cs b/Waters/CustomLavaManagement.cs index 3ba4dac11d..8006f2ed39 100644 --- a/Waters/CustomLavaManagement.cs +++ b/Waters/CustomLavaManagement.cs @@ -10,6 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.Waters { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class CustomLavaManagement { internal static List CustomLavaStyles; diff --git a/World/DraedonStructures.cs b/World/DraedonStructures.cs index b5102fa65a..5e41427fc2 100644 --- a/World/DraedonStructures.cs +++ b/World/DraedonStructures.cs @@ -14,6 +14,7 @@ using static CalamityMod.Schematics.SchematicManager; namespace CalamityMod.World { + // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public static class DraedonStructures { private static int[] otherModTilesToAvoid; From 7c2f06d82f137548349268902607127e1ff006af Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 13 Jun 2022 15:44:37 -0500 Subject: [PATCH 02/11] Comment fix --- Effects/FluidShaders.fx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Effects/FluidShaders.fx b/Effects/FluidShaders.fx index 9731758a06..f0ba5b72de 100644 --- a/Effects/FluidShaders.fx +++ b/Effects/FluidShaders.fx @@ -28,7 +28,7 @@ float4 CalculateDiffusion(float4 sampleColor : TEXCOORD, float2 coords : TEXCOOR // nextField[i, j] = currentField[i, j] + diffusionFactor * (totalCardinalState - currentField[i, j]) // However, this would considerably restrict the freedom of the simulation, as any visocity values above 1 would result // in overshooting estimations and cause unstable behavior. - // Instead of doing this instead of using the current state to calculate the next one, we attempt to solve for a state that when + // Instead of using the current state to calculate the next one, we attempt to solve for a state that when // done in reverse returns the original state. Mathematically, this is written like so: // currentField[i, j] = nextField[i, j] - diffusionFactor * (averageNextCardinalState - currentField[i, j]) From dd7a7145ce507d25bc4ee599ed5d8ea5589c6924 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Mon, 13 Jun 2022 15:49:14 -0500 Subject: [PATCH 03/11] 1 - Reduced Yharon, SCal and Exo Mech damage values. --- DataStructures/NPCStats.cs | 76 +++++++++++------------ NPCs/SupremeCalamitas/SupremeCalamitas.cs | 23 ++++--- 2 files changed, 49 insertions(+), 50 deletions(-) diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index 6e84e3521c..2d08eb1184 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -529,17 +529,17 @@ namespace CalamityMod { ModContent.NPCType(), new int[] { 130, 260, 290, 320, 420 } }, { ModContent.NPCType(), new int[] { 100, 200, 230, 260, 330 } }, - { ModContent.NPCType(), new int[] { 330, 528, 560, 576, 690 } }, + { ModContent.NPCType(), new int[] { 280, 448, 480, 512, 624 } }, - { ModContent.NPCType(), new int[] { 350, 560, 592, 608, 768 } }, + { ModContent.NPCType(), new int[] { 320, 512, 544, 560, 696 } }, - { ModContent.NPCType(), new int[] { 350, 560, 592, 608, 768 } }, - { ModContent.NPCType(), new int[] { 330, 528, 560, 576, 690 } }, + { ModContent.NPCType(), new int[] { 320, 512, 544, 560, 696 } }, + { ModContent.NPCType(), new int[] { 300, 480, 512, 528, 660 } }, - { ModContent.NPCType(), new int[] { 400, 640, 680, 704, 864 } }, - { ModContent.NPCType(), new int[] { 330, 528, 560, 576, 690 } }, - { ModContent.NPCType(), new int[] { 330, 528, 560, 576, 690 } }, - { ModContent.NPCType(), new int[] { 260, 416, 446, 464, 570 } }, + { ModContent.NPCType(), new int[] { 350, 560, 592, 608, 756 } }, + { ModContent.NPCType(), new int[] { 300, 480, 512, 528, 660 } }, + { ModContent.NPCType(), new int[] { 300, 480, 512, 528, 660 } }, + { ModContent.NPCType(), new int[] { 250, 400, 424, 440, 552 } }, { ModContent.NPCType(), new int[] { 400, 800, 850, 880, 1000 } } }; @@ -771,43 +771,43 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 520, 548, 564, 822 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 444, 600 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 476, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 520, 548, 564, 822 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 520, 548, 564, 822 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 476, 696 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 476, 696 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 444, 600 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 444, 600 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 444, 600 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 568, 584, 858 } }, // 25% increased damage in bullet hell 1 - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 568, 584, 858 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 608, 640, 658, 960 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 450, 676, 710, 728, 1062 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 568, 584, 858 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 568, 584, 858 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 568, 584, 858 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 568, 584, 858 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 476, 484, 500, 726 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 476, 484, 500, 726 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 544, 780 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 592, 624, 656, 918 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 476, 484, 500, 726 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 476, 696 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 476, 484, 500, 726 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 476, 696 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 476, 696 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 476, 484, 500, 726 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 476, 696 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 476, 484, 500, 726 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 476, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 568, 584, 858 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 288, 432, 454, 478, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 288, 432, 454, 478, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 568, 584, 858 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 544, 780 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 630 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 630 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 476, 484, 500, 726 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 450, 676, 710, 728, 1062 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 288, 432, 454, 478, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 288, 432, 454, 478, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 288, 432, 454, 478, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 288, 432, 454, 478, 696 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 592, 624, 656, 918 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 630 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 630 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 630 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 630 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 608, 640, 658, 960 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 568, 584, 858 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 288, 432, 454, 478, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 288, 432, 454, 478, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 288, 432, 454, 478, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 450, 676, 710, 728, 1062 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 544, 780 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 544, 780 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 630 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 630 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 630 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 608, 640, 658, 960 } }, { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossIceMist), new int[] { 400, 600, 632, 648, 948 } }, { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 500, 752, 788, 808, 1182 } }, diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index feb9af6c8c..a9448cc9f6 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -389,7 +389,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Projectile damage values int bulletHellblastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType()); - int firstBulletHellblastDamage = (int)Math.Round(bulletHellblastDamage * 1.25); int barrageDamage = NPC.GetProjectileDamage(ModContent.ProjectileType()); int gigablastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType()); int fireblastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType()); @@ -695,22 +694,22 @@ namespace CalamityMod.NPCs.SupremeCalamitas { float distance = Main.rand.NextBool() ? -1000f : 1000f; float velocity = (distance == -1000f ? 4f : -4f) * uDieLul; - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType(), firstBulletHellblastDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType(), bulletHellblastDamage, 0f, Main.myPlayer); } if (bulletHellCounter2 < 300) // Blasts from above { - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType(), firstBulletHellblastDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 4f * uDieLul, ModContent.ProjectileType(), bulletHellblastDamage, 0f, Main.myPlayer); } else if (bulletHellCounter2 < 600) // Blasts from left and right { - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), firstBulletHellblastDamage, 0f, Main.myPlayer); - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), firstBulletHellblastDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3.5f * uDieLul, 0f, ModContent.ProjectileType(), bulletHellblastDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3.5f * uDieLul, 0f, ModContent.ProjectileType(), bulletHellblastDamage, 0f, Main.myPlayer); } else // Blasts from above, left, and right { - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType(), firstBulletHellblastDamage, 0f, Main.myPlayer); - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType(), firstBulletHellblastDamage, 0f, Main.myPlayer); - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType(), firstBulletHellblastDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 3f * uDieLul, ModContent.ProjectileType(), bulletHellblastDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -3f * uDieLul, 0f, ModContent.ProjectileType(), bulletHellblastDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), 3f * uDieLul, 0f, ModContent.ProjectileType(), bulletHellblastDamage, 0f, Main.myPlayer); } } } @@ -781,7 +780,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { float distance = Main.rand.NextBool() ? -1000f : 1000f; float velocity = (distance == -1000f ? 4f : -4f) * uDieLul; - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType(), firstBulletHellblastDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType(), bulletHellblastDamage, 0f, Main.myPlayer); } if (bulletHellCounter2 < 1200) // Blasts from below { @@ -842,7 +841,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { float distance = Main.rand.NextBool() ? -1000f : 1000f; float velocity = (distance == -1000f ? 4f : -4f) * uDieLul; - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType(), firstBulletHellblastDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType(), bulletHellblastDamage, 0f, Main.myPlayer); } if (bulletHellCounter2 < 2100) // Blasts from above { @@ -915,7 +914,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { float distance = Main.rand.NextBool() ? -1000f : 1000f; float velocity = (distance == -1000f ? 4f : -4f) * uDieLul; - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType(), firstBulletHellblastDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType(), bulletHellblastDamage, 0f, Main.myPlayer); } if (bulletHellCounter2 < 3000) // Blasts from below { @@ -986,7 +985,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { float distance = Main.rand.NextBool() ? -1000f : 1000f; float velocity = (distance == -1000f ? 4f : -4f) * uDieLul; - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType(), firstBulletHellblastDamage, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, ModContent.ProjectileType(), bulletHellblastDamage, 0f, Main.myPlayer); } if (bulletHellCounter2 < 3900) // Blasts from above { From 6da46c83b07e3f9ae8167f22e338aa80823d1e6a Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Mon, 13 Jun 2022 17:22:34 -0500 Subject: [PATCH 04/11] 1 - 20 Gravestones are required for a Graveyard biome instead of 7. --- CalamityMod.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CalamityMod.cs b/CalamityMod.cs index e3ce48e267..b347326b8e 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -195,6 +195,11 @@ namespace CalamityMod Mount.mounts[MountID.MinecartMech].dashSpeed *= CalamityPlayer.MechanicalCartSpeedNerfPower; Mount.mounts[MountID.MinecartMech].runSpeed *= CalamityPlayer.MechanicalCartSpeedNerfPower; + // Make Graveyard biomes require more Gravestones + SceneMetrics.GraveyardTileMax = 88; + SceneMetrics.GraveyardTileMin = 68; + SceneMetrics.GraveyardTileThreshold = 80; + if (!Main.dedServ) { LoadClient(); @@ -370,11 +375,16 @@ namespace CalamityMod TextureAssets.FlyingCarpet = carpetOriginal; GeneralParticleHandler.Unload(); } + Mount.mounts[MountID.Unicorn].dashSpeed /= CalamityPlayer.UnicornSpeedNerfPower; Mount.mounts[MountID.Unicorn].runSpeed /= CalamityPlayer.UnicornSpeedNerfPower; Mount.mounts[MountID.MinecartMech].dashSpeed /= CalamityPlayer.MechanicalCartSpeedNerfPower; Mount.mounts[MountID.MinecartMech].runSpeed /= CalamityPlayer.MechanicalCartSpeedNerfPower; + SceneMetrics.GraveyardTileMax = 36; + SceneMetrics.GraveyardTileMin = 16; + SceneMetrics.GraveyardTileThreshold = 28; + heartOriginal2 = null; heartOriginal = null; rainOriginal = null; From f06578a988b68d26421b14ddae2e354ce5283f5f Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 13 Jun 2022 17:53:30 -0500 Subject: [PATCH 05/11] Update the Yanmei's Knife list --- CalamityLists.cs | 17 +++++++++++++++-- Projectiles/Typeless/YanmeisKnifeSlash.cs | 3 +-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CalamityLists.cs b/CalamityLists.cs index 87956e9fbb..5718358699 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -1954,7 +1954,11 @@ namespace CalamityMod NPCID.SantaNK1, NPCID.Everscream, NPCID.DD2Betsy, - NPCID.Mothron + NPCID.Mothron, + NPCID.MartianSaucer, + NPCID.MartianSaucerCannon, + NPCID.MartianSaucerCore, + NPCID.MartianSaucerTurret, }; heartDropBlockList = new List() @@ -2443,7 +2447,6 @@ namespace CalamityMod }; // Collections - // NOTE - Be sure to reference the NeedsFourLifeBytes list in the IL Editing code if changes are made here. BossRushHPChanges = new SortedDictionary { // Tier 1 @@ -2603,6 +2606,7 @@ namespace CalamityMod bossMinionList = new List() { + NPCType(), NPCType(), NPCType(), NPCType(), @@ -2643,11 +2647,13 @@ namespace CalamityMod NPCID.QueenSlimeMinionBlue, NPCID.QueenSlimeMinionPink, NPCID.QueenSlimeMinionPurple, + NPCType(), NPCID.PrimeCannon, NPCID.PrimeLaser, NPCID.PrimeSaw, NPCID.PrimeVice, NPCType(), + NPCID.Probe, NPCID.TheDestroyer, NPCID.TheDestroyerBody, NPCID.TheDestroyerTail, @@ -2659,6 +2665,8 @@ namespace CalamityMod NPCType(), NPCType(), NPCID.PlanterasTentacle, + NPCType(), + NPCType(), NPCType(), NPCID.Spore, NPCID.GolemHead, @@ -2679,15 +2687,20 @@ namespace CalamityMod NPCID.CultistDragonBody4, NPCID.CultistDragonTail, NPCID.AncientCultistSquidhead, + NPCID.AncientDoom, + NPCID.MoonLordLeechBlob, NPCID.MoonLordFreeEye, NPCID.MoonLordHand, NPCID.MoonLordHead, + NPCType(), + NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), + NPCType(), NPCType(), NPCType(), NPCType(), diff --git a/Projectiles/Typeless/YanmeisKnifeSlash.cs b/Projectiles/Typeless/YanmeisKnifeSlash.cs index 7cc1f53044..ae1c0770b7 100644 --- a/Projectiles/Typeless/YanmeisKnifeSlash.cs +++ b/Projectiles/Typeless/YanmeisKnifeSlash.cs @@ -19,8 +19,7 @@ namespace CalamityMod.Projectiles.Typeless // This is a rather weird thing, but it's what the patron asked for. public static readonly Func CanRecieveCoolEffectsFrom = (npc) => { - bool validBoss = npc.boss && npc.type != ModContent.NPCType() - && npc.type != ModContent.NPCType() + bool validBoss = npc.boss && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() From 10d8a14043c18b8711a6ac138c54bb895084d272 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 13 Jun 2022 18:03:53 -0500 Subject: [PATCH 06/11] Player dash effects do not give the aflame debuff --- CalPlayer/CalamityPlayerDashEffects.cs | 3 ++- CalamityLists.cs | 1 + EntitySources/ProjectileSource_PlayerDashHit.cs | 13 +++++++++++++ Projectiles/CalamityGlobalProjectile.cs | 15 ++++++++++++++- 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 EntitySources/ProjectileSource_PlayerDashHit.cs diff --git a/CalPlayer/CalamityPlayerDashEffects.cs b/CalPlayer/CalamityPlayerDashEffects.cs index 5b94e0f2fe..79baf2e786 100644 --- a/CalPlayer/CalamityPlayerDashEffects.cs +++ b/CalPlayer/CalamityPlayerDashEffects.cs @@ -1,5 +1,6 @@ using CalamityMod.Balancing; using CalamityMod.CalPlayer.Dashes; +using CalamityMod.EntitySources; using CalamityMod.Enums; using CalamityMod.Items.Mounts; using Microsoft.Xna.Framework; @@ -45,7 +46,7 @@ namespace CalamityMod.CalPlayer public void ModDashMovement() { - var source = Player.GetSource_Misc("2"); + var source = new ProjectileSource_PlayerDashHit(Player); // Handle collision slam-through effects. if (HasCustomDash && Player.dashDelay < 0 && Player.whoAmI == Main.myPlayer) diff --git a/CalamityLists.cs b/CalamityLists.cs index 5718358699..9d87fd126f 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -2704,6 +2704,7 @@ namespace CalamityMod NPCType(), NPCType(), NPCType(), + NPCType(), NPCType(), NPCType() }; diff --git a/EntitySources/ProjectileSource_PlayerDashHit.cs b/EntitySources/ProjectileSource_PlayerDashHit.cs new file mode 100644 index 0000000000..8a84e34a5c --- /dev/null +++ b/EntitySources/ProjectileSource_PlayerDashHit.cs @@ -0,0 +1,13 @@ +#nullable enable +using Terraria; +using Terraria.DataStructures; + +namespace CalamityMod.EntitySources +{ + public class ProjectileSource_PlayerDashHit : IEntitySource + { + public Player player; + public ProjectileSource_PlayerDashHit(Player p) => player = p; + public string? Context => null; + } +} diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 31daeb4f62..19fe1f8223 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -25,6 +25,8 @@ using static Terraria.ModLoader.ModContent; using NanotechProjectile = CalamityMod.Projectiles.Typeless.Nanotech; using Terraria.Audio; using Terraria.GameContent; +using Terraria.DataStructures; +using CalamityMod.EntitySources; namespace CalamityMod.Projectiles { @@ -50,6 +52,9 @@ namespace CalamityMod.Projectiles public bool forceClassless = false; public bool forceHostile = false; + // Source variables. + public bool CreatedByPlayerDash = false; + // Damage Adjusters public const float PierceResistHarshness = 0.12f; public const float PierceResistCap = 0.8f; @@ -127,6 +132,14 @@ namespace CalamityMod.Projectiles // Update priority variable. public float UpdatePriority = 0f; + #region On Spawn + + public override void OnSpawn(Projectile projectile, IEntitySource source) + { + CreatedByPlayerDash = source is ProjectileSource_PlayerDashHit; + } + #endregion On Spawn + #region SetDefaults public override void SetDefaults(Projectile projectile) { @@ -2515,7 +2528,7 @@ namespace CalamityMod.Projectiles if (modPlayer.rottenDogTooth && projectile.Calamity().stealthStrike) target.AddBuff(BuffType(), RottenDogtooth.ArmorCrunchDebuffTime); - if (modPlayer.flamingItemEnchant && !projectile.minion && !projectile.npcProj) + if (modPlayer.flamingItemEnchant && !projectile.minion && !projectile.npcProj && !projectile.Calamity().CreatedByPlayerDash) target.AddBuff(BuffType(), VulnerabilityHex.AflameDuration); if (modPlayer.farProximityRewardEnchant) From 3d938704e6fc9e6235fb8edd767fa67c72de4806 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 13 Jun 2022 18:11:21 -0500 Subject: [PATCH 07/11] Fix stormjaw sparks being melee class --- Items/Accessories/ProfanedSoulCrystal.cs | 10 ++-- .../DraedonsArsenal/SnakeEyesSummon.cs | 2 +- Projectiles/Summon/GiantIbanRobotOfDoom.cs | 58 +------------------ Projectiles/Summon/PerditionBeacon.cs | 2 +- Projectiles/Summon/PlaguebringerSummon.cs | 2 +- Projectiles/Summon/PlateProjectile.cs | 2 +- .../Summon/ProfanedSoulCrystalProjectiles.cs | 6 +- Projectiles/Summon/SolarPixie.cs | 2 +- Projectiles/Summon/StormjawBaby.cs | 4 +- Projectiles/Summon/TacticalPlagueJet.cs | 2 +- Projectiles/Summon/WitherBolt.cs | 2 +- 11 files changed, 19 insertions(+), 73 deletions(-) diff --git a/Items/Accessories/ProfanedSoulCrystal.cs b/Items/Accessories/ProfanedSoulCrystal.cs index 349681cf6c..bd17c8a8c9 100644 --- a/Items/Accessories/ProfanedSoulCrystal.cs +++ b/Items/Accessories/ProfanedSoulCrystal.cs @@ -211,7 +211,7 @@ namespace CalamityMod.Items.Accessories int proj = Projectile.NewProjectile(source, player.Center, perturbedspeed, ModContent.ProjectileType(), boomDamage, 0f, player.whoAmI, projType == 1 ? 1f : 0f); if (proj.WithinBounds(Main.maxProjectiles)) { - Main.projectile[proj].Calamity().forceMinion = true; + Main.projectile[proj].DamageType = DamageClass.Summon; Main.projectile[proj].originalDamage = boomBaseDamage; } break; @@ -219,7 +219,7 @@ namespace CalamityMod.Items.Accessories int proj2 = Projectile.NewProjectile(source, player.Center, perturbedspeed, ModContent.ProjectileType(), boomDamage, 0f, player.whoAmI, 0f); if (proj2.WithinBounds(Main.maxProjectiles)) { - Main.projectile[proj2].Calamity().forceMinion = true; + Main.projectile[proj2].DamageType = DamageClass.Summon; Main.projectile[proj2].originalDamage = boomBaseDamage; } break; @@ -260,7 +260,7 @@ namespace CalamityMod.Items.Accessories int proj = Projectile.NewProjectile(source, player.position, correctedVelocity, ModContent.ProjectileType(), magefireDamage, 1f, player.whoAmI, enrage ? 1f : 0f); if (proj.WithinBounds(Main.maxProjectiles)) { - Main.projectile[proj].Calamity().forceMinion = true; + Main.projectile[proj].DamageType = DamageClass.Summon; Main.projectile[proj].originalDamage = magefireBaseDamage; } player.Calamity().profanedSoulWeaponUsage = enrage ? 20 : 25; @@ -285,7 +285,7 @@ namespace CalamityMod.Items.Accessories int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType(), shardDamage, 1f, player.whoAmI, 0f, 0f); if (proj.WithinBounds(Main.maxProjectiles)) { - Main.projectile[proj].Calamity().forceMinion = true; + Main.projectile[proj].DamageType = DamageClass.Summon; Main.projectile[proj].originalDamage = shardBaseDamage; } SoundEngine.PlaySound(SoundID.Item20, player.Center); @@ -300,7 +300,7 @@ namespace CalamityMod.Items.Accessories int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType(), shardDamage, 1f, player.whoAmI, 1f, 0f); if (proj.WithinBounds(Main.maxProjectiles)) { - Main.projectile[proj].Calamity().forceMinion = true; + Main.projectile[proj].DamageType = DamageClass.Summon; Main.projectile[proj].originalDamage = shardBaseDamage; } SoundEngine.PlaySound(SoundID.Item20, player.Center); diff --git a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs index da80909c73..6741f6307d 100644 --- a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs +++ b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs @@ -195,7 +195,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Main.projectile[laser].originalDamage = Projectile.originalDamage; Main.projectile[laser].tileCollide = false; Main.projectile[laser].netUpdate = true; - Main.projectile[laser].Calamity().forceMinion = true; + Main.projectile[laser].DamageType = DamageClass.Summon; } } Projectile.ai[1]++; diff --git a/Projectiles/Summon/GiantIbanRobotOfDoom.cs b/Projectiles/Summon/GiantIbanRobotOfDoom.cs index 33b05ee957..0ea3ae5389 100644 --- a/Projectiles/Summon/GiantIbanRobotOfDoom.cs +++ b/Projectiles/Summon/GiantIbanRobotOfDoom.cs @@ -334,36 +334,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.owner == Main.myPlayer) { SoundEngine.PlaySound(GaussRifle.FireSound, Projectile.Center); - int damage = LaserBaseDamage; - if (player.HeldItem != null) - { - if (player.HeldItem.CountsAsClass()) - { - damage = (int)player.GetTotalDamage().ApplyTo(damage); - } - else if (player.HeldItem.CountsAsClass()) - { - damage = (int)player.GetTotalDamage().ApplyTo(damage); - } - else if (player.HeldItem.CountsAsClass()) - { - damage = (int)player.GetTotalDamage().ApplyTo(damage); - } - else if (player.HeldItem.CountsAsClass()) - { - damage = (int)player.GetTotalDamage().ApplyTo(damage); - } - else if (player.HeldItem.CountsAsClass()) - { - damage = (int)player.GetTotalDamage().ApplyTo(damage); - } - - // If we can't tell what you are using, it scales with your best class. - else - { - damage = (int)player.GetBestClassDamage().ApplyTo(damage); - } - } + int damage = (int)player.GetTotalDamage().ApplyTo(LaserBaseDamage); Vector2 laserVelocity = (Main.MouseWorld - (Main.player[Projectile.owner].Center + new Vector2(Projectile.spriteDirection == 1 ? 48f : 22f, -28f))).SafeNormalize(Vector2.UnitX * Projectile.spriteDirection); Projectile deathLaser = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, @@ -375,32 +346,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.whoAmI); deathLaser.originalDamage = damage; if (player.HeldItem != null && deathLaser.whoAmI.WithinBounds(Main.maxProjectiles)) - { - if (player.HeldItem.CountsAsClass()) - { - deathLaser.Calamity().forceMagic = true; - } - else if (player.HeldItem.CountsAsClass()) - { - deathLaser.Calamity().forceMelee = true; - } - else if (player.HeldItem.CountsAsClass()) - { - deathLaser.Calamity().forceRanged = true; - } - else if (player.HeldItem.CountsAsClass()) - { - deathLaser.Calamity().forceMinion = true; - } - else if (player.HeldItem.CountsAsClass()) - { - deathLaser.Calamity().forceRogue = true; - } - else - { - deathLaser.Calamity().forceClassless = true; - } - } + deathLaser.DamageType = DamageClass.Summon; } } } diff --git a/Projectiles/Summon/PerditionBeacon.cs b/Projectiles/Summon/PerditionBeacon.cs index cb0752680d..eda344b7c3 100644 --- a/Projectiles/Summon/PerditionBeacon.cs +++ b/Projectiles/Summon/PerditionBeacon.cs @@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Summon if (Main.projectile.IndexInRange(soul)) { Main.projectile[soul].originalDamage = Projectile.originalDamage; - Main.projectile[soul].Calamity().forceMinion = true; + Main.projectile[soul].DamageType = DamageClass.Summon; } } diff --git a/Projectiles/Summon/PlaguebringerSummon.cs b/Projectiles/Summon/PlaguebringerSummon.cs index 0ddf71283f..424fe81501 100644 --- a/Projectiles/Summon/PlaguebringerSummon.cs +++ b/Projectiles/Summon/PlaguebringerSummon.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile aura = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType(), dmg, 0f, Projectile.owner, l); if (aura.whoAmI.WithinBounds(Main.maxProjectiles)) - aura.Calamity().forceMinion = true; + aura.DamageType = DamageClass.Summon; } } } diff --git a/Projectiles/Summon/PlateProjectile.cs b/Projectiles/Summon/PlateProjectile.cs index 8d9652f99b..72660dd7bb 100644 --- a/Projectiles/Summon/PlateProjectile.cs +++ b/Projectiles/Summon/PlateProjectile.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; int shard = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ProjectileID.CrystalShard, Projectile.damage / 2, 0f, Projectile.owner); if (shard.WithinBounds(Main.maxProjectiles)) - Main.projectile[shard].Calamity().forceMinion = true; + Main.projectile[shard].DamageType = DamageClass.Summon; } } } diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs index dc249e62e9..228c359937 100644 --- a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon if (proj.WithinBounds(Main.maxProjectiles)) { Main.projectile[proj].originalDamage = damage; - Main.projectile[proj].Calamity().forceMinion = true; + Main.projectile[proj].DamageType = DamageClass.Summon; } if (innerSplits > 0) //only runs if there's still inner splits to create { @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Summon if (proj.WithinBounds(Main.maxProjectiles)) { Main.projectile[proj].originalDamage = damage; - Main.projectile[proj].Calamity().forceMinion = true; + Main.projectile[proj].DamageType = DamageClass.Summon; } } innerSplits--; @@ -634,7 +634,7 @@ namespace CalamityMod.Projectiles.Summon if (proj.WithinBounds(Main.maxProjectiles)) { Main.projectile[proj].originalDamage = (int)(Projectile.originalDamage * 1.5); - Main.projectile[proj].Calamity().forceMinion = true; + Main.projectile[proj].DamageType = DamageClass.Summon; } ((ProfanedCrystalRangedHuges)Main.projectile[proj].ModProjectile).boomerSwarm = true; } diff --git a/Projectiles/Summon/SolarPixie.cs b/Projectiles/Summon/SolarPixie.cs index f925c0dc47..61f3212e8a 100644 --- a/Projectiles/Summon/SolarPixie.cs +++ b/Projectiles/Summon/SolarPixie.cs @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Summon int beam = Projectile.NewProjectile(Projectile.GetSource_FromThis(), source, velocity, ProjectileID.HeatRay, Projectile.damage, Projectile.knockBack, Projectile.owner); if (beam.WithinBounds(Main.maxProjectiles)) { - Main.projectile[beam].Calamity().forceMinion = true; + Main.projectile[beam].DamageType = DamageClass.Summon; Main.projectile[beam].originalDamage = Projectile.originalDamage; } Projectile.ai[0] = 50f; diff --git a/Projectiles/Summon/StormjawBaby.cs b/Projectiles/Summon/StormjawBaby.cs index 36677c1f78..a07902c115 100644 --- a/Projectiles/Summon/StormjawBaby.cs +++ b/Projectiles/Summon/StormjawBaby.cs @@ -283,7 +283,7 @@ namespace CalamityMod.Projectiles.Summon int spark = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sparkS, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); if (spark.WithinBounds(Main.maxProjectiles)) { - Main.projectile[spark].Calamity().forceMinion = true; + Main.projectile[spark].DamageType = DamageClass.Summon; Main.projectile[spark].originalDamage = Projectile.originalDamage; Main.projectile[spark].timeLeft = 120; Main.projectile[spark].penetrate = 3; @@ -327,7 +327,7 @@ namespace CalamityMod.Projectiles.Summon int spark = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sparkS, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); if (spark.WithinBounds(Main.maxProjectiles)) { - Main.projectile[spark].Calamity().forceMinion = true; + Main.projectile[spark].DamageType = DamageClass.Summon; Main.projectile[spark].originalDamage = Projectile.originalDamage; Main.projectile[spark].timeLeft = 120; Main.projectile[spark].penetrate = 3; diff --git a/Projectiles/Summon/TacticalPlagueJet.cs b/Projectiles/Summon/TacticalPlagueJet.cs index 5cca9cbd24..a8ef6861b9 100644 --- a/Projectiles/Summon/TacticalPlagueJet.cs +++ b/Projectiles/Summon/TacticalPlagueJet.cs @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Summon // Regardless of what was fired, force it to be a summon projectile so that summon accessories work. if (projIndex.WithinBounds(Main.maxProjectiles)) { - Main.projectile[projIndex].Calamity().forceMinion = true; + Main.projectile[projIndex].DamageType = DamageClass.Summon; Main.projectile[projIndex].originalDamage = Projectile.originalDamage; } } diff --git a/Projectiles/Summon/WitherBolt.cs b/Projectiles/Summon/WitherBolt.cs index 7f7a8d4c01..f1d45d1e70 100644 --- a/Projectiles/Summon/WitherBolt.cs +++ b/Projectiles/Summon/WitherBolt.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 spawnPosition = Projectile.Center + Main.rand.NextVector2CircularEdge(8f, 8f); int seeker = Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPosition, Main.rand.NextVector2Circular(12f, 12f), ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack, Projectile.owner); Main.projectile[seeker].originalDamage = Projectile.damage / 2; - Main.projectile[seeker].Calamity().forceMinion = true; + Main.projectile[seeker].DamageType = DamageClass.Summon; } } } From fae59c9f8a7fb22eeaf25e1ee9df9169ab0fae5e Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 13 Jun 2022 18:15:02 -0500 Subject: [PATCH 08/11] Remove the cosmic guardians from Chibi DoG pet --- Projectiles/Pets/ChibiiDoggo.cs | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/Projectiles/Pets/ChibiiDoggo.cs b/Projectiles/Pets/ChibiiDoggo.cs index b9289cbc3f..0ab69d2148 100644 --- a/Projectiles/Pets/ChibiiDoggo.cs +++ b/Projectiles/Pets/ChibiiDoggo.cs @@ -105,29 +105,6 @@ namespace CalamityMod.Projectiles.Pets Projectile.position.Y -= Projectile.velocity.Y; } - public void SpawnDoggo() - { - Player player = Main.player[Projectile.owner]; - string doggoType = "DevourerofGodsHead"; - - if (player.name == "Terry") - { - doggoType += "S"; - Main.NewText("It's not over yet, kid!", Color.Cyan); - } - else - { - doggoType += "2"; - Main.NewText("Don't get cocky, kid!", Color.Cyan); - } - - int type = Mod.Find(doggoType).Type; - - int n = NPC.NewNPC(Projectile.GetSource_FromAI(), (int)Projectile.position.X, (int)Projectile.position.Y, type); - NetMessage.SendData(MessageID.SyncNPC, -1, -1, (NetworkText)null, n, 0.0f, 0.0f, 0.0f, 0, 0, 0); - Main.npc[n].netUpdate = true; - } - public override void AI() { Projectile.type = trueType; //asserts real type after running black Cat AI 26 (ensures chibii pet isnt drawn as black cat and other weird stuff) @@ -240,9 +217,6 @@ namespace CalamityMod.Projectiles.Pets player.Hurt(PlayerDeathReason.ByCustomReason(player.name + " couldn't stand the sharp objects."), 500, 0, false, false, false, -1); } player.RemoveAllIFrames(); - - if (Main.netMode != NetmodeID.MultiplayerClient) - SpawnDoggo(); } Projectile.netUpdate = true; } From 5702fe30b0f490299b81dfcdbb171d653463acd1 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 13 Jun 2022 18:33:06 -0500 Subject: [PATCH 09/11] Fix Aestheticus providing melee proficiency --- CalPlayer/CalamityPlayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index c03655b4f7..43295d1d57 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4462,7 +4462,7 @@ namespace CalamityMod.CalPlayer if ((target.damage > 0 || target.boss) && !target.SpawnedFromStatue && Player.whoAmI == Main.myPlayer) { - if (CalamityConfig.Instance.Proficiency) + if (CalamityConfig.Instance.Proficiency && item.DamageType == DamageClass.Melee) { if (gainLevelCooldown <= 0) { From 487329232b73e122b496d97901dc53b89fcd1566 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 13 Jun 2022 18:45:12 -0500 Subject: [PATCH 10/11] Fix the meteor armor space gun reduction edit --- CalPlayer/CalamityPlayer.cs | 3 +++ Items/VanillaArmorChanges/MeteorArmorSetChange.cs | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 43295d1d57..b7eb789175 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5777,6 +5777,9 @@ namespace CalamityMod.CalPlayer Player.lifeRegen = 0; } + if (meteorSet) + Player.spaceGun = false; + if (Player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) Player.yoraiz0rEye = 0; diff --git a/Items/VanillaArmorChanges/MeteorArmorSetChange.cs b/Items/VanillaArmorChanges/MeteorArmorSetChange.cs index 52dd34a9b4..bdf7ee8a6b 100644 --- a/Items/VanillaArmorChanges/MeteorArmorSetChange.cs +++ b/Items/VanillaArmorChanges/MeteorArmorSetChange.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; namespace CalamityMod.Items.VanillaArmorChanges @@ -21,7 +21,6 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void ApplyArmorSetBonus(Player player) { - player.spaceGun = false; player.Calamity().meteorSet = true; } } From 233a4c4946756024baed3bc3aebc22964257fa50 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 13 Jun 2022 19:07:50 -0500 Subject: [PATCH 11/11] Fix many iron/lead recipes --- Items/Accessories/SpiritGlyph.cs | 2 +- Items/BrokenWaterFilter.cs | 2 +- Items/DifficultyItems/BallAndChain.cs | 2 +- Items/LabFinders/LabSeekingMechanism.cs | 2 +- .../DraedonStructures/AgedSecurityChest.cs | 9 ++++- .../DraedonStructures/LaboratoryPanels.cs | 12 +++++- .../DraedonStructures/LaboratoryPlating.cs | 37 +++++++++++++++---- .../DraedonStructures/RustedPipes.cs | 5 ++- .../DraedonStructures/RustedPlating.cs | 35 +++++++++++++++--- .../DraedonStructures/SecurityChest.cs | 10 ++++- .../CraftingStations/PlagueInfuser.cs | 8 +++- Items/Placeables/FurnitureAbyss/AbyssChest.cs | 8 +++- Items/Placeables/FurnitureAbyss/AbyssClock.cs | 9 ++++- .../FurnitureAcidwood/AcidwoodChest.cs | 8 +++- .../FurnitureAcidwood/AcidwoodClock.cs | 9 ++++- Items/Placeables/FurnitureAshen/AshenChest.cs | 8 +++- .../FurnitureBotanic/BotanicChest.cs | 8 +++- .../FurnitureBotanic/BotanicClock.cs | 8 +++- .../FurnitureCosmilite/CosmiliteBasin.cs | 8 +++- .../FurnitureCosmilite/CosmiliteChest.cs | 8 +++- .../FurnitureCosmilite/CosmiliteClock.cs | 9 ++++- Items/Placeables/FurnitureExo/ExoChest.cs | 8 +++- Items/Placeables/FurnitureExo/ExoClock.cs | 9 ++++- .../FurnitureMonolith/MonolithChest.cs | 8 +++- .../FurnitureMonolith/MonolithClock.cs | 9 ++++- .../FurniturePlagued/PlaguedPlateChest.cs | 9 ++++- .../FurniturePlagued/PlaguedPlateClock.cs | 10 ++++- .../FurnitureProfaned/ProfanedChest.cs | 8 +++- .../FurnitureProfaned/ProfanedClock.cs | 9 ++++- .../FurnitureStatigel/StatigelChest.cs | 8 +++- .../FurnitureStatigel/StatigelClock.cs | 9 ++++- .../FurnitureStratus/StratusChest.cs | 8 +++- .../FurnitureStratus/StratusClock.cs | 9 ++++- Items/Placeables/FurnitureVoid/VoidChest.cs | 8 +++- Items/Placeables/FurnitureVoid/VoidObelisk.cs | 7 +++- Items/SummonItems/Abombination.cs | 2 +- Items/SummonItems/CosmicWorm.cs | 2 +- Items/Weapons/Ranged/BulletFilledShotgun.cs | 2 +- Items/Weapons/Ranged/HandheldTank.cs | 2 +- Items/Weapons/Typeless/FiniteUse/Bazooka.cs | 2 +- Items/Weapons/Typeless/FiniteUse/Hydra.cs | 2 +- Items/Weapons/Typeless/FiniteUse/Magnum.cs | 2 +- Items/Weapons/Typeless/YanmeisKnife.cs | 2 +- 43 files changed, 261 insertions(+), 81 deletions(-) diff --git a/Items/Accessories/SpiritGlyph.cs b/Items/Accessories/SpiritGlyph.cs index e571d4e325..86ea535d63 100644 --- a/Items/Accessories/SpiritGlyph.cs +++ b/Items/Accessories/SpiritGlyph.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(ItemID.Diamond, 5). - AddIngredient(ItemID.IronBar, 15). + AddRecipeGroup("IronBar", 15). AddTile(TileID.Anvils). Register(); } diff --git a/Items/BrokenWaterFilter.cs b/Items/BrokenWaterFilter.cs index 5efa595854..b32c4be84c 100644 --- a/Items/BrokenWaterFilter.cs +++ b/Items/BrokenWaterFilter.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items { CreateRecipe(). AddIngredient(20). - AddIngredient(ItemID.IronBar, 10). + AddRecipeGroup("IronBar", 10). AddTile(TileID.Anvils). Register(); } diff --git a/Items/DifficultyItems/BallAndChain.cs b/Items/DifficultyItems/BallAndChain.cs index 608be40cc5..964765ee31 100644 --- a/Items/DifficultyItems/BallAndChain.cs +++ b/Items/DifficultyItems/BallAndChain.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.DifficultyItems public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.IronBar, 10). + AddRecipeGroup("IronBar", 10). AddIngredient(ItemID.Chain). AddTile(TileID.Anvils). Register(); diff --git a/Items/LabFinders/LabSeekingMechanism.cs b/Items/LabFinders/LabSeekingMechanism.cs index beefb847b4..13014f163b 100644 --- a/Items/LabFinders/LabSeekingMechanism.cs +++ b/Items/LabFinders/LabSeekingMechanism.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.LabFinders CreateRecipe(). AddIngredient(4). AddIngredient(4). - AddIngredient(ItemID.IronBar, 10). + AddRecipeGroup("IronBar", 10). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Placeables/DraedonStructures/AgedSecurityChest.cs b/Items/Placeables/DraedonStructures/AgedSecurityChest.cs index e37617d617..1f1b384525 100644 --- a/Items/Placeables/DraedonStructures/AgedSecurityChest.cs +++ b/Items/Placeables/DraedonStructures/AgedSecurityChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Tiles.DraedonStructures; using Terraria.ID; using Terraria.ModLoader; @@ -32,7 +32,12 @@ namespace CalamityMod.Items.Placeables.DraedonStructures public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddIngredient(ModContent.ItemType(), 4).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ItemID.IronBar, 2).AddTile(TileID.Anvils).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 4). + AddIngredient(ModContent.ItemType(), 4). + AddIngredient(ModContent.ItemType(), 10). + AddRecipeGroup("IronBar", 2). + AddTile(TileID.Anvils).Register(); } } } diff --git a/Items/Placeables/DraedonStructures/LaboratoryPanels.cs b/Items/Placeables/DraedonStructures/LaboratoryPanels.cs index a7bcf42feb..37c6ff3c14 100644 --- a/Items/Placeables/DraedonStructures/LaboratoryPanels.cs +++ b/Items/Placeables/DraedonStructures/LaboratoryPanels.cs @@ -26,8 +26,16 @@ namespace CalamityMod.Items.Placeables.DraedonStructures public override void AddRecipes() { - CreateRecipe(25).AddIngredient(ItemID.IronBar).AddRecipeGroup("AnyStoneBlock", 3).AddTile(TileID.HeavyWorkBench).Register(); - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddTile(TileID.WorkBenches).Register(); + CreateRecipe(25). + AddRecipeGroup("IronBar"). + AddRecipeGroup("AnyStoneBlock", 3). + AddTile(TileID.HeavyWorkBench). + Register(); + + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 4). + AddTile(TileID.WorkBenches). + Register(); } } } diff --git a/Items/Placeables/DraedonStructures/LaboratoryPlating.cs b/Items/Placeables/DraedonStructures/LaboratoryPlating.cs index 497982cf0a..c47b62485e 100644 --- a/Items/Placeables/DraedonStructures/LaboratoryPlating.cs +++ b/Items/Placeables/DraedonStructures/LaboratoryPlating.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Walls.DraedonStructures; +using CalamityMod.Items.Placeables.Walls.DraedonStructures; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.DraedonStructures @@ -26,12 +26,35 @@ namespace CalamityMod.Items.Placeables.DraedonStructures public override void AddRecipes() { - CreateRecipe(25).AddIngredient(ItemID.IronBar).AddRecipeGroup("AnyStoneBlock", 3).AddTile(TileID.HeavyWorkBench).Register(); - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddTile(TileID.Anvils).Register(); - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 2).Register(); - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddTile(TileID.WorkBenches).Register(); - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddTile(TileID.WorkBenches).Register(); - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddTile(TileID.WorkBenches).Register(); + CreateRecipe(25). + AddRecipeGroup("IronBar"). + AddRecipeGroup("AnyStoneBlock", 3). + AddTile(TileID.HeavyWorkBench). + Register(); + + CreateRecipe(1). + AddIngredient(ModContent.ItemType()). + AddTile(TileID.Anvils). + Register(); + + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 2). + Register(); + + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 4). + AddTile(TileID.WorkBenches). + Register(); + + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 4). + AddTile(TileID.WorkBenches). + Register(); + + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 4). + AddTile(TileID.WorkBenches). + Register(); } } } diff --git a/Items/Placeables/DraedonStructures/RustedPipes.cs b/Items/Placeables/DraedonStructures/RustedPipes.cs index b2926d1eb2..2b2149098a 100644 --- a/Items/Placeables/DraedonStructures/RustedPipes.cs +++ b/Items/Placeables/DraedonStructures/RustedPipes.cs @@ -25,7 +25,10 @@ namespace CalamityMod.Items.Placeables.DraedonStructures public override void AddRecipes() { - CreateRecipe(5).AddIngredient(ItemID.IronBar).AddTile(TileID.Anvils).Register(); + CreateRecipe(5). + AddRecipeGroup("IronBar"). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Placeables/DraedonStructures/RustedPlating.cs b/Items/Placeables/DraedonStructures/RustedPlating.cs index 191d79ed9f..eaa7fe2075 100644 --- a/Items/Placeables/DraedonStructures/RustedPlating.cs +++ b/Items/Placeables/DraedonStructures/RustedPlating.cs @@ -26,12 +26,35 @@ namespace CalamityMod.Items.Placeables.DraedonStructures public override void AddRecipes() { - CreateRecipe(25).AddIngredient(ItemID.IronBar).AddRecipeGroup("AnyStoneBlock", 3).AddTile(TileID.HeavyWorkBench).Register(); - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddTile(TileID.Anvils).Register(); - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 2).Register(); - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddTile(TileID.WorkBenches).Register(); - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddTile(TileID.WorkBenches).Register(); - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddTile(TileID.WorkBenches).Register(); + CreateRecipe(25). + AddRecipeGroup("IronBar"). + AddRecipeGroup("AnyStoneBlock", 3). + AddTile(TileID.HeavyWorkBench). + Register(); + + CreateRecipe(1). + AddIngredient(ModContent.ItemType()). + AddTile(TileID.Anvils). + Register(); + + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 2). + Register(); + + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 4). + AddTile(TileID.WorkBenches). + Register(); + + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 4). + AddTile(TileID.WorkBenches). + Register(); + + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 4). + AddTile(TileID.WorkBenches). + Register(); } } } diff --git a/Items/Placeables/DraedonStructures/SecurityChest.cs b/Items/Placeables/DraedonStructures/SecurityChest.cs index 2160f4f074..b41b1e861c 100644 --- a/Items/Placeables/DraedonStructures/SecurityChest.cs +++ b/Items/Placeables/DraedonStructures/SecurityChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Tiles.DraedonStructures; using Terraria.ID; using Terraria.ModLoader; @@ -32,7 +32,13 @@ namespace CalamityMod.Items.Placeables.DraedonStructures public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddIngredient(ModContent.ItemType(), 4).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ItemID.IronBar, 2).AddTile(TileID.Anvils).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 4). + AddIngredient(ModContent.ItemType(), 4). + AddIngredient(ModContent.ItemType(), 10). + AddRecipeGroup("IronBar", 2). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Placeables/Furniture/CraftingStations/PlagueInfuser.cs b/Items/Placeables/Furniture/CraftingStations/PlagueInfuser.cs index 050e4dc09c..c5588e0cee 100644 --- a/Items/Placeables/Furniture/CraftingStations/PlagueInfuser.cs +++ b/Items/Placeables/Furniture/CraftingStations/PlagueInfuser.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.Furniture.CraftingStations @@ -27,7 +27,11 @@ namespace CalamityMod.Items.Placeables.Furniture.CraftingStations public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.IronBar, 10).AddIngredient(ModContent.ItemType(), 20).AddTile(TileID.Anvils).Register(); + CreateRecipe(1). + AddRecipeGroup("IronBar", 10). + AddIngredient(ModContent.ItemType(), 20). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Placeables/FurnitureAbyss/AbyssChest.cs b/Items/Placeables/FurnitureAbyss/AbyssChest.cs index 7c593b31aa..fb45a6a75b 100644 --- a/Items/Placeables/FurnitureAbyss/AbyssChest.cs +++ b/Items/Placeables/FurnitureAbyss/AbyssChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureAbyss @@ -28,7 +28,11 @@ namespace CalamityMod.Items.Placeables.FurnitureAbyss public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddRecipeGroup("IronBar", 2). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureAbyss/AbyssClock.cs b/Items/Placeables/FurnitureAbyss/AbyssClock.cs index bfbae7edc7..c5a31890c4 100644 --- a/Items/Placeables/FurnitureAbyss/AbyssClock.cs +++ b/Items/Placeables/FurnitureAbyss/AbyssClock.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureAbyss @@ -28,7 +28,12 @@ namespace CalamityMod.Items.Placeables.FurnitureAbyss public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType(), 10).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddRecipeGroup("IronBar", 3). + AddIngredient(ItemID.Glass, 6). + AddIngredient(ModContent.ItemType(), 10). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureAcidwood/AcidwoodChest.cs b/Items/Placeables/FurnitureAcidwood/AcidwoodChest.cs index 8dc8a6d654..5318da59d5 100644 --- a/Items/Placeables/FurnitureAcidwood/AcidwoodChest.cs +++ b/Items/Placeables/FurnitureAcidwood/AcidwoodChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.FurnitureAcidwood; +using CalamityMod.Tiles.FurnitureAcidwood; using Terraria.ModLoader; using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureAcidwood @@ -27,7 +27,11 @@ namespace CalamityMod.Items.Placeables.FurnitureAcidwood public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(TileID.WorkBenches).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddRecipeGroup("IronBar", 2). + AddTile(TileID.WorkBenches). + Register(); } } } diff --git a/Items/Placeables/FurnitureAcidwood/AcidwoodClock.cs b/Items/Placeables/FurnitureAcidwood/AcidwoodClock.cs index 5b26c71572..989f97f36b 100644 --- a/Items/Placeables/FurnitureAcidwood/AcidwoodClock.cs +++ b/Items/Placeables/FurnitureAcidwood/AcidwoodClock.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.FurnitureAcidwood; +using CalamityMod.Tiles.FurnitureAcidwood; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureAcidwood @@ -27,7 +27,12 @@ namespace CalamityMod.Items.Placeables.FurnitureAcidwood public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType(), 10).AddTile(TileID.Sawmill).Register(); + CreateRecipe(1). + AddRecipeGroup("IronBar", 3). + AddIngredient(ItemID.Glass, 6). + AddIngredient(ModContent.ItemType(), 10). + AddTile(TileID.Sawmill). + Register(); } } } diff --git a/Items/Placeables/FurnitureAshen/AshenChest.cs b/Items/Placeables/FurnitureAshen/AshenChest.cs index 7d6929c480..e0fdd6ab7c 100644 --- a/Items/Placeables/FurnitureAshen/AshenChest.cs +++ b/Items/Placeables/FurnitureAshen/AshenChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureAshen @@ -28,7 +28,11 @@ namespace CalamityMod.Items.Placeables.FurnitureAshen public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddRecipeGroup("IronBar", 2). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureBotanic/BotanicChest.cs b/Items/Placeables/FurnitureBotanic/BotanicChest.cs index fd7a591602..6da4c09e82 100644 --- a/Items/Placeables/FurnitureBotanic/BotanicChest.cs +++ b/Items/Placeables/FurnitureBotanic/BotanicChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureBotanic @@ -27,7 +27,11 @@ namespace CalamityMod.Items.Placeables.FurnitureBotanic public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddRecipeGroup("IronBar", 2). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureBotanic/BotanicClock.cs b/Items/Placeables/FurnitureBotanic/BotanicClock.cs index ceda2cd1e9..f10e1f8edb 100644 --- a/Items/Placeables/FurnitureBotanic/BotanicClock.cs +++ b/Items/Placeables/FurnitureBotanic/BotanicClock.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureBotanic @@ -27,7 +27,11 @@ namespace CalamityMod.Items.Placeables.FurnitureBotanic public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ItemID.IronBar, 3).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 10). + AddRecipeGroup("IronBar", 3). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs b/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs index a8398d14ce..b9e6a692d7 100644 --- a/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs +++ b/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs @@ -1,4 +1,4 @@ -using Terraria.ID; +using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Tiles.FurnitureCosmilite; using CalamityMod.Tiles.Furniture.CraftingStations; @@ -29,7 +29,11 @@ namespace CalamityMod.Items.Placeables.FurnitureCosmilite public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ItemID.IronBar, 5).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 10). + AddRecipeGroup("IronBar", 5). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureCosmilite/CosmiliteChest.cs b/Items/Placeables/FurnitureCosmilite/CosmiliteChest.cs index fdc1e72d27..775d8effce 100644 --- a/Items/Placeables/FurnitureCosmilite/CosmiliteChest.cs +++ b/Items/Placeables/FurnitureCosmilite/CosmiliteChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureCosmilite @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Placeables.FurnitureCosmilite public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddRecipeGroup("IronBar", 2). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureCosmilite/CosmiliteClock.cs b/Items/Placeables/FurnitureCosmilite/CosmiliteClock.cs index fbaa8ad33c..0fb383c75a 100644 --- a/Items/Placeables/FurnitureCosmilite/CosmiliteClock.cs +++ b/Items/Placeables/FurnitureCosmilite/CosmiliteClock.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; @@ -27,7 +27,12 @@ namespace CalamityMod.Items.Placeables.FurnitureCosmilite public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType(), 10).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddRecipeGroup("IronBar", 3). + AddIngredient(ItemID.Glass, 6). + AddIngredient(ModContent.ItemType(), 10). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureExo/ExoChest.cs b/Items/Placeables/FurnitureExo/ExoChest.cs index ce4d7beb29..cf44f37d75 100644 --- a/Items/Placeables/FurnitureExo/ExoChest.cs +++ b/Items/Placeables/FurnitureExo/ExoChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ModLoader; using Terraria.ID; @@ -29,7 +29,11 @@ namespace CalamityMod.Items.Placeables.FurnitureExo public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddRecipeGroup("IronBar", 2). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureExo/ExoClock.cs b/Items/Placeables/FurnitureExo/ExoClock.cs index 8f5ed796aa..4777b5f2a8 100644 --- a/Items/Placeables/FurnitureExo/ExoClock.cs +++ b/Items/Placeables/FurnitureExo/ExoClock.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; using Terraria.ModLoader; @@ -29,7 +29,12 @@ namespace CalamityMod.Items.Placeables.FurnitureExo public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType(), 10).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddRecipeGroup("IronBar", 3). + AddIngredient(ItemID.Glass, 6). + AddIngredient(ModContent.ItemType(), 10). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureMonolith/MonolithChest.cs b/Items/Placeables/FurnitureMonolith/MonolithChest.cs index faa2dd2265..b82216fa5f 100644 --- a/Items/Placeables/FurnitureMonolith/MonolithChest.cs +++ b/Items/Placeables/FurnitureMonolith/MonolithChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ModLoader; using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureMonolith @@ -27,7 +27,11 @@ namespace CalamityMod.Items.Placeables.FurnitureMonolith public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddRecipeGroup("IronBar", 2). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureMonolith/MonolithClock.cs b/Items/Placeables/FurnitureMonolith/MonolithClock.cs index 3e9a89f254..bf3326b272 100644 --- a/Items/Placeables/FurnitureMonolith/MonolithClock.cs +++ b/Items/Placeables/FurnitureMonolith/MonolithClock.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureMonolith @@ -27,7 +27,12 @@ namespace CalamityMod.Items.Placeables.FurnitureMonolith public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 10). + AddRecipeGroup("IronBar", 3). + AddIngredient(ItemID.Glass, 6). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurniturePlagued/PlaguedPlateChest.cs b/Items/Placeables/FurniturePlagued/PlaguedPlateChest.cs index 1bd3760bc6..48f36b204d 100644 --- a/Items/Placeables/FurniturePlagued/PlaguedPlateChest.cs +++ b/Items/Placeables/FurniturePlagued/PlaguedPlateChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; @@ -28,7 +28,12 @@ namespace CalamityMod.Items.Placeables.FurniturePlagued public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ModContent.ItemType(), 2).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddIngredient(ModContent.ItemType(), 2). + AddRecipeGroup("IronBar", 2). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurniturePlagued/PlaguedPlateClock.cs b/Items/Placeables/FurniturePlagued/PlaguedPlateClock.cs index fff076e553..e51a917ec4 100644 --- a/Items/Placeables/FurniturePlagued/PlaguedPlateClock.cs +++ b/Items/Placeables/FurniturePlagued/PlaguedPlateClock.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; @@ -28,7 +28,13 @@ namespace CalamityMod.Items.Placeables.FurniturePlagued public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ModContent.ItemType(), 2).AddIngredient(ItemID.Glass, 6).AddIngredient(ItemID.IronBar, 3).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 10). + AddIngredient(ModContent.ItemType(), 2). + AddIngredient(ItemID.Glass, 6). + AddRecipeGroup("IronBar", 3). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureProfaned/ProfanedChest.cs b/Items/Placeables/FurnitureProfaned/ProfanedChest.cs index 4ef87d18e3..9ffb343a8e 100644 --- a/Items/Placeables/FurnitureProfaned/ProfanedChest.cs +++ b/Items/Placeables/FurnitureProfaned/ProfanedChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureProfaned @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Placeables.FurnitureProfaned public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddRecipeGroup("IronBar", 2). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureProfaned/ProfanedClock.cs b/Items/Placeables/FurnitureProfaned/ProfanedClock.cs index 1336bce0ec..1c271f9539 100644 --- a/Items/Placeables/FurnitureProfaned/ProfanedClock.cs +++ b/Items/Placeables/FurnitureProfaned/ProfanedClock.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureProfaned @@ -26,7 +26,12 @@ namespace CalamityMod.Items.Placeables.FurnitureProfaned public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType(), 10).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddRecipeGroup("IronBar", 3). + AddIngredient(ItemID.Glass, 6). + AddIngredient(ModContent.ItemType(), 10). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureStatigel/StatigelChest.cs b/Items/Placeables/FurnitureStatigel/StatigelChest.cs index f2420af658..87469c916b 100644 --- a/Items/Placeables/FurnitureStatigel/StatigelChest.cs +++ b/Items/Placeables/FurnitureStatigel/StatigelChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureStatigel @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Placeables.FurnitureStatigel public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddRecipeGroup("IronBar", 2). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureStatigel/StatigelClock.cs b/Items/Placeables/FurnitureStatigel/StatigelClock.cs index 69ac48c7d2..8c3706d127 100644 --- a/Items/Placeables/FurnitureStatigel/StatigelClock.cs +++ b/Items/Placeables/FurnitureStatigel/StatigelClock.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureStatigel @@ -26,7 +26,12 @@ namespace CalamityMod.Items.Placeables.FurnitureStatigel public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType(), 10).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddRecipeGroup("IronBar", 3). + AddIngredient(ItemID.Glass, 6). + AddIngredient(ModContent.ItemType(), 10). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureStratus/StratusChest.cs b/Items/Placeables/FurnitureStratus/StratusChest.cs index beb9698026..b0c75c0b3e 100644 --- a/Items/Placeables/FurnitureStratus/StratusChest.cs +++ b/Items/Placeables/FurnitureStratus/StratusChest.cs @@ -1,4 +1,4 @@ -using Terraria.ID; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureStratus { @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Placeables.FurnitureStratus public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(TileID.LunarCraftingStation).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddRecipeGroup("IronBar", 2). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Placeables/FurnitureStratus/StratusClock.cs b/Items/Placeables/FurnitureStratus/StratusClock.cs index e67d3fca75..2d5b2724ef 100644 --- a/Items/Placeables/FurnitureStratus/StratusClock.cs +++ b/Items/Placeables/FurnitureStratus/StratusClock.cs @@ -1,4 +1,4 @@ -using Terraria.ID; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureStratus { @@ -25,7 +25,12 @@ namespace CalamityMod.Items.Placeables.FurnitureStratus public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddTile(TileID.LunarCraftingStation).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 10). + AddRecipeGroup("IronBar", 3). + AddIngredient(ItemID.Glass, 6). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Placeables/FurnitureVoid/VoidChest.cs b/Items/Placeables/FurnitureVoid/VoidChest.cs index abb8ba6d1a..d15fd5cb8f 100644 --- a/Items/Placeables/FurnitureVoid/VoidChest.cs +++ b/Items/Placeables/FurnitureVoid/VoidChest.cs @@ -1,4 +1,4 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureVoid @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Placeables.FurnitureVoid public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ItemID.IronBar, 2).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddIngredient(ModContent.ItemType(), 8). + AddRecipeGroup("IronBar", 2). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/Placeables/FurnitureVoid/VoidObelisk.cs b/Items/Placeables/FurnitureVoid/VoidObelisk.cs index aea76e3bb7..b8e19b93c2 100644 --- a/Items/Placeables/FurnitureVoid/VoidObelisk.cs +++ b/Items/Placeables/FurnitureVoid/VoidObelisk.cs @@ -28,7 +28,12 @@ namespace CalamityMod.Items.Placeables.FurnitureVoid public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.IronBar, 3).AddIngredient(ItemID.Glass, 6).AddIngredient(ModContent.ItemType(), 10).AddTile(ModContent.TileType()).Register(); + CreateRecipe(1). + AddRecipeGroup("IronBar", 3). + AddIngredient(ItemID.Glass, 6). + AddIngredient(ModContent.ItemType(), 10). + AddTile(ModContent.TileType()). + Register(); } } } diff --git a/Items/SummonItems/Abombination.cs b/Items/SummonItems/Abombination.cs index 3690c81e1c..5963870ed6 100644 --- a/Items/SummonItems/Abombination.cs +++ b/Items/SummonItems/Abombination.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.SummonItems { CreateRecipe(). AddIngredient(20). - AddIngredient(ItemID.IronBar, 8). + AddRecipeGroup("IronBar", 8). AddIngredient(ItemID.Stinger, 5). AddIngredient(ItemID.Obsidian, 3). AddTile(TileID.MythrilAnvil). diff --git a/Items/SummonItems/CosmicWorm.cs b/Items/SummonItems/CosmicWorm.cs index 17ca8c61a2..0bd5abd421 100644 --- a/Items/SummonItems/CosmicWorm.cs +++ b/Items/SummonItems/CosmicWorm.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.SummonItems Register(); CreateRecipe(). - AddIngredient(ItemID.IronBar, 30). + AddRecipeGroup("IronBar", 30). AddIngredient(ItemID.LunarBar, 10). AddIngredient(20). AddIngredient(ItemID.SoulofLight, 20). diff --git a/Items/Weapons/Ranged/BulletFilledShotgun.cs b/Items/Weapons/Ranged/BulletFilledShotgun.cs index 13556e7888..4d5dbc5a5c 100644 --- a/Items/Weapons/Ranged/BulletFilledShotgun.cs +++ b/Items/Weapons/Ranged/BulletFilledShotgun.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Items.Weapons.Ranged { CreateRecipe(). AddIngredient(ItemID.MusketBall, 100). - AddIngredient(ItemID.IronBar, 7). + AddRecipeGroup("IronBar", 7). AddIngredient(3). AddTile(TileID.Anvils). Register(); diff --git a/Items/Weapons/Ranged/HandheldTank.cs b/Items/Weapons/Ranged/HandheldTank.cs index 29caa17d48..c18c365f1e 100644 --- a/Items/Weapons/Ranged/HandheldTank.cs +++ b/Items/Weapons/Ranged/HandheldTank.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Ranged { CreateRecipe(). AddIngredient(). - AddIngredient(ItemID.IronBar, 50). + AddRecipeGroup("IronBar", 50). AddIngredient(5). AddIngredient(ItemID.TigerSkin). AddTile(TileID.LunarCraftingStation). diff --git a/Items/Weapons/Typeless/FiniteUse/Bazooka.cs b/Items/Weapons/Typeless/FiniteUse/Bazooka.cs index 332a0af866..212c434829 100644 --- a/Items/Weapons/Typeless/FiniteUse/Bazooka.cs +++ b/Items/Weapons/Typeless/FiniteUse/Bazooka.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse { CreateRecipe(). AddIngredient(ItemID.IllegalGunParts). - AddIngredient(ItemID.IronBar, 20). + AddRecipeGroup("IronBar", 20). AddRecipeGroup("AnyAdamantiteBar", 15). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Typeless/FiniteUse/Hydra.cs b/Items/Weapons/Typeless/FiniteUse/Hydra.cs index e1a9aa44a1..636f70aad0 100644 --- a/Items/Weapons/Typeless/FiniteUse/Hydra.cs +++ b/Items/Weapons/Typeless/FiniteUse/Hydra.cs @@ -93,7 +93,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse CreateRecipe(). AddIngredient(ItemID.Shotgun). AddIngredient(ItemID.IllegalGunParts). - AddIngredient(ItemID.IronBar, 20). + AddRecipeGroup("IronBar", 20). AddIngredient(ItemID.Ectoplasm, 20). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Typeless/FiniteUse/Magnum.cs b/Items/Weapons/Typeless/FiniteUse/Magnum.cs index f9c4bd6353..5eb6147a5e 100644 --- a/Items/Weapons/Typeless/FiniteUse/Magnum.cs +++ b/Items/Weapons/Typeless/FiniteUse/Magnum.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse { CreateRecipe(). AddIngredient(ItemID.FlintlockPistol). - AddIngredient(ItemID.IronBar, 10). + AddRecipeGroup("IronBar", 10). AddIngredient(ItemID.Diamond, 5). AddTile(TileID.Anvils). Register(); diff --git a/Items/Weapons/Typeless/YanmeisKnife.cs b/Items/Weapons/Typeless/YanmeisKnife.cs index bb48e0d3e3..48234c38bc 100644 --- a/Items/Weapons/Typeless/YanmeisKnife.cs +++ b/Items/Weapons/Typeless/YanmeisKnife.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Items.Weapons.Typeless CreateRecipe(). AddIngredient(ItemID.PsychoKnife). AddIngredient(ItemID.Obsidian, 10). - AddIngredient(ItemID.IronBar, 20). + AddRecipeGroup("IronBar", 20). AddIngredient(50). AddTile(TileID.MythrilAnvil). Register();