diff --git a/Buffs/Potions/ShadowBuff.cs b/Buffs/Potions/ShadowBuff.cs index 72ee6c1d8b..0244cb7c0b 100644 --- a/Buffs/Potions/ShadowBuff.cs +++ b/Buffs/Potions/ShadowBuff.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Buffs.Potions public override void Update(Player player, ref int buffIndex) { player.Calamity().shadow = true; - if (player.yoraiz0rEye < 2 && CalamityConfig.Instance.StealthInvisibility) + if (player.yoraiz0rEye < 2 && CalamityClientConfig.Instance.StealthInvisibility) player.yoraiz0rEye = 2; } } diff --git a/Buffs/StatBuffs/BossEffects.cs b/Buffs/StatBuffs/BossEffects.cs index 46022d0e27..e32088eaa6 100644 --- a/Buffs/StatBuffs/BossEffects.cs +++ b/Buffs/StatBuffs/BossEffects.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare) { - if (CalamityConfig.Instance.BossZen) + if (CalamityServerConfig.Instance.BossZen) tip = tip.Replace(":", ":\n" + this.GetLocalizedValue("ZenDescription")); } } diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 7bb3cc576f..606e26bebd 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2241,13 +2241,13 @@ namespace CalamityMod.CalPlayer #region Screen Position Movements public override void ModifyScreenPosition() { - if (CalamityConfig.Instance.ScreenshakePower == 0) + if (CalamityClientConfig.Instance.ScreenshakePower == 0) return; if (GeneralScreenShakePower > 0f) { - Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityConfig.Instance.ScreenshakePower); - GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityConfig.Instance.ScreenshakePower); + Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower); + GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityClientConfig.Instance.ScreenshakePower); } } #endregion @@ -2670,7 +2670,7 @@ namespace CalamityMod.CalPlayer // Respawn the player faster // 3 seconds normally and configurable while a boss is alive between 15 and 60 seconds - int respawnTimerSet = areThereAnyDamnBosses ? (CalamityConfig.Instance.PlayerRespawnTime_BossAlive * 60) : 180; + int respawnTimerSet = areThereAnyDamnBosses ? (CalamityServerConfig.Instance.PlayerRespawnTime_BossAlive * 60) : 180; if (Player.respawnTimer > respawnTimerSet) Player.respawnTimer = respawnTimerSet; } @@ -3342,14 +3342,14 @@ namespace CalamityMod.CalPlayer public override void UpdateEquips() { // TODO -- why is boss health bar code in Player.UpdateEquips and not a ModSystem - CalamityConfig.Instance.BossHealthBarExtraInfo = shouldDrawSmallText; + CalamityClientConfig.Instance.BossHealthBarExtraInfo = shouldDrawSmallText; // Putting this in GlobalItem will run multiple times for each slot, which this system already does, creating a slew of problems. VanillaArmorChangeManager.ApplyPotentialEffectsTo(Player); // If the config is enabled, vastly increase the player's base tile and wall placement speeds // This stacks with the Brick Layer and Portable Cement Mixer - if (CalamityConfig.Instance.FasterTilePlacement) + if (CalamityServerConfig.Instance.FasterTilePlacement) { Player.tileSpeed += 0.5f; Player.wallSpeed += 0.5f; @@ -4863,11 +4863,11 @@ namespace CalamityMod.CalPlayer // Enabling the config while a player is loaded will show the timer immediately. // But it won't start running until you save and quit and re-enter a world. - if (CalamityConfig.Instance.SpeedrunTimer) + if (CalamityClientConfig.Instance.SpeedrunTimer) CalamityMod.SpeedrunTimer.Restart(); // Set a random delay between 12 and 20 seconds. When this delay hits zero, startup messages display - if (CalamityConfig.Instance.WikiStatusMessage) + if (CalamityClientConfig.Instance.WikiStatusMessage) { startMessageDisplayDelay = Main.rand.Next(CalamityUtils.SecondsToFrames(12), CalamityUtils.SecondsToFrames(20) + 1); } diff --git a/CalPlayer/CalamityPlayerDashEffects.cs b/CalPlayer/CalamityPlayerDashEffects.cs index aaa5820ffb..7b016109cc 100644 --- a/CalPlayer/CalamityPlayerDashEffects.cs +++ b/CalPlayer/CalamityPlayerDashEffects.cs @@ -21,7 +21,7 @@ namespace CalamityMod.CalPlayer { get { - return (String.IsNullOrEmpty(dashID) && Player.dashType == 0 && CalamityConfig.Instance.DefaultDashEnabled) ? DefaultDash.ID : dashID; //gives default dash ONLY if no custom or vanilla dash. + return (String.IsNullOrEmpty(dashID) && Player.dashType == 0 && CalamityServerConfig.Instance.DefaultDashEnabled) ? DefaultDash.ID : dashID; //gives default dash ONLY if no custom or vanilla dash. } set => dashID = value; } diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index 971b68da98..8b1c118372 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -110,7 +110,7 @@ namespace CalamityMod.CalPlayer } // TODO -- rogue stealth visuals are an utter catastrophe and should be fully destroyed on next stealth rework - if (calamityPlayer.rogueStealth > 0f && calamityPlayer.rogueStealthMax > 0f && Player.townNPCs < 3f && CalamityConfig.Instance.StealthInvisibility) + if (calamityPlayer.rogueStealth > 0f && calamityPlayer.rogueStealthMax > 0f && Player.townNPCs < 3f && CalamityClientConfig.Instance.StealthInvisibility) { // A translucent orchid color, the rogue class color float colorValue = calamityPlayer.rogueStealth / calamityPlayer.rogueStealthMax * 0.9f; //0 to 0.9 diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 63303870dd..98b0319d1b 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -83,7 +83,7 @@ namespace CalamityMod.CalPlayer // Give the player a 24% jump speed boost while wings are equipped, otherwise grant 4% more jump speed so that players can jump 7 tiles high if (Player.wingsLogic > 0) Player.jumpSpeedBoost += 1.2f; - else if (CalamityConfig.Instance.FasterJumpSpeed) + else if (CalamityServerConfig.Instance.FasterJumpSpeed) Player.jumpSpeedBoost += 0.2f; // Decrease the counter on Fearmonger set turbo regeneration @@ -983,7 +983,7 @@ namespace CalamityMod.CalPlayer { Player.buffImmune[ModContent.BuffType()] = true; } - if (CalamityConfig.Instance.ChilledWaterRework) + if (CalamityServerConfig.Instance.ChilledWaterRework) { if (Main.expertMode && Player.ZoneSnow && Player.wet && !Player.lavaWet && !Player.honeyWet) { @@ -1098,7 +1098,7 @@ namespace CalamityMod.CalPlayer Player.noFallDmg = true; } - if (CalamityConfig.Instance.FasterFallHotkey) + if (CalamityClientConfig.Instance.FasterFallHotkey) { // Allow the player to double their gravity (but NOT max fall speed!) by holding the down button while in midair. bool holdingDown = Player.controlDown && !Player.controlJump; @@ -2712,7 +2712,7 @@ namespace CalamityMod.CalPlayer // 50% movement speed bonus so that you don't feel like a snail in the early game // Disabled while Overhaul is enabled, because Overhaul does very similar things to make movement more snappy - if (CalamityMod.Instance.overhaul is null && CalamityConfig.Instance.FasterBaseSpeed) + if (CalamityMod.Instance.overhaul is null && CalamityServerConfig.Instance.FasterBaseSpeed) Player.moveSpeed += BalancingConstants.DefaultMoveSpeedBoost; // Reduce how slow Chilled makes the player, because it's cancerous right now @@ -4146,7 +4146,7 @@ namespace CalamityMod.CalPlayer { if (startMessageDisplayDelay == 0) { - if (CalamityConfig.Instance.WikiStatusMessage) + if (CalamityClientConfig.Instance.WikiStatusMessage) { CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus1"); CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus2"); diff --git a/CalamityConditions.cs b/CalamityConditions.cs index f6b9acdd2d..603526c907 100644 --- a/CalamityConditions.cs +++ b/CalamityConditions.cs @@ -19,7 +19,7 @@ namespace CalamityMod // Config based conditions // - public static readonly Condition PotionSellingConfig = Create("PotionConfig", () => CalamityConfig.Instance.PotionSelling); + public static readonly Condition PotionSellingConfig = Create("PotionConfig", () => CalamityServerConfig.Instance.PotionSelling); // // Player conditions diff --git a/CalamityConfig.cs b/CalamityConfig.cs index 2a46a809b2..49cc222959 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -5,25 +5,21 @@ using CalamityMod.UI.DraedonsArsenal; using CalamityMod.UI.Rippers; using CalamityMod.UI.SulphurousWaterMeter; using Terraria; +using Terraria.Localization; using Terraria.ModLoader.Config; namespace CalamityMod { [BackgroundColor(49, 32, 36, 216)] - public class CalamityConfig : ModConfig + public class CalamityClientConfig : ModConfig { - public static CalamityConfig Instance; - - // TODO -- Not all Calamity config settings should be considered client side. - // There are many configs which are server side and should stay that way. + public static CalamityClientConfig Instance; public override ConfigScope Mode => ConfigScope.ClientSide; - public override bool AcceptClientChanges(ModConfig pendingConfig, int whoAmI, ref string message) => true; // Clamps values that would cause ugly problems if loaded directly without sanitization. [OnDeserialized] internal void ClampValues(StreamingContext context) { - BossHealthBoost = Utils.Clamp(BossHealthBoost, MinBossHealthBoost, MaxBossHealthBoost); RipperMeterShake = Utils.Clamp(RipperMeterShake, MinMeterShake, MaxMeterShake); ParticleLimit = (int)Utils.Clamp(ParticleLimit, MinParticleLimit, MaxParticleLimit); } @@ -48,10 +44,6 @@ namespace CalamityMod [DefaultValue(5000)] public int ParticleLimit { get; set; } - [BackgroundColor(192, 54, 64, 192)] - [DefaultValue(false)] - public bool BossesStopWeather { get; set; } - [BackgroundColor(192, 54, 64, 192)] [SliderColor(224, 165, 56, 128)] [Range(0f, 10f)] @@ -102,6 +94,33 @@ namespace CalamityMod [DefaultValue(true)] public bool StealthMeter { get; set; } + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(true)] + public bool ChargeMeter { get; set; } + + private const float MinMeterShake = 0f; + private const float MaxMeterShake = 4f; + + [BackgroundColor(192, 54, 64, 192)] + [SliderColor(224, 165, 56, 128)] + [Range(MinMeterShake, MaxMeterShake)] + [Increment(1f)] + [DrawTicks] + [DefaultValue(2f)] + public float RipperMeterShake { get; set; } + + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool SpeedrunTimer { get; set; } + + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(true)] + public bool FlightBar { get; set; } + #endregion + + #region Meter Positions + [Header("MeterPositions")] + [BackgroundColor(192, 54, 64, 192)] [SliderColor(224, 165, 56, 128)] [Range(0f, 100f)] @@ -126,10 +145,6 @@ namespace CalamityMod [DefaultValue(SulphurousWaterMeterUI.DefaultPosY)] public float SulphuricWaterMeterPosY { get; set; } - [BackgroundColor(192, 54, 64, 192)] - [DefaultValue(true)] - public bool ChargeMeter { get; set; } - [BackgroundColor(192, 54, 64, 192)] [SliderColor(224, 165, 56, 128)] [Range(0f, 100f)] @@ -143,8 +158,28 @@ namespace CalamityMod public float ChargeMeterPosY { get; set; } [BackgroundColor(192, 54, 64, 192)] - [DefaultValue(false)] - public bool SpeedrunTimer { get; set; } + [SliderColor(224, 165, 56, 128)] + [Range(0f, 100f)] + [DefaultValue(RipperUI.DefaultRagePosX)] + public float RageMeterPosX { get; set; } + + [BackgroundColor(192, 54, 64, 192)] + [SliderColor(224, 165, 56, 128)] + [Range(0f, 100f)] + [DefaultValue(RipperUI.DefaultRagePosY)] + public float RageMeterPosY { get; set; } + + [BackgroundColor(192, 54, 64, 192)] + [SliderColor(224, 165, 56, 128)] + [Range(0f, 100f)] + [DefaultValue(RipperUI.DefaultAdrenPosX)] + public float AdrenalineMeterPosX { get; set; } + + [BackgroundColor(192, 54, 64, 192)] + [SliderColor(224, 165, 56, 128)] + [Range(0f, 100f)] + [DefaultValue(RipperUI.DefaultAdrenPosY)] + public float AdrenalineMeterPosY { get; set; } [BackgroundColor(192, 54, 64, 192)] [SliderColor(224, 165, 56, 128)] @@ -158,10 +193,6 @@ namespace CalamityMod [DefaultValue(SpeedrunTimerUI.DefaultTimerPosY)] public float SpeedrunTimerPosY { get; set; } - [BackgroundColor(192, 54, 64, 192)] - [DefaultValue(true)] - public bool FlightBar { get; set; } - [BackgroundColor(192, 54, 64, 192)] [SliderColor(224, 165, 56, 128)] [Range(0f, 100f)] @@ -202,6 +233,35 @@ namespace CalamityMod [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] public bool FasterFallHotkey { get; set; } + #endregion + } + + [BackgroundColor(49, 32, 36, 216)] + public class CalamityServerConfig : ModConfig + { + public static CalamityServerConfig Instance; + public override ConfigScope Mode => ConfigScope.ServerSide; + public override bool AcceptClientChanges(ModConfig pendingConfig, int whoAmI, ref NetworkText message) + { + if (whoAmI == 0) + return true; + if (whoAmI != 0) + { + message = CalamityUtils.GetText("Configs.CalamityServerConfig.Denied").ToNetworkText(); + return false; + } + return false; + } + + // Clamp values that would cause ugly problems if loaded directly without sanitization. + [OnDeserialized] + internal void ClampValues(StreamingContext context) + { + BossHealthBoost = Utils.Clamp(BossHealthBoost, MinBossHealthBoost, MaxBossHealthBoost); + } + + #region General Gameplay Changes + [Header("Gameplay")] [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] @@ -253,11 +313,14 @@ namespace CalamityMod [DrawTicks] [DefaultValue(MinBossHealthBoost)] public float BossHealthBoost { get; set; } + + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool BossesStopWeather { get; set; } #endregion - #region Default Player Stat Boosts [Header("BaseBoosts")] - + #region Default Player Stat Boosts [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] public bool DefaultDashEnabled { get; set; } @@ -279,9 +342,8 @@ namespace CalamityMod public bool FasterTilePlacement { get; set; } #endregion - #region Expert and Master Mode Changes [Header("ExpertMaster")] - + #region Expert and Master Mode Changes [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] public bool NerfExpertDebuffs { get; set; } @@ -298,44 +360,5 @@ namespace CalamityMod [DefaultValue(false)] public bool ForceTownSafety { get; set; } #endregion - - #region Revengeance Mode Changes - [Header("Revengeance")] - - private const float MinMeterShake = 0f; - private const float MaxMeterShake = 4f; - - [BackgroundColor(192, 54, 64, 192)] - [SliderColor(224, 165, 56, 128)] - [Range(MinMeterShake, MaxMeterShake)] - [Increment(1f)] - [DrawTicks] - [DefaultValue(2f)] - public float RipperMeterShake { get; set; } - - [BackgroundColor(192, 54, 64, 192)] - [SliderColor(224, 165, 56, 128)] - [Range(0f, 100f)] - [DefaultValue(RipperUI.DefaultRagePosX)] - public float RageMeterPosX { get; set; } - - [BackgroundColor(192, 54, 64, 192)] - [SliderColor(224, 165, 56, 128)] - [Range(0f, 100f)] - [DefaultValue(RipperUI.DefaultRagePosY)] - public float RageMeterPosY { get; set; } - - [BackgroundColor(192, 54, 64, 192)] - [SliderColor(224, 165, 56, 128)] - [Range(0f, 100f)] - [DefaultValue(RipperUI.DefaultAdrenPosX)] - public float AdrenalineMeterPosX { get; set; } - - [BackgroundColor(192, 54, 64, 192)] - [SliderColor(224, 165, 56, 128)] - [Range(0f, 100f)] - [DefaultValue(RipperUI.DefaultAdrenPosY)] - public float AdrenalineMeterPosY { get; set; } - #endregion } } diff --git a/CalamityMod.cs b/CalamityMod.cs index 8633e28d87..83f341aeb9 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -547,7 +547,7 @@ namespace CalamityMod #endregion Render Target Management #region Force ModConfig save (Reflection) - internal static void SaveConfig(CalamityConfig cfg) + internal static void SaveConfig(CalamityClientConfig cfg) { // There is no current way to manually save a mod configuration file in tModLoader. // The method which saves mod config files is private in ConfigManager, so reflection is used to invoke it. diff --git a/Cooldowns/ChaosState.cs b/Cooldowns/ChaosState.cs index 4759b9b42c..a049141f3d 100644 --- a/Cooldowns/ChaosState.cs +++ b/Cooldowns/ChaosState.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Cooldowns { public static new string ID => "ChaosState"; - public override bool ShouldDisplay => CalamityConfig.Instance.VanillaCooldownDisplay && instance.player.chaosState; + public override bool ShouldDisplay => CalamityClientConfig.Instance.VanillaCooldownDisplay && instance.player.chaosState; public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}"); public override string Texture => "CalamityMod/Cooldowns/ChaosState" + skinTexture; public override Color OutlineColor => outlineColor; diff --git a/Cooldowns/PotionSickness.cs b/Cooldowns/PotionSickness.cs index 2127706e4e..d7a8708f80 100644 --- a/Cooldowns/PotionSickness.cs +++ b/Cooldowns/PotionSickness.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Cooldowns public class PotionSickness : CooldownHandler { public static new string ID => "PotionSickness"; - public override bool ShouldDisplay => CalamityConfig.Instance.VanillaCooldownDisplay && instance.player.potionDelay > 0; + public override bool ShouldDisplay => CalamityClientConfig.Instance.VanillaCooldownDisplay && instance.player.potionDelay > 0; public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}"); public override string Texture => "CalamityMod/Cooldowns/PotionSickness"; public override Color OutlineColor => new Color(255, 142, 165); diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index ef06ec1d55..6dabd88c65 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -114,7 +114,7 @@ namespace CalamityMod.ILEditing cursor.Remove(); // Increase by 10% if the higher jump speed is enabled. - cursor.EmitDelegate>(() => CalamityConfig.Instance.HigherJumpHeight ? BalancingConstants.ConfigBoostedBaseJumpHeight : VanillaBaseJumpHeight); + cursor.EmitDelegate>(() => CalamityServerConfig.Instance.HigherJumpHeight ? BalancingConstants.ConfigBoostedBaseJumpHeight : VanillaBaseJumpHeight); } #endregion diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 725eefc68f..9daa4a1f1f 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -326,7 +326,7 @@ namespace CalamityMod.ILEditing { // A cached delegate is used here instead of direct reflection for performance reasons // since UpdateTime is called every frame. - if (Main.dayTime || CalamityConfig.Instance.TownNPCsSpawnAtNight) + if (Main.dayTime || CalamityServerConfig.Instance.TownNPCsSpawnAtNight) VanillaSpawnTownNPCs(); }); @@ -342,7 +342,7 @@ namespace CalamityMod.ILEditing private static void AlterTownNPCSpawnRate(Terraria.On_Main.orig_UpdateTime_SpawnTownNPCs orig) { double oldWorldRate = Main.desiredWorldTilesUpdateRate; - Main.desiredWorldTilesUpdateRate *= CalamityConfig.Instance.TownNPCSpawnRateMultiplier; + Main.desiredWorldTilesUpdateRate *= CalamityServerConfig.Instance.TownNPCSpawnRateMultiplier; orig(); Main.desiredWorldTilesUpdateRate = oldWorldRate; } diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs index 4cced8ec61..220368f7b3 100644 --- a/ILEditing/VanillaStupidityFixingILChanges.cs +++ b/ILEditing/VanillaStupidityFixingILChanges.cs @@ -116,7 +116,7 @@ namespace CalamityMod.ILEditing #region Prevention of Slime Rain Spawns When Near Bosses private static void PreventBossSlimeRainSpawns(Terraria.On_NPC.orig_SlimeRainSpawns orig, int plr) { - if (!Main.player[plr].Calamity().isNearbyBoss && CalamityConfig.Instance.BossZen) + if (!Main.player[plr].Calamity().isNearbyBoss && CalamityServerConfig.Instance.BossZen) orig(plr); } #endregion Prevention of Slime Rain Spawns When Near Bosses @@ -136,7 +136,7 @@ namespace CalamityMod.ILEditing // Add an additional check for the config. cursor.Remove(); - cursor.EmitDelegate>(() => CalamityConfig.Instance.RemoveLavaDropsFromLavaSlimes || Main.remixWorld); + cursor.EmitDelegate>(() => CalamityServerConfig.Instance.RemoveLavaDropsFromLavaSlimes || Main.remixWorld); } #endregion @@ -174,7 +174,7 @@ namespace CalamityMod.ILEditing // Emit a delegate which grabs the value of the screenshake config. Then multiply the local variable by it. cursor.Emit(OpCodes.Ldloc_1); - cursor.EmitDelegate>(() => CalamityConfig.Instance.ScreenshakePower); + cursor.EmitDelegate>(() => CalamityClientConfig.Instance.ScreenshakePower); cursor.Emit(OpCodes.Mul); cursor.Emit(OpCodes.Stloc_1); } diff --git a/ILEditing/WorldgenILChanges.cs b/ILEditing/WorldgenILChanges.cs index a3e56d9c07..d3f2523691 100644 --- a/ILEditing/WorldgenILChanges.cs +++ b/ILEditing/WorldgenILChanges.cs @@ -46,7 +46,7 @@ namespace CalamityMod.ILEditing #region Removal of Hardmode Ore Generation from Evil Altars private static void PreventSmashAltarCode(Terraria.On_WorldGen.orig_SmashAltar orig, int i, int j) { - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework) return; orig(i, j); diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 3215e277ff..90e8227993 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1785,7 +1785,7 @@ namespace CalamityMod.Items return keepPrefix ? prefix : 0; } - if (!CalamityConfig.Instance.RemoveReforgeRNG || Main.gameMenu || storedPrefix == -1) + if (!CalamityServerConfig.Instance.RemoveReforgeRNG || Main.gameMenu || storedPrefix == -1) return -1; // Pick a prefix using the new system. diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 67ff14b193..d2fbf35303 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -288,7 +288,7 @@ namespace CalamityMod.Items EditTooltipByNum(1, (line) => line.Text += ", including Mighty Wind"); // If Early Hardmode Rework is enabled: Remind users that ores will NOT spawn when an altar is smashed. - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && (item.type == ItemID.Pwnhammer || item.type == ItemID.Hammush)) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && (item.type == ItemID.Pwnhammer || item.type == ItemID.Hammush)) EditTooltipByNum(0, (line) => line.Text += "\nDemon Altars now drop Souls of Night instead of generating ores when destroyed" + "\nHardmode ores now generate after defeating Mechanical Bosses for the first time"); diff --git a/Items/Placeables/CelestialRemains.cs b/Items/Placeables/CelestialRemains.cs index c597021aad..91bbe5daf6 100644 --- a/Items/Placeables/CelestialRemains.cs +++ b/Items/Placeables/CelestialRemains.cs @@ -132,22 +132,22 @@ namespace CalamityMod.Items.Placeables } else if (val < 85.03f) { - resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : ItemID.MythrilOre) : ItemID.MythrilOre; + resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : ItemID.MythrilOre) : ItemID.MythrilOre; resultStack = Main.rand.Next(1, 17); } else if (val < 87.03f) { - resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : ItemID.OrichalcumOre) : ItemID.OrichalcumOre; + resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : ItemID.OrichalcumOre) : ItemID.OrichalcumOre; resultStack = Main.rand.Next(1, 17); } else if (val < 88.78f) { - resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : !twoMechsDowned ? ItemID.MythrilOre : ItemID.AdamantiteOre) : ItemID.AdamantiteOre; + resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : !twoMechsDowned ? ItemID.MythrilOre : ItemID.AdamantiteOre) : ItemID.AdamantiteOre; resultStack = Main.rand.Next(1, 17); } else if (val < 89.53f) { - resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : !twoMechsDowned ? ItemID.OrichalcumOre : ItemID.TitaniumOre) : ItemID.TitaniumOre; + resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : !twoMechsDowned ? ItemID.OrichalcumOre : ItemID.TitaniumOre) : ItemID.TitaniumOre; resultStack = Main.rand.Next(1, 17); } else if (DownedBossSystem.downedAstrumDeus) diff --git a/Items/Placeables/NovaeSlag.cs b/Items/Placeables/NovaeSlag.cs index 78983dd0f0..14b3cdb79f 100644 --- a/Items/Placeables/NovaeSlag.cs +++ b/Items/Placeables/NovaeSlag.cs @@ -120,22 +120,22 @@ namespace CalamityMod.Items.Placeables } else if (val < 83.03f) { - resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : ItemID.MythrilOre) : ItemID.MythrilOre; + resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : ItemID.MythrilOre) : ItemID.MythrilOre; resultStack = Main.rand.Next(1, 17); } else if (val < 85.03f) { - resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : ItemID.OrichalcumOre) : ItemID.OrichalcumOre; + resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : ItemID.OrichalcumOre) : ItemID.OrichalcumOre; resultStack = Main.rand.Next(1, 17); } else if (val < 86.78f) { - resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : !twoMechsDowned ? ItemID.MythrilOre : ItemID.AdamantiteOre) : ItemID.AdamantiteOre; + resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.CobaltOre : !twoMechsDowned ? ItemID.MythrilOre : ItemID.AdamantiteOre) : ItemID.AdamantiteOre; resultStack = Main.rand.Next(1, 17); } else if (val < 88.53f) { - resultType = CalamityConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : !twoMechsDowned ? ItemID.OrichalcumOre : ItemID.TitaniumOre) : ItemID.TitaniumOre; + resultType = CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? (!NPC.downedMechBossAny ? ItemID.PalladiumOre : !twoMechsDowned ? ItemID.OrichalcumOre : ItemID.TitaniumOre) : ItemID.TitaniumOre; resultStack = Main.rand.Next(1, 17); } else if (DownedBossSystem.downedAstrumDeus) diff --git a/Localization/en-US/Mods.CalamityMod.Configs.hjson b/Localization/en-US/Mods.CalamityMod.Configs.hjson index c934b26403..97dbe057ae 100644 --- a/Localization/en-US/Mods.CalamityMod.Configs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Configs.hjson @@ -1,13 +1,11 @@ -CalamityConfig: { - DisplayName: Main Config +CalamityClientConfig: { + DisplayName: Client Config Headers: { - ExpertMaster: Expert and Master Mode Changes Gameplay: General Gameplay Changes Graphics: Graphics Changes - Revengeance: Revengeance Mode Changes + MeterPositions: Meter Positions UI: UI Changes - BaseBoosts: Base Stat Boosts MusicEvents: Music Events } @@ -38,15 +36,6 @@ CalamityConfig: { ''' } - BossesStopWeather: { - Label: "[i:CalamityMod/TorrentialTear] Bosses Stop Weather" - Tooltip: - ''' - When enabled, many late game bosses will stop all rain and related weather when spawned. - Enable if you have performance issues during late game boss fights. - ''' - } - BossHealthBarExtraInfo: { Label: "[i:CalamityMod/EncryptedSchematicPlanetoid] Boss Health Bar Extra Info" Tooltip: @@ -56,35 +45,6 @@ CalamityConfig: { ''' } - BossHealthBoost: { - Label: "[i:LifeCrystal] Boss Health Boost Percentage" - Tooltip: - ''' - Globally boosts the health of all bosses by the specified percentage. - This stacks with multiplayer boss health boosts. - Does not affect bosses that are already spawned. - ''' - } - - DefaultDashEnabled: { - Label: "[i:Tabi] Default Dash" - Tooltip: - ''' - Gives the player a very weak dash by default that requires no equipment or items to use. - This dash will be replaced by any other available dash, including those from other mods. - ''' - } - - BossZen: { - Label: "[i:CalamityMod/ZenPotion] Bosses Drastically Reduce Spawn Rates" - Tooltip: - ''' - All living bosses will drastically reduce the spawn rates of regular enemies. - This also prevents Slime Rain from occurring while a boss is alive. - Calamity is balanced around this setting being enabled. - ''' - } - ChargeMeter: { Label: "[i:CalamityMod/DraedonPowerCell] Display Charge Meter" Tooltip: @@ -112,11 +72,6 @@ CalamityConfig: { ''' } - ChilledWaterRework: { - Label: "[i:ArcticDivingGear] Chilled Water Rework" - Tooltip: When enabled, water in the Snow and Ice biomes will rapidly drain the player's breath instead of inflicting Chilled. - } - CooldownDisplay: { Label: "[i:CalamityMod/NebulousCore] Cooldown Rack Display Mode" Tooltip: @@ -136,28 +91,6 @@ CalamityConfig: { Tooltip: Plays Calamity Mod OST - "Scourge of The Universe (Eulogy for The Ego)", after The Devourer of Gods has been defeated. } - EarlyHardmodeProgressionRework: { - Label: "[i:Pwnhammer] Early Hardmode Progression Rework" - Tooltip: - ''' - Demon Altars no longer spawn ores and crimson/corruption blocks when broken. - Wall of Flesh spawns Cobalt and Palladium ore on first kill. - The first mech boss you fight has 20% (10% in Expert and Master) less HP and damage and spawns Mythril and Orichalcum ore on first kill. - The second mech boss you fight has 10% (5% in Expert and Master) less HP and damage and spawns Adamantite and Titanium ore on first kill. - The third mech boss spawns Hallowed Ore on first kill. - ''' - } - - FasterBaseSpeed: { - Label: "[i:HermesBoots] Increase Base Movement Speed" - Tooltip: - ''' - Increases the player's base movement speed substantially by always giving them +50% movement speed. - This setting does nothing if the mod Terraria Overhaul is loaded. - Calamity is balanced around this setting being enabled. - ''' - } - FasterFallHotkey: { Label: "[i:CalamityMod/BallAndChain] Enable Fast Falling" Tooltip: @@ -168,24 +101,6 @@ CalamityConfig: { ''' } - FasterJumpSpeed: { - Label: "[i:FrogLeg] Increase Base Jump Speed" - Tooltip: - ''' - Slightly increases the player's base jump speed. - Calamity is balanced around this setting being enabled. - ''' - } - - FasterTilePlacement: { - Label: "[i:ArchitectGizmoPack] Increase Base Building Speed" - Tooltip: - ''' - Substantially increases how rapidly the player can place tiles and walls. - This config stacks with the Brick Layer, Portable Cement Mixer and other accessories. - ''' - } - FlightBar: { Label: "[i:AngelWings] Display Flight Bar" Tooltip: @@ -214,24 +129,6 @@ CalamityConfig: { ''' } - ForceTownSafety: { - Label: "[i:Sunflower] Force Town Safety" - Tooltip: - ''' - Counteracts Expert and Master Mode allowing enemies to spawn near towns by vastly decreasing spawn rates. - This can have unintended side effects such as making critters difficult to find. - ''' - } - - HigherJumpHeight: { - Label: "[i:ShinyRedBalloon] Increase Base Jump Height" - Tooltip: - ''' - Increases the player's base jump height by 10% so that they can jump 7 tiles. - Calamity is balanced around this setting being enabled. - ''' - } - Interlude1: { Label: "[i:CalamityModMusic/Interlude1MusicBox] Interlude 1" Tooltip: Plays Calamity Mod OST - Interlude 1, "Silence before the storms", after Calamitas Clone has been defeated. @@ -265,15 +162,6 @@ CalamityConfig: { ''' } - NerfExpertDebuffs: { - Label: "[i:AnkhCharm] Remove Increased Debuff Duration" - Tooltip: - ''' - Disables Expert Mode doubling (and Master Mode tripling) the duration of debuffs on the player. - Calamity is balanced around this setting being enabled. - ''' - } - NewVanillaTextures: { Label: "[i:Paintbrush] New Vanilla Textures" Tooltip: @@ -312,20 +200,6 @@ CalamityConfig: { ''' } - RemoveLavaDropsFromLavaSlimes: { - Label: "[i:LavaWaders] Remove Lava Drops From Lava Slimes" - Tooltip: When enabled, Lava Slimes will be prevented from dropping lava in Expert Mode. - } - - RemoveReforgeRNG: { - Label: "[i:TinHammer] Remove Reforge RNG" - Tooltip: - ''' - Removes randomness from the Goblin Tinkerer's reforges for both weapons and accessories. - Disable this if using mods that change reforging on their own to prevent conflicts. - ''' - } - RipperMeterShake: { Label: "[i:CalamityMod/RedLightningContainer] Rage and Adrenaline Meter Shake" Tooltip: @@ -433,12 +307,138 @@ CalamityConfig: { ''' } - PotionSelling: { - Label: "[i:SpelunkerPotion] Town NPC Potion Selling" + VanillaCooldownDisplay: { + Label: "[i:HealingPotion] Display Vanilla Cooldowns" Tooltip: ''' - Allows town NPCs to sell various potions. - Certain potions are sold after specific bosses have been defeated. + Adds the vanilla debuffs Potion Sickness and Chaos State to the Cooldown Rack. + The debuffs will still appear in the buffs array, but this may help make them more visible. + ''' + } + + WikiStatusMessage: { + Label: "[i:Book] Wiki Status Message" + Tooltip: Enable or disable the status message promoting the Official Calamity Wiki that plays on world entry. + } +} + +CalamityServerConfig: { + DisplayName: Server Config + Denied: You have no permission to change this config + + Headers: { + ExpertMaster: Expert and Master Mode Changes + Gameplay: General Gameplay Changes + BaseBoosts: Base Stat Boosts + } + + BossesStopWeather: { + Label: "[i:CalamityMod/TorrentialTear] Bosses Stop Weather" + Tooltip: + ''' + When enabled, many late game bosses will stop all rain and related weather when spawned. + Enable if you have performance issues during late game boss fights. + ''' + } + + BossHealthBoost: { + Label: "[i:LifeCrystal] Boss Health Boost Percentage" + Tooltip: + ''' + Globally boosts the health of all bosses by the specified percentage. + This stacks with multiplayer boss health boosts. + Does not affect bosses that are already spawned. + ''' + } + + BossZen: { + Label: "[i:CalamityMod/ZenPotion] Bosses Drastically Reduce Spawn Rates" + Tooltip: + ''' + All living bosses will drastically reduce the spawn rates of regular enemies. + This also prevents Slime Rain from occurring while a boss is alive. + Calamity is balanced around this setting being enabled. + ''' + } + + ChilledWaterRework: { + Label: "[i:ArcticDivingGear] Chilled Water Rework" + Tooltip: When enabled, water in the Snow and Ice biomes will rapidly drain the player's breath instead of inflicting Chilled. + } + + DefaultDashEnabled: { + Label: "[i:Tabi] Default Dash" + Tooltip: + ''' + Gives the player a very weak dash by default that requires no equipment or items to use. + This dash will be replaced by any other available dash, including those from other mods. + ''' + } + + EarlyHardmodeProgressionRework: { + Label: "[i:Pwnhammer] Early Hardmode Progression Rework" + Tooltip: + ''' + Demon Altars no longer spawn ores and crimson/corruption blocks when broken. + Wall of Flesh spawns Cobalt and Palladium ore on first kill. + The first mech boss you fight has 20% (10% in Expert and Master) less HP and damage and spawns Mythril and Orichalcum ore on first kill. + The second mech boss you fight has 10% (5% in Expert and Master) less HP and damage and spawns Adamantite and Titanium ore on first kill. + The third mech boss spawns Hallowed Ore on first kill. + ''' + } + + FasterBaseSpeed: { + Label: "[i:HermesBoots] Increase Base Movement Speed" + Tooltip: + ''' + Increases the player's base movement speed substantially by always giving them +50% movement speed. + This setting does nothing if the mod Terraria Overhaul is loaded. + Calamity is balanced around this setting being enabled. + ''' + } + + FasterJumpSpeed: { + Label: "[i:FrogLeg] Increase Base Jump Speed" + Tooltip: + ''' + Slightly increases the player's base jump speed. + Calamity is balanced around this setting being enabled. + ''' + } + + FasterTilePlacement: { + Label: "[i:ArchitectGizmoPack] Increase Base Building Speed" + Tooltip: + ''' + Substantially increases how rapidly the player can place tiles and walls. + This config stacks with the Brick Layer, Portable Cement Mixer and other accessories. + ''' + } + + ForceTownSafety: { + Label: "[i:Sunflower] Force Town Safety" + Tooltip: + ''' + Counteracts Expert and Master Mode allowing enemies to spawn near towns by vastly decreasing spawn rates. + This can have unintended side effects such as making critters difficult to find. + ''' + } + + HigherJumpHeight: { + Label: "[i:ShinyRedBalloon] Increase Base Jump Height" + Tooltip: + ''' + Increases the player's base jump height by 10% so that they can jump 7 tiles. + Calamity is balanced around this setting being enabled. + ''' + } + + NerfExpertDebuffs: { + Label: "[i:AnkhCharm] Remove Increased Debuff Duration" + Tooltip: + ''' + Disables Expert Mode doubling (and Master Mode tripling) the duration of debuffs on the player. + Calamity is balanced around this setting being enabled. ''' } @@ -451,6 +451,29 @@ CalamityConfig: { ''' } + PotionSelling: { + Label: "[i:SpelunkerPotion] Town NPC Potion Selling" + Tooltip: + ''' + Allows town NPCs to sell various potions. + Certain potions are sold after specific bosses have been defeated. + ''' + } + + RemoveLavaDropsFromLavaSlimes: { + Label: "[i:LavaWaders] Remove Lava Drops From Lava Slimes" + Tooltip: When enabled, Lava Slimes will be prevented from dropping lava in Expert Mode. + } + + RemoveReforgeRNG: { + Label: "[i:TinHammer] Remove Reforge RNG" + Tooltip: + ''' + Removes randomness from the Goblin Tinkerer's reforges for both weapons and accessories. + Disable this if using mods that change reforging on their own to prevent conflicts. + ''' + } + TownNPCSpawnRateMultiplier: { Label: "[i:GuideVoodooDoll] Town NPC Spawn Rate Multiplier" Tooltip: @@ -468,18 +491,4 @@ CalamityConfig: { This includes the Old Man. ''' } - - VanillaCooldownDisplay: { - Label: "[i:HealingPotion] Display Vanilla Cooldowns" - Tooltip: - ''' - Adds the vanilla debuffs Potion Sickness and Chaos State to the Cooldown Rack. - The debuffs will still appear in the buffs array, but this may help make them more visible. - ''' - } - - WikiStatusMessage: { - Label: "[i:Book] Wiki Status Message" - Tooltip: Enable or disable the status message promoting the Official Calamity Wiki that plays on world entry. - } } diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 09288e3327..3ec60468df 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -2163,7 +2163,7 @@ namespace CalamityMod case "GetBossHealthBoost": case "BossHealthMultiplier": case "GetBossHealthMultiplier": - return CalamityConfig.Instance.BossHealthBoost; + return CalamityServerConfig.Instance.BossHealthBoost; case "HasPermanentPowerup": case "GetPermanentPowerup": diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index f2a7a7f31b..ffe90598c0 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.AquaticScourge if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) NPC.lifeMax *= 2; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.behindTiles = true; NPC.noGravity = true; diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index 85d4d29c40..920eed7664 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.AquaticScourge if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) NPC.lifeMax *= 2; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.behindTiles = true; NPC.noGravity = true; diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 0b4cc334fa..eb33d7b299 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.AquaticScourge if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) NPC.lifeMax *= 2; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.value = Item.buyPrice(0, 40, 0, 0); diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index c7cd744e25..a147d7e144 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.AquaticScourge if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) NPC.lifeMax *= 2; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.behindTiles = true; NPC.noGravity = true; diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 61ee4eaa34..1e5440cdd1 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -102,7 +102,7 @@ namespace CalamityMod.NPCs.AstrumAureus NPC.value = Item.buyPrice(0, 60, 0, 0); NPC.boss = true; NPC.DeathSound = DeathSound; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = false; @@ -317,7 +317,7 @@ namespace CalamityMod.NPCs.AstrumAureus if (NPC.ai[0] == 3f || NPC.ai[0] == 4f) afterimageAmt = 10; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -347,7 +347,7 @@ namespace CalamityMod.NPCs.AstrumAureus attackingColor = slimePhase == 0 ? Color.Violet : Color.Yellow; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index 379d8a9e6d..e9dec231b7 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.AstrumAureus NPC.Opacity = 0f; NPC.defense = 10; NPC.lifeMax = 5000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.dontTakeDamage = true; @@ -246,7 +246,7 @@ namespace CalamityMod.NPCs.AstrumAureus Color whiteColor = Color.White; int afterimageAmt = 10; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -269,7 +269,7 @@ namespace CalamityMod.NPCs.AstrumAureus texture2D15 = GlowTexture.Value; Color afterimageColorLerp = Color.Lerp(Color.White, Color.Orange, 0.5f) * NPC.Opacity; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index 29d3848680..845ba253ca 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.AstrumDeus NPC.defense = 35; NPC.DR_NERD(0.25f); NPC.LifeMaxNERB(200000, 240000, 650000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 8ec5567827..3082f52d60 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -82,7 +82,7 @@ namespace CalamityMod.NPCs.AstrumDeus NPC.defense = 20; NPC.DR_NERD(0.1f); NPC.LifeMaxNERB(200000, 240000, 650000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 95bb79480f..c1554947d1 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.AstrumDeus NPC.defense = 50; NPC.DR_NERD(0.4f); NPC.LifeMaxNERB(200000, 240000, 650000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/BrimstoneElemental/Brimling.cs b/NPCs/BrimstoneElemental/Brimling.cs index f4fc581261..d56ca21cb8 100644 --- a/NPCs/BrimstoneElemental/Brimling.cs +++ b/NPCs/BrimstoneElemental/Brimling.cs @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental { NPC.lifeMax = 10000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.Calamity().VulnerableToHeat = false; NPC.Calamity().VulnerableToCold = true; diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 39e33068b0..c7d6d7ed6a 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -68,7 +68,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental NPC.value = Item.buyPrice(0, 40, 0, 0); NPC.LifeMaxNERB(41000, 49200, 780000); NPC.DR_NERD(0.15f); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.aiStyle = -1; diff --git a/NPCs/Bumblebirb/Bumblefuck.cs b/NPCs/Bumblebirb/Bumblefuck.cs index e88ddfb475..12863fa314 100644 --- a/NPCs/Bumblebirb/Bumblefuck.cs +++ b/NPCs/Bumblebirb/Bumblefuck.cs @@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.Bumblebirb NPC.defense = 40; NPC.DR_NERD(0.1f); NPC.LifeMaxNERB(187500, 225000, 300000); // Old HP - 227500, 252500 - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.boss = true; @@ -278,7 +278,7 @@ namespace CalamityMod.NPCs.Bumblebirb color = altColor; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += afterimageIncrement) { @@ -331,7 +331,7 @@ namespace CalamityMod.NPCs.Bumblebirb } } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 0; j < extraAfterimageAmt; j++) { @@ -373,7 +373,7 @@ namespace CalamityMod.NPCs.Bumblebirb glowmaskColor *= glowmaskDampener; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int k = 1; k < afterimageAmt; k += afterimageIncrement) { diff --git a/NPCs/Bumblebirb/Bumblefuck2.cs b/NPCs/Bumblebirb/Bumblefuck2.cs index b79d7fb64a..b4e18592d6 100644 --- a/NPCs/Bumblebirb/Bumblefuck2.cs +++ b/NPCs/Bumblebirb/Bumblefuck2.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.Bumblebirb NPC.height = 80; NPC.defense = 20; NPC.LifeMaxNERB(9375, 11250, 5000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.15f; NPC.lavaImmune = true; @@ -106,7 +106,7 @@ namespace CalamityMod.NPCs.Bumblebirb Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); int afterimageAmt = NPC.ai[0] == 2.1f ? 7 : 0; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index c3c1dd0cbc..5853969837 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -70,7 +70,7 @@ namespace CalamityMod.NPCs.CalClone NPC.value = Item.buyPrice(0, 50, 0, 0); NPC.DR_NERD((CalamityWorld.death || BossRushEvent.BossRushActive) ? 0.075f : 0.15f); NPC.LifeMaxNERB(37500, 45000, 520000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -142,7 +142,7 @@ namespace CalamityMod.NPCs.CalClone float colorLerpAmt = 0.5f; int afterimageAmt = 7; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -169,7 +169,7 @@ namespace CalamityMod.NPCs.CalClone color = Color.CornflowerBlue; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i++) { diff --git a/NPCs/CalClone/Cataclysm.cs b/NPCs/CalClone/Cataclysm.cs index 80b173cc83..257e7143cd 100644 --- a/NPCs/CalClone/Cataclysm.cs +++ b/NPCs/CalClone/Cataclysm.cs @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.CalClone NPC.defense = (CalamityWorld.death || BossRushEvent.BossRushActive) ? 15 : 10; NPC.DR_NERD((CalamityWorld.death || BossRushEvent.BossRushActive) ? 0.225f : 0.15f); NPC.LifeMaxNERB(11000, 13200, 80000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -117,7 +117,7 @@ namespace CalamityMod.NPCs.CalClone Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); int afterimageAmt = 7; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -140,7 +140,7 @@ namespace CalamityMod.NPCs.CalClone texture2D15 = GlowTexture.Value; Color pinkLerp = Color.Lerp(Color.White, Color.Red, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/CalClone/Catastrophe.cs b/NPCs/CalClone/Catastrophe.cs index c06986998d..a189db22f8 100644 --- a/NPCs/CalClone/Catastrophe.cs +++ b/NPCs/CalClone/Catastrophe.cs @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.CalClone NPC.defense = (CalamityWorld.death || BossRushEvent.BossRushActive) ? 15 : 10; NPC.DR_NERD((CalamityWorld.death || BossRushEvent.BossRushActive) ? 0.225f : 0.15f); NPC.LifeMaxNERB(9200, 11025, 80000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -117,7 +117,7 @@ namespace CalamityMod.NPCs.CalClone Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); int afterimageAmt = 7; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -140,7 +140,7 @@ namespace CalamityMod.NPCs.CalClone texture2D15 = GlowTexture.Value; Color pinkLerp = Color.Lerp(Color.White, Color.Red, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/CalClone/SoulSeeker.cs b/NPCs/CalClone/SoulSeeker.cs index adbefe7503..7158e8b378 100644 --- a/NPCs/CalClone/SoulSeeker.cs +++ b/NPCs/CalClone/SoulSeeker.cs @@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.CalClone { NPC.lifeMax = 15000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.HitSound = SoundID.NPCHit4; NPC.DeathSound = SoundID.NPCDeath14; @@ -197,7 +197,7 @@ namespace CalamityMod.NPCs.CalClone float colorLerpAmt = 0.5f; int afterImageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int a = 1; a < afterImageAmt; a += 2) { @@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.CalClone texture = GlowTexture.Value; Color glow = Color.Lerp(Color.White, Color.Red, colorLerpAmt); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int a = 1; a < afterImageAmt; a++) { diff --git a/NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs index e33ab45fd9..4f455fd547 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs @@ -390,7 +390,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs // Destroy all Dark Energies if their total HP is below 20% int darkEnergyMaxHP = bossRush ? DarkEnergy.MaxBossRushHP : DarkEnergy.MaxHP; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; darkEnergyMaxHP += (int)(darkEnergyMaxHP * HPBoost); int totalDarkEnergiesSpawned = darkEnergyAmt * 3 + 2; int totalDarkEnergyMaxHP = darkEnergyMaxHP * totalDarkEnergiesSpawned; diff --git a/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs index aab7218ebb..8f9527ab27 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs @@ -68,7 +68,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs float greenLight = (phase3AI ? 1.2f : phase2AI ? 0.8f : 0.4f) * alphaScale; Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), redLight, greenLight, 0f); - if (CalamityConfig.Instance.BossesStopWeather) + if (CalamityServerConfig.Instance.BossesStopWeather) CalamityMod.StopRain(); else if (!Main.raining && !BossRushEvent.BossRushActive) CalamityUtils.StartRain(); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index b9d9b5f707..30e7d1425e 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2233,7 +2233,7 @@ namespace CalamityMod.NPCs if ((npc.boss && npc.type != NPCID.MartianSaucerCore) || CalamityLists.bossHPScaleList.Contains(npc.type)) { - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)Math.Round(npc.lifeMax * HPBoost); } } @@ -2437,7 +2437,7 @@ namespace CalamityMod.NPCs } // Reduce mech boss HP and damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { if (!NPC.downedMechBossAny) { @@ -3096,7 +3096,7 @@ namespace CalamityMod.NPCs Texture2D npcTexture = texture ?? TextureAssets.Npc[npc.type].Value; Vector2 screenOffset = npc.IsABestiaryIconDummy ? Vector2.Zero : Main.screenPosition; int afterimageCounter = 1; - while (afterimageCounter < NPCID.Sets.TrailCacheLength[npc.type] && CalamityConfig.Instance.Afterimages) + while (afterimageCounter < NPCID.Sets.TrailCacheLength[npc.type] && CalamityClientConfig.Instance.Afterimages) { Color colorToDraw = Color.Lerp(drawColor, endingColor, afterimageCounter / (float)NPCID.Sets.TrailCacheLength[npc.type]); colorToDraw *= afterimageCounter / (float)NPCID.Sets.TrailCacheLength[npc.type]; @@ -6017,12 +6017,12 @@ namespace CalamityMod.NPCs spawnRate = (int)(spawnRate * 1.4); maxSpawns = (int)(maxSpawns * 0.4f); } - if (player.Calamity().zen || (CalamityConfig.Instance.ForceTownSafety && player.townNPCs > 1f && Main.expertMode)) + if (player.Calamity().zen || (CalamityServerConfig.Instance.ForceTownSafety && player.townNPCs > 1f && Main.expertMode)) { spawnRate = (int)(spawnRate * 2.5); maxSpawns = (int)(maxSpawns * 0.3f); } - if (player.Calamity().isNearbyBoss && CalamityConfig.Instance.BossZen) + if (player.Calamity().isNearbyBoss && CalamityServerConfig.Instance.BossZen) { spawnRate *= 5; maxSpawns = (int)(maxSpawns * 0.001f); @@ -6589,7 +6589,7 @@ namespace CalamityMod.NPCs { if (npc.type != NPCID.BrainofCthulhu && (npc.type != NPCID.DukeFishron || npc.ai[0] <= 9f) && npc.active) { - if (CalamityConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || CalamityLists.needsDebuffIconDisplayList.Contains(npc.type))) + if (CalamityClientConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || CalamityLists.needsDebuffIconDisplayList.Contains(npc.type))) { List currentDebuffs = new List() { }; @@ -7115,7 +7115,7 @@ namespace CalamityMod.NPCs } } - Texture2D glowTexture = CalamityConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[0].Value : TextureAssets.Dest[0].Value; + Texture2D glowTexture = CalamityClientConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[0].Value : TextureAssets.Dest[0].Value; switch (npc.type) { default: @@ -7123,11 +7123,11 @@ namespace CalamityMod.NPCs break; case NPCID.TheDestroyerBody: - glowTexture = CalamityConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[1].Value : TextureAssets.Dest[1].Value; + glowTexture = CalamityClientConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[1].Value : TextureAssets.Dest[1].Value; break; case NPCID.TheDestroyerTail: - glowTexture = CalamityConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[2].Value : TextureAssets.Dest[2].Value; + glowTexture = CalamityClientConfig.Instance.NewVanillaTextures ? CalamityMod.DestroyerGlowmasks[2].Value : TextureAssets.Dest[2].Value; break; } @@ -7429,7 +7429,7 @@ namespace CalamityMod.NPCs float eyeTelegraphGateValue = WallOfFleshAI.LaserShootGateValue - WallOfFleshAI.LaserShootTelegraphTime; if (npc.localAI[1] > eyeTelegraphGateValue || npc.localAI[2] > 0f || enraged) { - Texture2D glowTexture = CalamityConfig.Instance.NewVanillaTextures ? CalamityMod.WallOfFleshEyeGlowmask.Value : TextureAssets.Npc[npc.type].Value; + Texture2D glowTexture = CalamityClientConfig.Instance.NewVanillaTextures ? CalamityMod.WallOfFleshEyeGlowmask.Value : TextureAssets.Npc[npc.type].Value; Vector2 halfSize = npc.frame.Size() / 2; SpriteEffects spriteEffects = SpriteEffects.None; if (npc.spriteDirection == 1) @@ -7581,7 +7581,7 @@ namespace CalamityMod.NPCs float telegraphScalar = MathHelper.Clamp((Math.Abs(PlanteraAI.StopChargeGateValue) - telegraphTimer) / Math.Abs(PlanteraAI.StopChargeGateValue), 0f, 1f); Color telegraphColor = Color.Lerp(originalColor, newColor, telegraphScalar); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { int afterimageAmount = 10; int afterImageIncrement = 2; diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 34e5d7488f..846f59a6e0 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1856,7 +1856,7 @@ DukeEditFailed: if (!Main.hardMode) { // Increase altar count to allow natural mech boss spawning. - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework) WorldGen.altarCount++; string key2 = "Mods.CalamityMod.Status.Progression.UglyBossText"; @@ -1880,7 +1880,7 @@ DukeEditFailed: SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType(), ModContent.NPCType() }, NPC.downedMechBoss1 || !NPC.downedMechBoss2 || !NPC.downedMechBoss3); SetNewBossJustDowned(npc); - if (!NPC.downedMechBoss1 && CalamityConfig.Instance.EarlyHardmodeProgressionRework) + if (!NPC.downedMechBoss1 && CalamityServerConfig.Instance.EarlyHardmodeProgressionRework) SpawnMechBossHardmodeOres(); break; @@ -1892,7 +1892,7 @@ DukeEditFailed: SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType(), ModContent.NPCType() }, !NPC.downedMechBoss1 || NPC.downedMechBoss2 || !NPC.downedMechBoss3); SetNewBossJustDowned(npc); - if (!NPC.downedMechBoss2 && CalamityConfig.Instance.EarlyHardmodeProgressionRework) + if (!NPC.downedMechBoss2 && CalamityServerConfig.Instance.EarlyHardmodeProgressionRework) SpawnMechBossHardmodeOres(); } break; @@ -1902,7 +1902,7 @@ DukeEditFailed: SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType(), ModContent.NPCType() }, !NPC.downedMechBoss1 || !NPC.downedMechBoss2 || NPC.downedMechBoss3); SetNewBossJustDowned(npc); - if (!NPC.downedMechBoss3 && CalamityConfig.Instance.EarlyHardmodeProgressionRework) + if (!NPC.downedMechBoss3 && CalamityServerConfig.Instance.EarlyHardmodeProgressionRework) SpawnMechBossHardmodeOres(); break; diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 8ed43caf88..653160791d 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -764,7 +764,7 @@ namespace CalamityMod.NPCs public void TownNPCAlertSystem(NPC npc, Mod mod, SpriteBatch spriteBatch) { - if (CalamityConfig.Instance.ShopNewAlert && npc.townNPC) + if (CalamityClientConfig.Instance.ShopNewAlert && npc.townNPC) { for (int i = 0; i < npcAlertList.Count; i++) { diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index b7e2cb704c..332f6b68c3 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -67,7 +67,7 @@ namespace CalamityMod.NPCs.CeaselessVoid global.DR = 0.5f; NPC.LifeMaxNERB(65000, 78000, 72000); NPC.value = Item.buyPrice(2, 0, 0, 0); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -162,7 +162,7 @@ namespace CalamityMod.NPCs.CeaselessVoid Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); int afterimageAmt = 7; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -185,7 +185,7 @@ namespace CalamityMod.NPCs.CeaselessVoid texture2D15 = GlowTexture.Value; Color cyanLerp = Color.Lerp(Color.White, Color.Cyan, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index c5fee54bad..cc92e31280 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -51,7 +51,7 @@ namespace CalamityMod.NPCs.CeaselessVoid NPC.width = NPC.height = HitboxSize; NPC.defense = 50; NPC.lifeMax = BossRushEvent.BossRushActive ? MaxBossRushHP : MaxHP; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.Opacity = 0f; @@ -230,7 +230,7 @@ namespace CalamityMod.NPCs.CeaselessVoid drawPos -= new Vector2(mainTexture.Width, mainTexture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; drawPos += drawOrigin * NPC.scale + new Vector2(0f, NPC.gfxOffY); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < trailCount; i += 2) { @@ -253,7 +253,7 @@ namespace CalamityMod.NPCs.CeaselessVoid Texture2D glowTexture = GlowTexture.Value; Color glowColor = Color.Lerp(Color.White, Color.Fuchsia, 0.5f) * NPC.Opacity; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < trailCount; i++) { diff --git a/NPCs/Crabulon/CrabShroom.cs b/NPCs/Crabulon/CrabShroom.cs index af96c9a5b1..8459e0d094 100644 --- a/NPCs/Crabulon/CrabShroom.cs +++ b/NPCs/Crabulon/CrabShroom.cs @@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.Crabulon if (Main.getGoodWorld) NPC.lifeMax *= 2; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); AIType = -1; NPC.knockBackResist = 0.5f; diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index 31653519f3..f2c049aecd 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.Crabulon NPC.height = 196; NPC.defense = 8; NPC.LifeMaxNERB(3700, 4400, 680000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/Crags/SoulSlurper.cs b/NPCs/Crags/SoulSlurper.cs index 5ea4ea2956..8f6cd9ff70 100644 --- a/NPCs/Crags/SoulSlurper.cs +++ b/NPCs/Crags/SoulSlurper.cs @@ -254,7 +254,7 @@ namespace CalamityMod.NPCs.Crags Vector2 halfSizeTexture = new Vector2((float)(texture.Width / 2), (float)(texture.Height / 2)); int afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -277,7 +277,7 @@ namespace CalamityMod.NPCs.Crags texture = GlowTexture.Value; Color redGlow = Color.Lerp(Color.White, Color.Red, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 59847a9191..e13b99edae 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -102,7 +102,7 @@ namespace CalamityMod.NPCs.Cryogen NPC.defense = 15; NPC.DR_NERD(0.3f); NPC.LifeMaxNERB(40000, 48000, 300000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -263,7 +263,7 @@ namespace CalamityMod.NPCs.Cryogen NPC.localAI[1] -= 1f; } - if (CalamityConfig.Instance.BossesStopWeather) + if (CalamityServerConfig.Instance.BossesStopWeather) CalamityMod.StopRain(); else if (!Main.raining && !BossRushEvent.BossRushActive) CalamityUtils.StartRain(); diff --git a/NPCs/Cryogen/CryogenShield.cs b/NPCs/Cryogen/CryogenShield.cs index 11d6978de3..0dfc63cd5f 100644 --- a/NPCs/Cryogen/CryogenShield.cs +++ b/NPCs/Cryogen/CryogenShield.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.Cryogen { NPC.lifeMax = 10000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.Opacity = 0f; NPC.HitSound = Cryogen.HitSound; diff --git a/NPCs/DesertScourge/DesertNuisanceBody.cs b/NPCs/DesertScourge/DesertNuisanceBody.cs index 6478a73a20..8fe58967a7 100644 --- a/NPCs/DesertScourge/DesertNuisanceBody.cs +++ b/NPCs/DesertScourge/DesertNuisanceBody.cs @@ -51,7 +51,7 @@ namespace CalamityMod.NPCs.DesertScourge if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) NPC.lifeMax = 4800; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs b/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs index 063bb029b5..b3906e4e5b 100644 --- a/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs @@ -51,7 +51,7 @@ namespace CalamityMod.NPCs.DesertScourge if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) NPC.lifeMax = 4000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DesertScourge/DesertNuisanceHead.cs b/NPCs/DesertScourge/DesertNuisanceHead.cs index 329c8abea3..0a7bbce816 100644 --- a/NPCs/DesertScourge/DesertNuisanceHead.cs +++ b/NPCs/DesertScourge/DesertNuisanceHead.cs @@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.DesertScourge if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) NPC.lifeMax = 4800; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs b/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs index e8ae27982d..e00b996186 100644 --- a/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.DesertScourge if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) NPC.lifeMax = 4000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DesertScourge/DesertNuisanceTail.cs b/NPCs/DesertScourge/DesertNuisanceTail.cs index 4b720426b8..86cd975e34 100644 --- a/NPCs/DesertScourge/DesertNuisanceTail.cs +++ b/NPCs/DesertScourge/DesertNuisanceTail.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.DesertScourge if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) NPC.lifeMax = 4800; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DesertScourge/DesertNuisanceTailYoung.cs b/NPCs/DesertScourge/DesertNuisanceTailYoung.cs index ecb1eb5c0b..c0d9871de4 100644 --- a/NPCs/DesertScourge/DesertNuisanceTailYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceTailYoung.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.DesertScourge if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) NPC.lifeMax = 4000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DesertScourge/DesertScourgeBody.cs b/NPCs/DesertScourge/DesertScourgeBody.cs index 2baae9ff4d..1ca33e7a01 100644 --- a/NPCs/DesertScourge/DesertScourgeBody.cs +++ b/NPCs/DesertScourge/DesertScourgeBody.cs @@ -52,7 +52,7 @@ namespace CalamityMod.NPCs.DesertScourge if (Main.getGoodWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index 32ed748f47..a40033c075 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -94,7 +94,7 @@ namespace CalamityMod.NPCs.DesertScourge if (Main.getGoodWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DesertScourge/DesertScourgeTail.cs b/NPCs/DesertScourge/DesertScourgeTail.cs index c0cd5a1bdb..6b423a5b55 100644 --- a/NPCs/DesertScourge/DesertScourgeTail.cs +++ b/NPCs/DesertScourge/DesertScourgeTail.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.DesertScourge if (Main.getGoodWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DevourerofGods/CosmicGuardianBody.cs b/NPCs/DevourerofGods/CosmicGuardianBody.cs index a5fb60beb8..488989d80a 100644 --- a/NPCs/DevourerofGods/CosmicGuardianBody.cs +++ b/NPCs/DevourerofGods/CosmicGuardianBody.cs @@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.DevourerofGods global.DR = 0.5f; global.unbreakableDR = true; NPC.lifeMax = 50000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DevourerofGods/CosmicGuardianHead.cs b/NPCs/DevourerofGods/CosmicGuardianHead.cs index a4e0e2439e..fc0c4c18e2 100644 --- a/NPCs/DevourerofGods/CosmicGuardianHead.cs +++ b/NPCs/DevourerofGods/CosmicGuardianHead.cs @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.height = 76; NPC.defense = 40; NPC.lifeMax = 50000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DevourerofGods/CosmicGuardianTail.cs b/NPCs/DevourerofGods/CosmicGuardianTail.cs index 125e7eef07..ea936b503e 100644 --- a/NPCs/DevourerofGods/CosmicGuardianTail.cs +++ b/NPCs/DevourerofGods/CosmicGuardianTail.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.height = 50; NPC.defense = 70; NPC.lifeMax = 50000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index c8314094d3..5936efcfac 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -77,7 +77,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.chaseable = false; } NPC.LifeMaxNERB(887500, 1065000, 1500000); // Phase 1 is 355000, Phase 2 is 532500 - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index c54d87f1e5..19d86670bb 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -203,7 +203,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.height = 104; NPC.defense = 50; NPC.LifeMaxNERB(887500, 1065000, 1500000); // Phase 1 is 355000, Phase 2 is 532500 - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.takenDamageMultiplier = 1.1f; NPC.aiStyle = -1; @@ -353,7 +353,7 @@ namespace CalamityMod.NPCs.DevourerofGods CalamityGlobalNPC.DoGP2 = -1; // Stop rain - if (CalamityConfig.Instance.BossesStopWeather) + if (CalamityServerConfig.Instance.BossesStopWeather) CalamityMod.StopRain(); // Get a target (time is checked in the second check to ensure a new target isn't being set constantly) diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index b521baedb1..e2121c685c 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.height = 66; NPC.defense = 50; NPC.LifeMaxNERB(887500, 1065000, 1500000); // Phase 1 is 355000, Phase 2 is 532500 - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index 37f8031eee..921ccf2b1e 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -154,7 +154,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo NPC.defense = 100; NPC.DR_NERD(0.25f); NPC.LifeMaxNERB(1250000, 1495000, 650000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -1528,7 +1528,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo // This is created to allow easy duplication of them when drawing the charge. void drawInstance(Vector2 drawOffset, Color baseColor) { - if (CalamityConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy) + if (CalamityClientConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy) { for (int i = 1; i < numAfterimages; i += 2) { @@ -1599,7 +1599,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo } texture = GlowTexture.Value; - if (CalamityConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy) + if (CalamityClientConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy) { for (int i = 1; i < numAfterimages; i += 2) { diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index 60852ad353..85b2f69e03 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -225,7 +225,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.defense = 100; NPC.DR_NERD(0.35f); NPC.LifeMaxNERB(1250000, 1495000, 650000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -1241,7 +1241,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2); int numAfterimages = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < numAfterimages; i += 2) { @@ -1261,7 +1261,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares texture = GlowTexture.Value; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < numAfterimages; i += 2) { diff --git a/NPCs/ExoMechs/Ares/AresGaussNuke.cs b/NPCs/ExoMechs/Ares/AresGaussNuke.cs index dec6dd8459..859810bba4 100644 --- a/NPCs/ExoMechs/Ares/AresGaussNuke.cs +++ b/NPCs/ExoMechs/Ares/AresGaussNuke.cs @@ -93,7 +93,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.defense = 100; NPC.DR_NERD(0.35f); NPC.LifeMaxNERB(1250000, 1495000, 650000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -551,7 +551,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White; int numAfterimages = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < numAfterimages; i += 2) { @@ -592,7 +592,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Texture2D glowTexture = GlowTexture.Value; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < numAfterimages; i += 2) { diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index cbaacc311a..3e3b5baa47 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -96,7 +96,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.defense = 100; NPC.DR_NERD(0.35f); NPC.LifeMaxNERB(1250000, 1495000, 650000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -599,7 +599,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White; int numAfterimages = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < numAfterimages; i += 2) { @@ -638,7 +638,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Texture2D glowTexture = GlowTexture.Value; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < numAfterimages; i += 2) { diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index 9aef9f09fb..d8b6d55613 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -90,7 +90,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.defense = 100; NPC.DR_NERD(0.35f); NPC.LifeMaxNERB(1250000, 1495000, 650000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -550,7 +550,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White; int numAfterimages = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < numAfterimages; i += 2) { @@ -590,7 +590,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Texture2D glowTexture = GlowTexture.Value; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < numAfterimages; i += 2) { diff --git a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs index 09d77162ed..d9bb7d4994 100644 --- a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs +++ b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs @@ -91,7 +91,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.defense = 100; NPC.DR_NERD(0.35f); NPC.LifeMaxNERB(1250000, 1495000, 650000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -545,7 +545,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White; int numAfterimages = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < numAfterimages; i += 2) { @@ -584,7 +584,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Texture2D glowTexture = GlowTexture.Value; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < numAfterimages; i += 2) { diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index f53b9eead4..5fa230c2a8 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -187,7 +187,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis NPC.defense = 100; NPC.DR_NERD(0.25f); NPC.LifeMaxNERB(1250000, 1495000, 650000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -1423,7 +1423,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // This is created to allow easy duplication of them when drawing the charge. void drawInstance(Vector2 drawOffset, Color baseColor) { - if (CalamityConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy) + if (CalamityClientConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy) { for (int i = 1; i < numAfterimages; i += 2) { @@ -1494,7 +1494,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis } texture = GlowTexture.Value; - if (CalamityConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy) + if (CalamityClientConfig.Instance.Afterimages && !NPC.IsABestiaryIconDummy) { for (int i = 1; i < numAfterimages; i += 2) { diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index 28eb67978c..b9e20ec96c 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos NPC.DR_NERD(0.9999f); NPC.Calamity().unbreakableDR = true; NPC.LifeMaxNERB(960000, 1150000, 600000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index 612ae50f89..3ae03ab9fb 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos NPC.DR_NERD(0.9999f); NPC.Calamity().unbreakableDR = true; NPC.LifeMaxNERB(960000, 1150000, 600000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index 1dcbca3bc4..410decf566 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -174,7 +174,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos NPC.DR_NERD(0.9999f); NPC.Calamity().unbreakableDR = true; NPC.LifeMaxNERB(960000, 1150000, 600000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 1ceb5d01bc..c16d83f33b 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos NPC.DR_NERD(0.9999f); NPC.Calamity().unbreakableDR = true; NPC.LifeMaxNERB(960000, 1150000, 600000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index 3d1673db94..c0d7469cc5 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -609,7 +609,7 @@ namespace CalamityMod.NPCs.GreatSandShark int eightConst = 8; int afterimageInc = 2; int afterimageCounter = 1; - while (((afterimageInc > 0 && afterimageCounter < eightConst) || (afterimageInc < 0 && afterimageCounter > eightConst)) && CalamityConfig.Instance.Afterimages) + while (((afterimageInc > 0 && afterimageCounter < eightConst) || (afterimageInc < 0 && afterimageCounter > eightConst)) && CalamityClientConfig.Instance.Afterimages) { Color alphaAfterimageColor = NPC.GetAlpha(extraAfterimageColor); { diff --git a/NPCs/HiveMind/DankCreeper.cs b/NPCs/HiveMind/DankCreeper.cs index a6e676023c..f8615597f3 100644 --- a/NPCs/HiveMind/DankCreeper.cs +++ b/NPCs/HiveMind/DankCreeper.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.HiveMind if (Main.getGoodWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); if ((CalamityWorld.LegendaryMode && CalamityWorld.revenge)) diff --git a/NPCs/HiveMind/DarkHeart.cs b/NPCs/HiveMind/DarkHeart.cs index 3432898fdc..f5acf1f9bb 100644 --- a/NPCs/HiveMind/DarkHeart.cs +++ b/NPCs/HiveMind/DarkHeart.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.HiveMind if (Main.getGoodWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; diff --git a/NPCs/HiveMind/HiveBlob.cs b/NPCs/HiveMind/HiveBlob.cs index 6e7c638703..69b6b00e6f 100644 --- a/NPCs/HiveMind/HiveBlob.cs +++ b/NPCs/HiveMind/HiveBlob.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.HiveMind if (Main.getGoodWorld) NPC.lifeMax *= 2; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.9f; diff --git a/NPCs/HiveMind/HiveBlob2.cs b/NPCs/HiveMind/HiveBlob2.cs index 9b3e44fd1f..a69f074473 100644 --- a/NPCs/HiveMind/HiveBlob2.cs +++ b/NPCs/HiveMind/HiveBlob2.cs @@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.HiveMind if (Main.getGoodWorld) NPC.lifeMax *= 2; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.9f; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 868e8357c1..859b5daf63 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -121,7 +121,7 @@ namespace CalamityMod.NPCs.HiveMind NPC.height = 122; NPC.defense = 8; NPC.LifeMaxNERB(7700, 9200, 350000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -315,7 +315,7 @@ namespace CalamityMod.NPCs.HiveMind Color afterimageBaseColor = Color.White; int numAfterimages = 5; - if (CalamityConfig.Instance.Afterimages && state != 0) + if (CalamityClientConfig.Instance.Afterimages && state != 0) { for (int i = 1; i < numAfterimages; i += 2) { diff --git a/NPCs/Leviathan/Anahita.cs b/NPCs/Leviathan/Anahita.cs index 270966cff3..f7734fff7d 100644 --- a/NPCs/Leviathan/Anahita.cs +++ b/NPCs/Leviathan/Anahita.cs @@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.defense = 20; NPC.DR_NERD(0.2f); NPC.LifeMaxNERB(35000, 42000, 260000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.aiStyle = -1; diff --git a/NPCs/Leviathan/AnahitasIceShield.cs b/NPCs/Leviathan/AnahitasIceShield.cs index a32c37cb9b..9ada36e218 100644 --- a/NPCs/Leviathan/AnahitasIceShield.cs +++ b/NPCs/Leviathan/AnahitasIceShield.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.defense = 10; NPC.DR_NERD(0.5f); NPC.lifeMax = BossRushEvent.BossRushActive ? 1000 : 650; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.alpha = 255; NPC.HitSound = SoundID.NPCHit5; diff --git a/NPCs/Leviathan/AquaticAberration.cs b/NPCs/Leviathan/AquaticAberration.cs index e98ae031d8..524778f29c 100644 --- a/NPCs/Leviathan/AquaticAberration.cs +++ b/NPCs/Leviathan/AquaticAberration.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.height = 50; NPC.defense = 14; NPC.lifeMax = BossRushEvent.BossRushActive ? 10000 : 600; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.2f; NPC.noGravity = true; diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 4a94c6e0e9..87e60c6fed 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.defense = 40; NPC.DR_NERD(0.35f); NPC.LifeMaxNERB(60000, 72000, 600000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.aiStyle = -1; diff --git a/NPCs/NormalNPCs/BloodlettingServant.cs b/NPCs/NormalNPCs/BloodlettingServant.cs index 879a389f03..b31d1d20a2 100644 --- a/NPCs/NormalNPCs/BloodlettingServant.cs +++ b/NPCs/NormalNPCs/BloodlettingServant.cs @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.defense = 5; NPC.lifeMax = 96; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; @@ -259,7 +259,7 @@ namespace CalamityMod.NPCs.NormalNPCs float telegraphScalar = MathHelper.Clamp((NPC.ai[0] - ChargeTelegraphGateValue) / ChargeTelegraphGateValue, 0f, 1f); Color telegraphColor = Color.Lerp(originalColor, newColor, telegraphScalar); - if (CalamityConfig.Instance.Afterimages && NPC.ai[1] > 0f) + if (CalamityClientConfig.Instance.Afterimages && NPC.ai[1] > 0f) { int afterimageAmount = 10; int afterImageIncrement = 2; diff --git a/NPCs/NormalNPCs/IceClasper.cs b/NPCs/NormalNPCs/IceClasper.cs index fca3afe2b1..0f98304a97 100644 --- a/NPCs/NormalNPCs/IceClasper.cs +++ b/NPCs/NormalNPCs/IceClasper.cs @@ -342,7 +342,7 @@ namespace CalamityMod.NPCs.NormalNPCs (MathHelper.Clamp(AITimer, 0f, TimeBeforeDash) / TimeBeforeDash); float AfterimageFade = MathHelper.Lerp(0f, 1f, interpolant); - if (CurrentState == IceClasperAIState.Dashing && CalamityConfig.Instance.Afterimages) + if (CurrentState == IceClasperAIState.Dashing && CalamityClientConfig.Instance.Afterimages) { for (int i = 0; i < NPC.oldPos.Length; i++) { diff --git a/NPCs/NormalNPCs/KingSlimeJewelEmerald.cs b/NPCs/NormalNPCs/KingSlimeJewelEmerald.cs index 5d5160792f..80fad53f46 100644 --- a/NPCs/NormalNPCs/KingSlimeJewelEmerald.cs +++ b/NPCs/NormalNPCs/KingSlimeJewelEmerald.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.DR_NERD(0.15f); NPC.lifeMax = 240; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.7f; diff --git a/NPCs/NormalNPCs/KingSlimeJewelRuby.cs b/NPCs/NormalNPCs/KingSlimeJewelRuby.cs index 327d1d0054..fe60d9a411 100644 --- a/NPCs/NormalNPCs/KingSlimeJewelRuby.cs +++ b/NPCs/NormalNPCs/KingSlimeJewelRuby.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.DR_NERD(0.1f); NPC.lifeMax = 120; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.8f; diff --git a/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs b/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs index a41db05782..1aa81eac91 100644 --- a/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs +++ b/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.DR_NERD(0.05f); NPC.lifeMax = 120; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.9f; diff --git a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs index f3912e4d09..d86011b3c5 100644 --- a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs +++ b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.defense = 20; NPC.lifeMax = 500; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.4f; diff --git a/NPCs/NormalNPCs/SkeletronPrime2.cs b/NPCs/NormalNPCs/SkeletronPrime2.cs index 5fb331870b..2e7c5a641d 100644 --- a/NPCs/NormalNPCs/SkeletronPrime2.cs +++ b/NPCs/NormalNPCs/SkeletronPrime2.cs @@ -52,7 +52,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.defense = 24; NPC.lifeMax = 28000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; @@ -399,7 +399,7 @@ namespace CalamityMod.NPCs.NormalNPCs int damage = NPC.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -664,7 +664,7 @@ namespace CalamityMod.NPCs.NormalNPCs int damage = NPC.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -732,7 +732,7 @@ namespace CalamityMod.NPCs.NormalNPCs int damage = NPC.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; diff --git a/NPCs/NormalNPCs/WildBumblefuck.cs b/NPCs/NormalNPCs/WildBumblefuck.cs index 8421f495ff..95f5122d35 100644 --- a/NPCs/NormalNPCs/WildBumblefuck.cs +++ b/NPCs/NormalNPCs/WildBumblefuck.cs @@ -129,7 +129,7 @@ namespace CalamityMod.NPCs.NormalNPCs Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); int afterimageAmt = NPC.ai[0] == 2.1f ? 7 : 0; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index fc8ac6e7b3..745133b9e7 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -73,7 +73,7 @@ namespace CalamityMod.NPCs.OldDuke NPC.defense = 90; NPC.DR_NERD(0.5f, null, null, null, true); NPC.LifeMaxNERB(500000, 600000, 400000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.noTileCollide = true; @@ -258,7 +258,7 @@ namespace CalamityMod.NPCs.OldDuke color = drawColor; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += afterimageIncrement) { @@ -309,7 +309,7 @@ namespace CalamityMod.NPCs.OldDuke afterimageScale = 20f; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 0; j < secondAfterimageAmt; j++) { @@ -365,7 +365,7 @@ namespace CalamityMod.NPCs.OldDuke yellowLerpColor *= ai2Opacity; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int k = 1; k < afterimageAmt; k += afterimageIncrement) { diff --git a/NPCs/OldDuke/OldDukeToothBall.cs b/NPCs/OldDuke/OldDukeToothBall.cs index f880849a6e..83b18e5d9b 100644 --- a/NPCs/OldDuke/OldDukeToothBall.cs +++ b/NPCs/OldDuke/OldDukeToothBall.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.OldDuke { NPC.lifeMax = 16000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.2f; NPC.HitSound = SoundID.NPCHit1; diff --git a/NPCs/OldDuke/SulphurousSharkron.cs b/NPCs/OldDuke/SulphurousSharkron.cs index f1480f9f0a..6e8113b600 100644 --- a/NPCs/OldDuke/SulphurousSharkron.cs +++ b/NPCs/OldDuke/SulphurousSharkron.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.OldDuke { NPC.lifeMax = 10000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.HitSound = SoundID.NPCHit1; NPC.DeathSound = SoundID.NPCDeath1; @@ -245,7 +245,7 @@ namespace CalamityMod.NPCs.OldDuke Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); int afterimageAmt = 10; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { diff --git a/NPCs/Perforator/PerforatorBodyLarge.cs b/NPCs/Perforator/PerforatorBodyLarge.cs index c824477afd..6be18b93b6 100644 --- a/NPCs/Perforator/PerforatorBodyLarge.cs +++ b/NPCs/Perforator/PerforatorBodyLarge.cs @@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.Perforator if (Main.zenithWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index 0c274ba469..ddaee3bf97 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.Perforator if (Main.zenithWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/Perforator/PerforatorBodySmall.cs b/NPCs/Perforator/PerforatorBodySmall.cs index a72dcb34be..22649de4aa 100644 --- a/NPCs/Perforator/PerforatorBodySmall.cs +++ b/NPCs/Perforator/PerforatorBodySmall.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.Perforator if (Main.zenithWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index 82a6499720..c29eb9782f 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.Perforator if (Main.zenithWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 9283bbbce1..7b1858cd10 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.Perforator if (Main.zenithWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index acb6d6318a..a0e4994598 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -61,7 +61,7 @@ namespace CalamityMod.NPCs.Perforator if (Main.zenithWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 92c52757ba..fbeaf2b06f 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 100; NPC.defense = 4; NPC.LifeMaxNERB(6000, 7200, 270000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/Perforator/PerforatorTailLarge.cs b/NPCs/Perforator/PerforatorTailLarge.cs index 2bfc0f7eef..656d1ee34e 100644 --- a/NPCs/Perforator/PerforatorTailLarge.cs +++ b/NPCs/Perforator/PerforatorTailLarge.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.Perforator if (Main.zenithWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/Perforator/PerforatorTailMedium.cs b/NPCs/Perforator/PerforatorTailMedium.cs index f5128e40f5..018a21c9d9 100644 --- a/NPCs/Perforator/PerforatorTailMedium.cs +++ b/NPCs/Perforator/PerforatorTailMedium.cs @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.Perforator if (Main.zenithWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/Perforator/PerforatorTailSmall.cs b/NPCs/Perforator/PerforatorTailSmall.cs index 3653234a47..264bb06e18 100644 --- a/NPCs/Perforator/PerforatorTailSmall.cs +++ b/NPCs/Perforator/PerforatorTailSmall.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.Perforator if (Main.zenithWorld) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/PlagueEnemies/PlagueCharger.cs b/NPCs/PlagueEnemies/PlagueCharger.cs index 1f79c757cc..94015d6530 100644 --- a/NPCs/PlagueEnemies/PlagueCharger.cs +++ b/NPCs/PlagueEnemies/PlagueCharger.cs @@ -77,7 +77,7 @@ namespace CalamityMod.NPCs.PlagueEnemies Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); int afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.PlagueEnemies texture2D15 = GlowTexture.Value; Color redEyeColor = Color.Lerp(Color.White, Color.Red, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/PlagueEnemies/PlagueChargerLarge.cs b/NPCs/PlagueEnemies/PlagueChargerLarge.cs index c6b4e66b75..c0aadd70db 100644 --- a/NPCs/PlagueEnemies/PlagueChargerLarge.cs +++ b/NPCs/PlagueEnemies/PlagueChargerLarge.cs @@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.PlagueEnemies Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); int afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -95,7 +95,7 @@ namespace CalamityMod.NPCs.PlagueEnemies texture2D15 = ModContent.Request("CalamityMod/NPCs/PlagueEnemies/PlagueChargerGlow").Value; Color redEyeColor = Color.Lerp(Color.White, Color.Red, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs index d8abae06ac..6cae925162 100644 --- a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs +++ b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs @@ -337,7 +337,7 @@ namespace CalamityMod.NPCs.PlagueEnemies if (NPC.ai[0] != 0f) afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { diff --git a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs index a01811e7b6..8b26d7e1aa 100644 --- a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs +++ b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath NPC.height = 22; NPC.defense = 20; NPC.lifeMax = BossRushEvent.BossRushActive ? 5000 : 500; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -170,7 +170,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); int afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -193,7 +193,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath texture2D15 = GlowTexture.Value; Color redLerpColor = Color.Lerp(Color.White, Color.Red, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/PlaguebringerGoliath/PlagueMine.cs b/NPCs/PlaguebringerGoliath/PlagueMine.cs index efca4ac339..7df52f7db9 100644 --- a/NPCs/PlaguebringerGoliath/PlagueMine.cs +++ b/NPCs/PlaguebringerGoliath/PlagueMine.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath NPC.height = 42; NPC.defense = 20; NPC.lifeMax = BossRushEvent.BossRushActive ? 10000 : 1000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 9d570cee10..c013757851 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -91,7 +91,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath NPC.defense = 50; NPC.DR_NERD(0.3f); NPC.LifeMaxNERB(87500, 105000, 370000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.aiStyle = -1; @@ -1264,7 +1264,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath if (NPC.ai[0] != 0f && NPC.ai[0] != 4f) afterimageAmt = 7; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j += 2) { @@ -1286,7 +1286,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath Color redLerpColor = Color.Lerp(Color.White, Color.Red, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int k = 1; k < afterimageAmt; k++) { diff --git a/NPCs/Polterghast/PhantomFuckYou.cs b/NPCs/Polterghast/PhantomFuckYou.cs index 8856bddc30..e10c08cfad 100644 --- a/NPCs/Polterghast/PhantomFuckYou.cs +++ b/NPCs/Polterghast/PhantomFuckYou.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.Polterghast NPC.noTileCollide = true; NPC.damage = 50; NPC.lifeMax = 20000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.HitSound = SoundID.NPCHit36; NPC.DeathSound = SoundID.NPCDeath39; @@ -153,7 +153,7 @@ namespace CalamityMod.NPCs.Polterghast Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); int afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index 6724039449..386e63a586 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.Polterghast if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) NPC.lifeMax *= 4; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.aiStyle = -1; @@ -454,7 +454,7 @@ namespace CalamityMod.NPCs.Polterghast Color lightRed = new Color(255, 100, 100, 255) * NPC.Opacity; int afterimageAmt = 7; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -489,7 +489,7 @@ namespace CalamityMod.NPCs.Polterghast Color blackWhiteLerp = Color.Lerp(Color.White, c, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 1c8833c123..06987bfa38 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -116,7 +116,7 @@ namespace CalamityMod.NPCs.Polterghast NPC.defense = 90; NPC.DR_NERD(0.2f); NPC.LifeMaxNERB(350000, 420000, 325000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.aiStyle = -1; @@ -306,7 +306,7 @@ namespace CalamityMod.NPCs.Polterghast } // Stop rain - if (CalamityConfig.Instance.BossesStopWeather) + if (CalamityServerConfig.Instance.BossesStopWeather) CalamityMod.StopRain(); // Set time left @@ -1164,7 +1164,7 @@ namespace CalamityMod.NPCs.Polterghast Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); int afterimageAmt = 7; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -1208,7 +1208,7 @@ namespace CalamityMod.NPCs.Polterghast Color veinColor = Color.Lerp(Color.White, (NPC.ai[2] >= changeColorGateValue || NPC.Calamity().newAI[0] > changeColorGateValue) ? Color.Red : Color.Black, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/Polterghast/PolterghastHook.cs b/NPCs/Polterghast/PolterghastHook.cs index 50c6039a49..be8e568245 100644 --- a/NPCs/Polterghast/PolterghastHook.cs +++ b/NPCs/Polterghast/PolterghastHook.cs @@ -375,7 +375,7 @@ namespace CalamityMod.NPCs.Polterghast Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); int afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -401,7 +401,7 @@ namespace CalamityMod.NPCs.Polterghast if (Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] > changeColorGateValue) cyanLerp2 = Color.Lerp(cyanLerp2, lightRed, MathHelper.Clamp((Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] - changeColorGateValue) / timeToReachFullColor, 0f, 1f)); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs b/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs index 1de74e9cf4..8c781cda95 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm NPC.height = 88; NPC.defense = 0; NPC.LifeMaxNERB(2500000, 3000000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs b/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs index aa679618c5..ab0e39e298 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm NPC.height = 88; NPC.defense = 0; NPC.LifeMaxNERB(2500000, 3000000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs index 93ff213d5f..e639fd28ab 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs @@ -112,7 +112,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm NPC.width = 254; NPC.height = 138; NPC.LifeMaxNERB(2500000, 3000000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs b/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs index 8b9b49021b..c9ab0e90ec 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm NPC.height = 120; NPC.defense = 0; NPC.LifeMaxNERB(2500000, 3000000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs index a98ab63273..28605cc0a8 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs @@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians NPC.defense = 40; NPC.DR_NERD(0.3f); NPC.LifeMaxNERB(100000, 120000, 200000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.noGravity = true; @@ -1015,7 +1015,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (NPC.ai[0] == 2f) afterimageAmt = 10; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -1053,7 +1053,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (colorOverride != null) timeBasedColorLerp = colorOverride.Value; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs b/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs index b4033cedc5..465d95f646 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians NPC.defense = 50; NPC.DR_NERD(0.4f); NPC.LifeMaxNERB(40000, 48000, 35000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.noGravity = true; @@ -738,7 +738,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (NPC.ai[0] == 2f) afterimageAmt = 10; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -776,7 +776,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (colorOverride != null) timeBasedGlowColor = colorOverride.Value; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs b/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs index 03ed34ed59..53074dc77b 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs @@ -78,7 +78,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians NPC.defense = 30; NPC.DR_NERD(0.2f); NPC.LifeMaxNERB(60000, 72000, 50000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.noGravity = true; @@ -443,7 +443,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); int afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -485,7 +485,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians overrideColor = colorOverride.Value; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/ProfanedGuardians/ProfanedRocks.cs b/NPCs/ProfanedGuardians/ProfanedRocks.cs index 6e8de8df02..1163bdc1c3 100644 --- a/NPCs/ProfanedGuardians/ProfanedRocks.cs +++ b/NPCs/ProfanedGuardians/ProfanedRocks.cs @@ -50,7 +50,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians NPC.height = 50; NPC.defense = 100; NPC.lifeMax = BossRushEvent.BossRushActive ? MaxBossRushHP : MaxHP; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.Opacity = 0f; diff --git a/NPCs/Providence/ProvSpawnDefense.cs b/NPCs/Providence/ProvSpawnDefense.cs index 0e2e9a8d0d..40a19d10d8 100644 --- a/NPCs/Providence/ProvSpawnDefense.cs +++ b/NPCs/Providence/ProvSpawnDefense.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Providence { NPC.lifeMax = 30000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.noGravity = true; @@ -122,7 +122,7 @@ namespace CalamityMod.NPCs.Providence Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); int afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -145,7 +145,7 @@ namespace CalamityMod.NPCs.Providence texture2D15 = ProfanedGuardianDefender.Texture_Glow.Value; Color yellowLerp = Color.Lerp(Color.White, Color.Yellow, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/Providence/ProvSpawnHealer.cs b/NPCs/Providence/ProvSpawnHealer.cs index 9d1aa49894..3988b3f8ce 100644 --- a/NPCs/Providence/ProvSpawnHealer.cs +++ b/NPCs/Providence/ProvSpawnHealer.cs @@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.Providence { NPC.lifeMax = 20000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.noGravity = true; @@ -122,7 +122,7 @@ namespace CalamityMod.NPCs.Providence Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); int afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -146,7 +146,7 @@ namespace CalamityMod.NPCs.Providence Color yellowLerp = Color.Lerp(Color.White, Color.Yellow, 0.5f); Color violetLerp = Color.Lerp(Color.White, Color.Violet, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/Providence/ProvSpawnOffense.cs b/NPCs/Providence/ProvSpawnOffense.cs index faa67a7dfa..0ecc8a9d0b 100644 --- a/NPCs/Providence/ProvSpawnOffense.cs +++ b/NPCs/Providence/ProvSpawnOffense.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Providence { NPC.lifeMax = 40000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.noGravity = true; @@ -124,7 +124,7 @@ namespace CalamityMod.NPCs.Providence if (NPC.ai[0] == 2f) afterimageAmt = 10; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -147,7 +147,7 @@ namespace CalamityMod.NPCs.Providence texture2D15 = ProfanedGuardianCommander.Texture_Glow.Value; Color yellowLerpColor = Color.Lerp(Color.White, Color.Yellow, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index aeb2b7d136..470f8361fa 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -229,7 +229,7 @@ namespace CalamityMod.NPCs.Providence NPC.defense = 50; NPC.DR_NERD(normalDR); NPC.LifeMaxNERB(312500, 375000, 1250000); // Old HP - 440000, 500000 - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.aiStyle = -1; @@ -613,7 +613,7 @@ namespace CalamityMod.NPCs.Providence NPC.chaseable = normalAttackRate; // Prevent lag by stopping rain - if (CalamityConfig.Instance.BossesStopWeather) + if (CalamityServerConfig.Instance.BossesStopWeather) CalamityMod.StopRain(); // Set target biome type @@ -2206,7 +2206,7 @@ namespace CalamityMod.NPCs.Providence float Brightness = 0.5f; // Ranges from 0 (full vibrance) to 1 (pure white) int maxAfterimages = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < maxAfterimages; i += 2) { @@ -2270,7 +2270,7 @@ namespace CalamityMod.NPCs.Providence BaseCrystalColor = colorOverride.Value; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < maxAfterimages; j++) { diff --git a/NPCs/Ravager/FlamePillar.cs b/NPCs/Ravager/FlamePillar.cs index 933d5a4a8e..ca0b5a9738 100644 --- a/NPCs/Ravager/FlamePillar.cs +++ b/NPCs/Ravager/FlamePillar.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.Ravager NPC.DR_NERD(0.2f); NPC.chaseable = false; NPC.lifeMax = DownedBossSystem.downedProvidence ? 14000 : 3500; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.alpha = 255; NPC.aiStyle = -1; diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 09b76c70fb..7c2a14c120 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -90,7 +90,7 @@ namespace CalamityMod.NPCs.Ravager NPC.lifeMax *= 4; NPC.value *= 1.5f; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; AIType = -1; diff --git a/NPCs/Ravager/RavagerClawLeft.cs b/NPCs/Ravager/RavagerClawLeft.cs index 218826ba88..d3d52720cf 100644 --- a/NPCs/Ravager/RavagerClawLeft.cs +++ b/NPCs/Ravager/RavagerClawLeft.cs @@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.Ravager { NPC.lifeMax = 26000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.Calamity().VulnerableToSickness = false; NPC.Calamity().VulnerableToWater = true; diff --git a/NPCs/Ravager/RavagerClawRight.cs b/NPCs/Ravager/RavagerClawRight.cs index 360d61c8a6..20a9ef22a7 100644 --- a/NPCs/Ravager/RavagerClawRight.cs +++ b/NPCs/Ravager/RavagerClawRight.cs @@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.Ravager { NPC.lifeMax = 26000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.Calamity().VulnerableToSickness = false; NPC.Calamity().VulnerableToWater = true; diff --git a/NPCs/Ravager/RavagerHead.cs b/NPCs/Ravager/RavagerHead.cs index b0ff5f487d..27fa02895a 100644 --- a/NPCs/Ravager/RavagerHead.cs +++ b/NPCs/Ravager/RavagerHead.cs @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.Ravager { NPC.lifeMax = 45000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.Calamity().VulnerableToSickness = false; NPC.Calamity().VulnerableToWater = true; diff --git a/NPCs/Ravager/RavagerHead2.cs b/NPCs/Ravager/RavagerHead2.cs index ccaa1b8db8..2e02f21309 100644 --- a/NPCs/Ravager/RavagerHead2.cs +++ b/NPCs/Ravager/RavagerHead2.cs @@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.Ravager { NPC.lifeMax = 22500; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.Calamity().VulnerableToSickness = false; NPC.Calamity().VulnerableToWater = true; diff --git a/NPCs/Ravager/RavagerLegLeft.cs b/NPCs/Ravager/RavagerLegLeft.cs index 9c1c8355b5..fcccbce5fe 100644 --- a/NPCs/Ravager/RavagerLegLeft.cs +++ b/NPCs/Ravager/RavagerLegLeft.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Ravager { NPC.lifeMax = 40000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.Calamity().VulnerableToSickness = false; NPC.Calamity().VulnerableToWater = true; diff --git a/NPCs/Ravager/RavagerLegRight.cs b/NPCs/Ravager/RavagerLegRight.cs index 01ba1268f8..0278f3ad51 100644 --- a/NPCs/Ravager/RavagerLegRight.cs +++ b/NPCs/Ravager/RavagerLegRight.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Ravager { NPC.lifeMax = 40000; } - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.Calamity().VulnerableToSickness = false; NPC.Calamity().VulnerableToWater = true; diff --git a/NPCs/Ravager/RockPillar.cs b/NPCs/Ravager/RockPillar.cs index 7af3541cc5..6d14900915 100644 --- a/NPCs/Ravager/RockPillar.cs +++ b/NPCs/Ravager/RockPillar.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.Ravager NPC.DR_NERD(0.3f); NPC.chaseable = false; NPC.lifeMax = DownedBossSystem.downedProvidence ? 20000 : 5000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.alpha = 255; NPC.aiStyle = -1; diff --git a/NPCs/Signus/CosmicLantern.cs b/NPCs/Signus/CosmicLantern.cs index b3ba7cb89d..c0514c1009 100644 --- a/NPCs/Signus/CosmicLantern.cs +++ b/NPCs/Signus/CosmicLantern.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.Signus NPC.height = 25; NPC.defense = 50; NPC.lifeMax = 25; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.alpha = 255; NPC.knockBackResist = 0.85f; @@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.Signus Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); int afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -156,7 +156,7 @@ namespace CalamityMod.NPCs.Signus texture2D15 = GlowTexture.Value; Color cyanLerp = Color.Lerp(Color.White, Color.Cyan, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/Signus/CosmicMine.cs b/NPCs/Signus/CosmicMine.cs index 7a5e64484a..d4e67c6706 100644 --- a/NPCs/Signus/CosmicMine.cs +++ b/NPCs/Signus/CosmicMine.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.Signus NPC.width = 30; NPC.height = 30; NPC.lifeMax = 4800; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -179,7 +179,7 @@ namespace CalamityMod.NPCs.Signus Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); int afterimageAmt = 5; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index 997ff5f25a..21b1df60af 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -79,7 +79,7 @@ namespace CalamityMod.NPCs.Signus NPC.defense = 60; NPC.LifeMaxNERB(300000, 360000, 320000); NPC.value = Item.buyPrice(2, 0, 0, 0); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.aiStyle = -1; @@ -851,7 +851,7 @@ namespace CalamityMod.NPCs.Signus transparency = (100 - (stealthTimer - 300)) * 0.01f; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -877,7 +877,7 @@ namespace CalamityMod.NPCs.Signus eyeGlowColor = Color.MediumBlue; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/SlimeGod/CorruptSlimeSpawn.cs b/NPCs/SlimeGod/CorruptSlimeSpawn.cs index b3f43e7cbd..8e84e52535 100644 --- a/NPCs/SlimeGod/CorruptSlimeSpawn.cs +++ b/NPCs/SlimeGod/CorruptSlimeSpawn.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.defense = 6; NPC.lifeMax = BossRushEvent.BossRushActive ? 10000 : (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 360 : 180; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.7f; AnimationType = 121; diff --git a/NPCs/SlimeGod/CorruptSlimeSpawn2.cs b/NPCs/SlimeGod/CorruptSlimeSpawn2.cs index 9842a5070c..c13229bb4b 100644 --- a/NPCs/SlimeGod/CorruptSlimeSpawn2.cs +++ b/NPCs/SlimeGod/CorruptSlimeSpawn2.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.defense = 4; NPC.lifeMax = BossRushEvent.BossRushActive ? 5000 : (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 180 : 90; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.9f; AnimationType = NPCID.CorruptSlime; diff --git a/NPCs/SlimeGod/CrimsonSlimeSpawn.cs b/NPCs/SlimeGod/CrimsonSlimeSpawn.cs index 14e3462383..7f2a7b3aa3 100644 --- a/NPCs/SlimeGod/CrimsonSlimeSpawn.cs +++ b/NPCs/SlimeGod/CrimsonSlimeSpawn.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.defense = 4; NPC.lifeMax = BossRushEvent.BossRushActive ? 10000 : (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 220 : 110; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.8f; AnimationType = NPCID.CorruptSlime; diff --git a/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs b/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs index cec25e0cb4..de73692425 100644 --- a/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs +++ b/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.defense = 6; NPC.lifeMax = BossRushEvent.BossRushActive ? 12000 : (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 260 : 130; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0.7f; NPC.Opacity = 0.8f; diff --git a/NPCs/SlimeGod/CrimulanPaladin.cs b/NPCs/SlimeGod/CrimulanPaladin.cs index 8d7147dc4d..52c313c6fb 100644 --- a/NPCs/SlimeGod/CrimulanPaladin.cs +++ b/NPCs/SlimeGod/CrimulanPaladin.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.scale = 1.1f; NPC.defense = 12; NPC.LifeMaxNERB(7500, 9000, 160000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.BossBar = Main.BigBossProgressBar.NeverValid; NPC.knockBackResist = 0f; diff --git a/NPCs/SlimeGod/EbonianPaladin.cs b/NPCs/SlimeGod/EbonianPaladin.cs index fe2ae3f8a7..a3558eacc3 100644 --- a/NPCs/SlimeGod/EbonianPaladin.cs +++ b/NPCs/SlimeGod/EbonianPaladin.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.scale = 1.1f; NPC.defense = 10; NPC.LifeMaxNERB(8000, 9600, 220000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.BossBar = Main.BigBossProgressBar.NeverValid; NPC.aiStyle = -1; diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index d2f4e0bb7c..69d1294010 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -68,7 +68,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.defense = 6; NPC.LifeMaxNERB(420); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPCID.Sets.TrailCacheLength[NPC.type] = 8; NPCID.Sets.TrailingMode[NPC.type] = 1; @@ -595,7 +595,7 @@ namespace CalamityMod.NPCs.SlimeGod spriteBatch.Draw(pog, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY), NPC.frame, drawColorAlpha, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, spriteEffects, 0); } if (!Main.zenithWorld) - while (((twoConst > 0 && coreID < 8) || (twoConst < 0 && coreID > 8)) && CalamityConfig.Instance.Afterimages) + while (((twoConst > 0 && coreID < 8) || (twoConst < 0 && coreID > 8)) && CalamityClientConfig.Instance.Afterimages) { Color colorLightingAlpha = NPC.GetAlpha(colorLightingArea); { diff --git a/NPCs/SlimeGod/SplitCrimulanPaladin.cs b/NPCs/SlimeGod/SplitCrimulanPaladin.cs index a51706798a..360ed7d596 100644 --- a/NPCs/SlimeGod/SplitCrimulanPaladin.cs +++ b/NPCs/SlimeGod/SplitCrimulanPaladin.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.SlimeGod { NPC.Calamity().canBreakPlayerDefense = true; NPC.LifeMaxNERB(1875, 2250, 80000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.BossBar = Main.BigBossProgressBar.NeverValid; NPC.GetNPCDamage(); diff --git a/NPCs/SlimeGod/SplitEbonianPaladin.cs b/NPCs/SlimeGod/SplitEbonianPaladin.cs index fad784a39e..7544e34894 100644 --- a/NPCs/SlimeGod/SplitEbonianPaladin.cs +++ b/NPCs/SlimeGod/SplitEbonianPaladin.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.SlimeGod { NPC.Calamity().canBreakPlayerDefense = true; NPC.LifeMaxNERB(2000, 2400, 110000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.BossBar = Main.BigBossProgressBar.NeverValid; NPC.GetNPCDamage(); diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index f18c6ecfee..eec7a71b80 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -49,7 +49,7 @@ namespace CalamityMod.NPCs.StormWeaver NPC.HitSound = SoundID.NPCHit4; NPC.DeathSound = StormWeaverHead.DeathSound; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 91e0ac47ae..793fe208c8 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -104,7 +104,7 @@ namespace CalamityMod.NPCs.StormWeaver NPC.HitSound = SoundID.NPCHit4; NPC.DeathSound = DeathSound; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -177,7 +177,7 @@ namespace CalamityMod.NPCs.StormWeaver bool revenge = CalamityWorld.revenge || bossRush; bool expertMode = Main.expertMode || bossRush; - if (CalamityConfig.Instance.BossesStopWeather) + if (CalamityServerConfig.Instance.BossesStopWeather) CalamityMod.StopRain(); else if (!Main.raining && !bossRush) CalamityUtils.StartRain(); diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index 9ae676af2b..2dc41d2b10 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.StormWeaver NPC.HitSound = SoundID.NPCHit53; NPC.DeathSound = StormWeaverHead.DeathSound; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/SupremeCalamitas/BrimstoneHeart.cs b/NPCs/SupremeCalamitas/BrimstoneHeart.cs index 46a94b1db7..d006590936 100644 --- a/NPCs/SupremeCalamitas/BrimstoneHeart.cs +++ b/NPCs/SupremeCalamitas/BrimstoneHeart.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.height = 24; NPC.defense = 0; NPC.lifeMax = 15000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/SupremeCalamitas/SepulcherArm.cs b/NPCs/SupremeCalamitas/SepulcherArm.cs index 0897d65b50..985779582c 100644 --- a/NPCs/SupremeCalamitas/SepulcherArm.cs +++ b/NPCs/SupremeCalamitas/SepulcherArm.cs @@ -86,7 +86,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas global.DR = 0.999999f; global.unbreakableDR = true; NPC.lifeMax = CalamityWorld.revenge ? 345000 : 300000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = AIType = -1; NPC.knockBackResist = 0f; diff --git a/NPCs/SupremeCalamitas/SepulcherBody.cs b/NPCs/SupremeCalamitas/SepulcherBody.cs index 4d092f6da2..1eed1f576a 100644 --- a/NPCs/SupremeCalamitas/SepulcherBody.cs +++ b/NPCs/SupremeCalamitas/SepulcherBody.cs @@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas global.DR = 0.999999f; global.unbreakableDR = true; NPC.lifeMax = CalamityWorld.revenge ? 345000 : 300000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/SupremeCalamitas/SepulcherBodyEnergyBall.cs b/NPCs/SupremeCalamitas/SepulcherBodyEnergyBall.cs index be44276128..45b35fad54 100644 --- a/NPCs/SupremeCalamitas/SepulcherBodyEnergyBall.cs +++ b/NPCs/SupremeCalamitas/SepulcherBodyEnergyBall.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.width = 20; NPC.height = 20; NPC.lifeMax = CalamityWorld.revenge ? 345000 : 300000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/SupremeCalamitas/SepulcherHead.cs b/NPCs/SupremeCalamitas/SepulcherHead.cs index 05100dabd8..c625e361b4 100644 --- a/NPCs/SupremeCalamitas/SepulcherHead.cs +++ b/NPCs/SupremeCalamitas/SepulcherHead.cs @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas global.DR = 0.999999f; global.unbreakableDR = true; NPC.lifeMax = CalamityWorld.revenge ? 345000 : 300000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/SupremeCalamitas/SepulcherTail.cs b/NPCs/SupremeCalamitas/SepulcherTail.cs index 6798e03161..b5eb8a7c5b 100644 --- a/NPCs/SupremeCalamitas/SepulcherTail.cs +++ b/NPCs/SupremeCalamitas/SepulcherTail.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas global.DR = 0.999999f; global.unbreakableDR = true; NPC.lifeMax = CalamityWorld.revenge ? 345000 : 300000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index 299f2d5144..ed7d0b4a51 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.defense = 60; NPC.DR_NERD(NormalDR); NPC.lifeMax = 28000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.DeathSound = SoundID.DD2_SkeletonDeath; NPC.Calamity().VulnerableToHeat = false; @@ -269,7 +269,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); int afterimageAmt = 2; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += 2) { @@ -292,7 +292,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas texture2D15 = GlowTexture.Value; Color redLerp = Color.Lerp(Color.White, Color.Red, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int j = 1; j < afterimageAmt; j++) { diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 28b63083da..e43a79e26b 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -264,7 +264,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.DR_NERD(normalDR); NPC.value = Item.buyPrice(30, 0, 0, 0); NPC.LifeMaxNERB(960000, 1150000, 900000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -441,7 +441,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas CalamityNetcode.SyncWorld(); } - if (CalamityConfig.Instance.BossesStopWeather) + if (CalamityServerConfig.Instance.BossesStopWeather) CalamityMod.StopRain(); bool bossRush = BossRushEvent.BossRushActive; @@ -3590,7 +3590,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Vector2 halfSizeTexture = new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[NPC.type] / 2f); int afterimageAmt = 7; - if (CalamityConfig.Instance.Afterimages && !(permafrost && NPC.ai[1] == 2f)) + if (CalamityClientConfig.Instance.Afterimages && !(permafrost && NPC.ai[1] == 2f)) { for (int i = 1; i < afterimageAmt; i += 2) { diff --git a/NPCs/SupremeCalamitas/SupremeCataclysm.cs b/NPCs/SupremeCalamitas/SupremeCataclysm.cs index 005abccc7d..9fc1836e0d 100644 --- a/NPCs/SupremeCalamitas/SupremeCataclysm.cs +++ b/NPCs/SupremeCalamitas/SupremeCataclysm.cs @@ -84,7 +84,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.defense = 80; NPC.DR_NERD(NormalBrothersDR); NPC.lifeMax = 138000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -476,7 +476,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Vector2 origin = NPC.frame.Size() * 0.5f; int afterimageCount = 4; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageCount; i += 2) { @@ -493,7 +493,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Color primarycolor = Main.zenithWorld ? Color.Blue : Color.Red; // why? because blue fire is awesome!! Color baseGlowmaskColor = NPC.IsABestiaryIconDummy ? Color.White : Color.Lerp(Color.White, primarycolor, 0.5f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageCount; i++) { diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index c8b5db4dd0..c19560cdd2 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -76,7 +76,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.defense = 80; NPC.DR_NERD(SupremeCataclysm.NormalBrothersDR); NPC.lifeMax = 138000; - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; AIType = -1; @@ -512,7 +512,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Vector2 origin = NPC.frame.Size() * 0.5f; int afterimageCount = 4; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageCount; i += 2) { @@ -528,7 +528,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas texture = GlowTexture.Value; Color baseGlowmaskColor = Color.Lerp(Color.White, Color.Cyan, 0.35f); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageCount; i++) { diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index 1308fee41f..62e5159255 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -406,7 +406,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -598,7 +598,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(projectileType); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -1301,7 +1301,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; double secondMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; @@ -1914,7 +1914,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -2173,7 +2173,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; double secondMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs index fc15e166b0..7a7965cf58 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs @@ -396,7 +396,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -659,7 +659,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -741,7 +741,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -949,7 +949,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -1017,7 +1017,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -1252,7 +1252,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -1299,7 +1299,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -2497,7 +2497,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; double secondMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; @@ -2597,7 +2597,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; double secondMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs index 1647c03d42..6d2a37107f 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs @@ -307,7 +307,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -439,7 +439,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -627,7 +627,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -731,7 +731,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = (int)Math.Round(npc.GetProjectileDamage(type) * 0.75); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -847,7 +847,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -1278,7 +1278,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -1422,7 +1422,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -1605,7 +1605,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -1813,7 +1813,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -1964,7 +1964,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; @@ -2210,7 +2210,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; double secondMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; @@ -2344,7 +2344,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; double secondMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; @@ -2520,7 +2520,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; double secondMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; @@ -2611,7 +2611,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = (int)Math.Round(npc.GetProjectileDamage(type) * 0.75); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; double secondMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; @@ -2851,7 +2851,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; double secondMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; @@ -2984,7 +2984,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; double secondMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; @@ -3142,7 +3142,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) { double firstMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; double secondMechMultiplier = Main.expertMode ? CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index f1ca77510d..ec76d46cb0 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -108,7 +108,7 @@ namespace CalamityMod.NPCs.Yharon NPC.height = 200; NPC.defense = 90; NPC.LifeMaxNERB(1300000, 1560000, 740000); - double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; NPC.aiStyle = -1; @@ -196,7 +196,7 @@ namespace CalamityMod.NPCs.Yharon float lifeRatio = NPC.life / (float)NPC.lifeMax; // Stop rain - if (CalamityConfig.Instance.BossesStopWeather) + if (CalamityServerConfig.Instance.BossesStopWeather) CalamityMod.StopRain(); // Variables @@ -2767,7 +2767,7 @@ namespace CalamityMod.NPCs.Yharon else color = drawColor; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 1; i < afterimageAmt; i += afterimageIncrement) { @@ -2816,7 +2816,7 @@ namespace CalamityMod.NPCs.Yharon afterimageScale = 20f; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int k = 0; k < additionalAfterimageAmt; k++) { @@ -2893,7 +2893,7 @@ namespace CalamityMod.NPCs.Yharon blueGlowColor *= teleportGlowColorScaler; } - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int l = 1; l < afterimageAmt; l += afterimageIncrement) { diff --git a/Particles/GeneralParticleHandler.cs b/Particles/GeneralParticleHandler.cs index acc8ebd586..a2d1f017e5 100644 --- a/Particles/GeneralParticleHandler.cs +++ b/Particles/GeneralParticleHandler.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Particles if (Main.gamePaused || Main.dedServ || particles == null) return; - if (particles.Count >= CalamityConfig.Instance.ParticleLimit && !particle.Important) + if (particles.Count >= CalamityClientConfig.Instance.ParticleLimit && !particle.Important) return; particles.Add(particle); @@ -224,7 +224,7 @@ namespace CalamityMod.Particles if (Main.dedServ || particles == null) return 0; - return CalamityConfig.Instance.ParticleLimit - particles.Count(); + return CalamityClientConfig.Instance.ParticleLimit - particles.Count(); } /// diff --git a/Projectiles/Boss/HolySpear.cs b/Projectiles/Boss/HolySpear.cs index 697dfa6c2a..d1b46f0654 100644 --- a/Projectiles/Boss/HolySpear.cs +++ b/Projectiles/Boss/HolySpear.cs @@ -204,7 +204,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 0; i < Projectile.oldPos.Length; i++) { diff --git a/Projectiles/Boss/YharonFireball.cs b/Projectiles/Boss/YharonFireball.cs index aa5a68dc69..553a32d527 100644 --- a/Projectiles/Boss/YharonFireball.cs +++ b/Projectiles/Boss/YharonFireball.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Boss int frameHeight = texture.Height / Main.projFrames[Projectile.type]; int frameY = frameHeight * Projectile.frame; Rectangle rectangle = new Rectangle(0, frameY, texture.Width, frameHeight); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 0; i < Projectile.oldPos.Length; i++) { diff --git a/Projectiles/Enemy/IceClasperEnemyProjectile.cs b/Projectiles/Enemy/IceClasperEnemyProjectile.cs index f9c5b9df8e..05065edba3 100644 --- a/Projectiles/Enemy/IceClasperEnemyProjectile.cs +++ b/Projectiles/Enemy/IceClasperEnemyProjectile.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); return true; diff --git a/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs b/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs index 9e78cc627b..69c3d25b70 100644 --- a/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs +++ b/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs @@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(Owner.direction < 0 ? sword.Width : 0f, sword.Height); Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - if (CalamityConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) + if (CalamityClientConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) { for (int i = 0; i < Projectile.oldRot.Length; ++i) { diff --git a/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs b/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs index 5b3bb7fb7e..7ef7023edc 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs @@ -489,7 +489,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(flipped ? sword.Width : 0f, sword.Height); Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - if (CalamityConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type] && Combo == 0f) + if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type] && Combo == 0f) { for (int i = 1; i < Projectile.oldRot.Length; ++i) { @@ -544,7 +544,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 backScissorDrawPosition = Owner.Center + drawAngle.ToRotationVector2() * 10f + (drawAngle.ToRotationVector2() * 56f + (drawAngle - MathHelper.PiOver2).ToRotationVector2() * 11 * Owner.direction) * Projectile.scale - Main.screenPosition; //Lined up with the hole in the front blade - if (CalamityConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) + if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) { Texture2D afterimage = Request("CalamityMod/Projectiles/Melee/SunderingScissorsGlow").Value; diff --git a/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs b/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs index 6ad36b293e..7afe20cae8 100644 --- a/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs +++ b/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs @@ -308,7 +308,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(Combo == 1 ? sword.Width / 2f : flipped ? sword.Width : 0f, sword.Height); Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - if (CalamityConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) + if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) { for (int i = 0; i < Projectile.oldRot.Length; ++i) { @@ -362,7 +362,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 backScissorDrawPosition = Owner.Center + drawAngle.ToRotationVector2() * 10f + functionalDrawAngle.ToRotationVector2() * 70f * Projectile.scale - Main.screenPosition; //Lined up with the hole in the front blade float backScissorRotation = drawRotation + (Combo == 1 ? (!flipped ? MathHelper.PiOver4 * 0.75f : MathHelper.PiOver4 * -0.75f) : 0f); - if (CalamityConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) + if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) { for (int i = 0; i < Projectile.oldRot.Length; ++i) { diff --git a/Projectiles/Melee/Galaxia_PhoenixsPride.cs b/Projectiles/Melee/Galaxia_PhoenixsPride.cs index dea78a8c39..3bb96e5877 100644 --- a/Projectiles/Melee/Galaxia_PhoenixsPride.cs +++ b/Projectiles/Melee/Galaxia_PhoenixsPride.cs @@ -286,7 +286,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOffset = Projectile.Center - Main.screenPosition; //Afterimages - if (CalamityConfig.Instance.Afterimages && CurrentState == 0f && Empowerment / maxEmpowerment > 0.4f) + if (CalamityClientConfig.Instance.Afterimages && CurrentState == 0f && Empowerment / maxEmpowerment > 0.4f) { for (int i = 0; i < Projectile.oldRot.Length; ++i) { diff --git a/Projectiles/Melee/GayBeam.cs b/Projectiles/Melee/GayBeam.cs index 8da45460d2..f8bc673a97 100644 --- a/Projectiles/Melee/GayBeam.cs +++ b/Projectiles/Melee/GayBeam.cs @@ -340,7 +340,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 origin = rectangle.Size() / 2f; Color alphaColor = Projectile.GetAlpha(lightColor); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { Vector2 centerOffset = Projectile.Size / 2f; int totalAfterimages = TotalAfterimages; diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs index 10dbf2ddde..719e2b7024 100644 --- a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs +++ b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs @@ -215,7 +215,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOffset = Projectile.Center - Main.screenPosition; //Afterimages - if (CalamityConfig.Instance.Afterimages && CurrentState == 0f && Empowerment / maxEmpowerment > 0.4f) + if (CalamityClientConfig.Instance.Afterimages && CurrentState == 0f && Empowerment / maxEmpowerment > 0.4f) { for (int i = 0; i < Projectile.oldRot.Length; ++i) { diff --git a/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs b/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs index e3b784cf55..dbf5921c89 100644 --- a/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs +++ b/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs @@ -133,7 +133,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(Owner.direction < 0 ? sword.Width : 0f, sword.Height); Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - if (CalamityConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) + if (CalamityClientConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) { for (int i = 0; i < Projectile.oldRot.Length; ++i) { diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs index 8c8351f8f7..6404dc74ae 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs @@ -310,7 +310,7 @@ namespace CalamityMod.Projectiles.Melee drawOrigin = new Vector2(0f, blade.Height); //Afterimages - if (CalamityConfig.Instance.Afterimages && CurrentState == 0f && Empowerment / maxEmpowerment > 0.4f) + if (CalamityClientConfig.Instance.Afterimages && CurrentState == 0f && Empowerment / maxEmpowerment > 0.4f) { for (int i = 0; i < Projectile.oldRot.Length; ++i) { diff --git a/Projectiles/Ranged/BuzzkillHoldout.cs b/Projectiles/Ranged/BuzzkillHoldout.cs index b0d329f885..1191eda5d5 100644 --- a/Projectiles/Ranged/BuzzkillHoldout.cs +++ b/Projectiles/Ranged/BuzzkillHoldout.cs @@ -242,7 +242,7 @@ namespace CalamityMod.Projectiles.Ranged if (Time / ChargeupTime >= 0.25f) Main.EntitySpriteDraw(smallSlashTexture, GunTipPosition - Main.screenPosition, null, slashColor, Time * MathHelper.ToRadians(42f), smallSlashTexture.Size() * 0.5f, 1f, SpriteEffects.None); - if (!CalamityConfig.Instance.Afterimages) + if (!CalamityClientConfig.Instance.Afterimages) return false; // Special afterimage drawing for the slashes only diff --git a/Projectiles/Ranged/BuzzkillSaw.cs b/Projectiles/Ranged/BuzzkillSaw.cs index 7973eab163..f97bddbd36 100644 --- a/Projectiles/Ranged/BuzzkillSaw.cs +++ b/Projectiles/Ranged/BuzzkillSaw.cs @@ -193,7 +193,7 @@ namespace CalamityMod.Projectiles.Ranged } } - if (!CalamityConfig.Instance.Afterimages) + if (!CalamityClientConfig.Instance.Afterimages) return true; // Special afterimage drawing to include the slashes diff --git a/Projectiles/Ranged/MineralMortarProjectile.cs b/Projectiles/Ranged/MineralMortarProjectile.cs index bbda255676..98a7ae6fec 100644 --- a/Projectiles/Ranged/MineralMortarProjectile.cs +++ b/Projectiles/Ranged/MineralMortarProjectile.cs @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Ranged GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SwordSlashTexture")); PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(TrailWidthFunction, ColorTrailFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 50); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 0; i < 3; i++) { diff --git a/Projectiles/Ranged/SuperradiantSaw.cs b/Projectiles/Ranged/SuperradiantSaw.cs index 7c2e2c695a..ea4d7a7231 100644 --- a/Projectiles/Ranged/SuperradiantSaw.cs +++ b/Projectiles/Ranged/SuperradiantSaw.cs @@ -365,7 +365,7 @@ namespace CalamityMod.Projectiles.Ranged Main.EntitySpriteDraw(outline, Projectile.Center - Main.screenPosition, null, Main.DiscoColor, Projectile.rotation, outline.Size() * 0.5f, 1f, SpriteEffects.None); } - if (!CalamityConfig.Instance.Afterimages) + if (!CalamityClientConfig.Instance.Afterimages) return false; // Special afterimage drawing to include the slashes diff --git a/Projectiles/Ranged/SuperradiantSawLingering.cs b/Projectiles/Ranged/SuperradiantSawLingering.cs index 4e5619a351..62806150af 100644 --- a/Projectiles/Ranged/SuperradiantSawLingering.cs +++ b/Projectiles/Ranged/SuperradiantSawLingering.cs @@ -178,7 +178,7 @@ namespace CalamityMod.Projectiles.Ranged Texture2D outline = SawOutline.Value; Main.EntitySpriteDraw(outline, Projectile.Center - Main.screenPosition, null, Main.DiscoColor, Projectile.rotation, outline.Size() * 0.5f, 1f, SpriteEffects.None); - if (!CalamityConfig.Instance.Afterimages) + if (!CalamityClientConfig.Instance.Afterimages) return false; // Special afterimage drawing to include the slashes diff --git a/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs b/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs index 43c104248c..8e7bd1e6a4 100644 --- a/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs +++ b/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs @@ -334,7 +334,7 @@ namespace CalamityMod.Projectiles.Ranged if (Time / ChargeupTime >= 0.25f) Main.EntitySpriteDraw(smallSlashTexture, GunTipPosition - Main.screenPosition, null, slashColor, Time * MathHelper.ToRadians(42f), smallSlashTexture.Size() * 0.5f, 1f, SpriteEffects.None); - if (!CalamityConfig.Instance.Afterimages) + if (!CalamityClientConfig.Instance.Afterimages) return false; // Special afterimage drawing for the slashes only diff --git a/Projectiles/Rogue/WrathwingFireball.cs b/Projectiles/Rogue/WrathwingFireball.cs index ea87dc0f35..2d3428e84c 100644 --- a/Projectiles/Rogue/WrathwingFireball.cs +++ b/Projectiles/Rogue/WrathwingFireball.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue int frameHeight = texture.Height / Main.projFrames[Projectile.type]; int frameY = frameHeight * Projectile.frame; Rectangle rectangle = new Rectangle(0, frameY, texture.Width, frameHeight); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 0; i < Projectile.oldPos.Length; i++) { diff --git a/Projectiles/Summon/IceClasperMinion.cs b/Projectiles/Summon/IceClasperMinion.cs index 94aca8ef17..89aded9c6b 100644 --- a/Projectiles/Summon/IceClasperMinion.cs +++ b/Projectiles/Summon/IceClasperMinion.cs @@ -199,7 +199,7 @@ namespace CalamityMod.Projectiles.Summon AfterimageInterpolant = MathHelper.Clamp(AfterimageInterpolant, 0f, 1f); float AfterimageFade = MathHelper.Lerp(0f, 1f, AfterimageInterpolant); - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 0; i < Projectile.oldPos.Length; i++) { diff --git a/Projectiles/Summon/MiniGuardianRock.cs b/Projectiles/Summon/MiniGuardianRock.cs index 5f7c775d22..f4030d1c70 100644 --- a/Projectiles/Summon/MiniGuardianRock.cs +++ b/Projectiles/Summon/MiniGuardianRock.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Summon lerpVal = Utils.GetLerpValue(psc ? 87 : 57, psc ? 150 : 120, ownerDist, true); mult = MathHelper.Lerp(0.42f, 1f, lerpVal); } - if (CalamityConfig.Instance.Afterimages && Projectile.ai[0] >= 1f) //handle afterimages manually since the utility broke it and didn't render correctly + if (CalamityClientConfig.Instance.Afterimages && Projectile.ai[0] >= 1f) //handle afterimages manually since the utility broke it and didn't render correctly { for (int i = 0; i < Projectile.oldPos.Length; ++i) { diff --git a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.cs b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.cs index 5e064d63a7..1d1faac2f7 100644 --- a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.cs +++ b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 0; i < Projectile.oldPos.Length; i++) { diff --git a/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.cs b/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.cs index 2ac39278e4..aae3731d65 100644 --- a/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.cs +++ b/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.cs @@ -190,7 +190,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions Vector2 origin = frame.Size() * 0.5f; float rotation = (Target is not null) ? Projectile.rotation : Projectile.rotation + MathHelper.PiOver4; - if (CalamityConfig.Instance.Afterimages && Target is not null) + if (CalamityClientConfig.Instance.Afterimages && Target is not null) { for (int i = 0; i < Projectile.oldPos.Length; i++) { diff --git a/Projectiles/Summon/MirrorofKalandraMinions/Starforge.cs b/Projectiles/Summon/MirrorofKalandraMinions/Starforge.cs index 2ddb451933..c2fdddd74b 100644 --- a/Projectiles/Summon/MirrorofKalandraMinions/Starforge.cs +++ b/Projectiles/Summon/MirrorofKalandraMinions/Starforge.cs @@ -138,7 +138,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions DrawSpin -= MathHelper.ToRadians(MirrorofKalandra.Purple_SpinSpeed); float rotation = (Target is not null) ? DrawSpin : Projectile.rotation + MathHelper.Pi - MathHelper.PiOver4; - if (CalamityConfig.Instance.Afterimages && Target is not null) + if (CalamityClientConfig.Instance.Afterimages && Target is not null) { for (int i = 0; i < Projectile.oldPos.Length; i++) { diff --git a/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.cs b/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.cs index e972745785..006b16a2e1 100644 --- a/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.cs +++ b/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 0; i < Projectile.oldPos.Length; i++) { diff --git a/Projectiles/Summon/MutatedTruffleMinion.cs b/Projectiles/Summon/MutatedTruffleMinion.cs index 20ca2992a1..498383c09d 100644 --- a/Projectiles/Summon/MutatedTruffleMinion.cs +++ b/Projectiles/Summon/MutatedTruffleMinion.cs @@ -267,7 +267,7 @@ namespace CalamityMod.Projectiles.Summon float drawRotation = Projectile.rotation + (Projectile.spriteDirection == -1 && State != AIState.Idle ? MathHelper.Pi : 0f); SpriteEffects effects = (Projectile.spriteDirection == 1) ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - if (CalamityConfig.Instance.Afterimages && (State == AIState.Dashing || State == AIState.Vortex)) + if (CalamityClientConfig.Instance.Afterimages && (State == AIState.Dashing || State == AIState.Vortex)) { for (int i = 0; i < Projectile.oldPos.Length; i++) { diff --git a/Projectiles/Summon/PhantomicDagger.cs b/Projectiles/Summon/PhantomicDagger.cs index 4e0f3cf94e..c7ba78c212 100644 --- a/Projectiles/Summon/PhantomicDagger.cs +++ b/Projectiles/Summon/PhantomicDagger.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); } diff --git a/Projectiles/Summon/PlantationStaffSeed.cs b/Projectiles/Summon/PlantationStaffSeed.cs index 86f09239fc..e891f75ec4 100644 --- a/Projectiles/Summon/PlantationStaffSeed.cs +++ b/Projectiles/Summon/PlantationStaffSeed.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Summon Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 0; i < Projectile.oldPos.Length; i++) { diff --git a/Projectiles/Summon/PlantationStaffSummon.cs b/Projectiles/Summon/PlantationStaffSummon.cs index 8e0f6380f5..7d8bd78097 100644 --- a/Projectiles/Summon/PlantationStaffSummon.cs +++ b/Projectiles/Summon/PlantationStaffSummon.cs @@ -341,7 +341,7 @@ namespace CalamityMod.Projectiles.Summon Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; - if (State == AIState.Ramming && CalamityConfig.Instance.Afterimages) + if (State == AIState.Ramming && CalamityClientConfig.Instance.Afterimages) CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Summon/PlantationStaffTentacle.cs b/Projectiles/Summon/PlantationStaffTentacle.cs index cddecf05e4..306f069baa 100644 --- a/Projectiles/Summon/PlantationStaffTentacle.cs +++ b/Projectiles/Summon/PlantationStaffTentacle.cs @@ -230,7 +230,7 @@ namespace CalamityMod.Projectiles.Summon } } } - else if (CalamityConfig.Instance.Afterimages) + else if (CalamityClientConfig.Instance.Afterimages) CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return true; diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs index e142df4198..03cb9aa2ed 100644 --- a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -1658,7 +1658,7 @@ namespace CalamityMod.Projectiles.Summon drawPos -= new Vector2(texture.Width, texture.Height) * Projectile.scale / 2f; drawPos += drawOrigin * Projectile.scale + new Vector2(0f, Projectile.gfxOffY); Rectangle frame = new Rectangle(0, 0, texture.Width, texture.Height); - if (CalamityConfig.Instance.Afterimages) //handle afterimages manually since the utility broke it and didn't render correctly + if (CalamityClientConfig.Instance.Afterimages) //handle afterimages manually since the utility broke it and didn't render correctly { for (int i = 0; i < Projectile.oldPos.Length; ++i) { diff --git a/Projectiles/Summon/Umbrella/MagicHat.cs b/Projectiles/Summon/Umbrella/MagicHat.cs index 663c9df9e3..3da5df70a1 100644 --- a/Projectiles/Summon/Umbrella/MagicHat.cs +++ b/Projectiles/Summon/Umbrella/MagicHat.cs @@ -128,7 +128,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella // Use a different texture if the player is invisible or has at least 50% stealth Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; float stealthPercent = player.Calamity().rogueStealthMax != 0 ? (player.Calamity().rogueStealth / player.Calamity().rogueStealthMax) : 0f; //0 to 1 - bool hasStealth = player.Calamity().rogueStealth > 0f && stealthPercent > 0.5f && player.townNPCs < 3f && CalamityConfig.Instance.StealthInvisibility; + bool hasStealth = player.Calamity().rogueStealth > 0f && stealthPercent > 0.5f && player.townNPCs < 3f && CalamityClientConfig.Instance.StealthInvisibility; if (player.ShouldNotDraw || hasStealth) texture = ModContent.Request("CalamityMod/Projectiles/Summon/Umbrella/MagicHatInvis").Value; diff --git a/Projectiles/Summon/YharonMinionFireball.cs b/Projectiles/Summon/YharonMinionFireball.cs index a28383d96e..cbd9dff30f 100644 --- a/Projectiles/Summon/YharonMinionFireball.cs +++ b/Projectiles/Summon/YharonMinionFireball.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.spriteDirection == -1) direction = SpriteEffects.FlipHorizontally; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { for (int i = 0; i < Projectile.oldPos.Length; i++) { diff --git a/Systems/MusicEventSystem.cs b/Systems/MusicEventSystem.cs index 803a27df18..2b78e271c0 100644 --- a/Systems/MusicEventSystem.cs +++ b/Systems/MusicEventSystem.cs @@ -52,20 +52,20 @@ namespace CalamityMod.Systems } AddEntry("CloneDefeated", "Interlude1", TimeSpan.FromSeconds(214.577d), - () => DownedBossSystem.downedCalamitasClone, () => CalamityConfig.Instance.Interlude1); + () => DownedBossSystem.downedCalamitasClone, () => CalamityClientConfig.Instance.Interlude1); AddEntry("MLDefeated", "Interlude2", TimeSpan.FromSeconds(191.912d), () => NPC.downedMoonlord, - () => CalamityConfig.Instance.Interlude2, outroSilence: TimeSpan.FromSeconds(1f)); + () => CalamityClientConfig.Instance.Interlude2, outroSilence: TimeSpan.FromSeconds(1f)); // Alternative Interlude 2 -> AddEntry("MLDefeated", "Interlude2_CutIntro", TimeSpan.FromSeconds(160.989d), // () => NPC.downedMoonlord, () => CalamityConfig.Instance.Interlude2, // outroSilence: TimeSpan.FromSeconds(1f)); AddEntry("YharonDefeated", "Interlude3", TimeSpan.FromSeconds(295.932d), - () => DownedBossSystem.downedYharon, () => CalamityConfig.Instance.Interlude3); + () => DownedBossSystem.downedYharon, () => CalamityClientConfig.Instance.Interlude3); AddEntry("DoGDefeated", "DevourerofGodsEulogy", TimeSpan.FromSeconds(203.620d), - () => DownedBossSystem.downedDoG, () => CalamityConfig.Instance.DevourerofGodsEulogy, + () => DownedBossSystem.downedDoG, () => CalamityClientConfig.Instance.DevourerofGodsEulogy, introSilence: TimeSpan.FromSeconds(7.5f)); // Acceptance is NOT toggleable in the config diff --git a/Systems/NerfExpertDebuffsSystem.cs b/Systems/NerfExpertDebuffsSystem.cs index 49a6da275c..67ea9cdaaa 100644 --- a/Systems/NerfExpertDebuffsSystem.cs +++ b/Systems/NerfExpertDebuffsSystem.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Systems public override void PostUpdateTime() { // Reduce the expert+ debuff time multiplier to the normal mode multiplier - if (CalamityConfig.Instance.NerfExpertDebuffs) + if (CalamityServerConfig.Instance.NerfExpertDebuffs) { var copy = Main.RegisteredGameModes[GameModeID.Expert]; copy.DebuffTimeMultiplier = 1f; diff --git a/Systems/WorldMiscUpdateSystem.cs b/Systems/WorldMiscUpdateSystem.cs index 2a4e9dee57..85c1bed3e8 100644 --- a/Systems/WorldMiscUpdateSystem.cs +++ b/Systems/WorldMiscUpdateSystem.cs @@ -444,9 +444,9 @@ namespace CalamityMod.Systems if (Main.SceneMetrics.WaterCandleCount > 0) spawnRate *= 0.8D; - if (modPlayer.isNearbyBoss && CalamityConfig.Instance.BossZen) + if (modPlayer.isNearbyBoss && CalamityServerConfig.Instance.BossZen) spawnRate *= 50D; - if (modPlayer.zen || (CalamityConfig.Instance.ForceTownSafety && player.townNPCs > 1f && Main.expertMode)) + if (modPlayer.zen || (CalamityServerConfig.Instance.ForceTownSafety && player.townNPCs > 1f && Main.expertMode)) spawnRate *= 2D; if (modPlayer.tranquilityCandle) spawnRate *= 1.67D; diff --git a/Systems/WorldgenManagementSystem.cs b/Systems/WorldgenManagementSystem.cs index 1e7c71d05f..1c95edcdf9 100644 --- a/Systems/WorldgenManagementSystem.cs +++ b/Systems/WorldgenManagementSystem.cs @@ -336,7 +336,7 @@ namespace CalamityMod.Systems // Disable gen pass if Early Hardmode Rework is disabled. // Could just not add/remove gen pass, but that could lead to mod conflicts // in case whatever mod targets this specific gen pass. - if (!CalamityConfig.Instance.EarlyHardmodeProgressionRework) + if (!CalamityServerConfig.Instance.EarlyHardmodeProgressionRework) { hardmodeOreT1Pass.Disable(); } diff --git a/Tiles/CalamityGlobalTile.cs b/Tiles/CalamityGlobalTile.cs index 13fd8f4d53..eee4e9752e 100644 --- a/Tiles/CalamityGlobalTile.cs +++ b/Tiles/CalamityGlobalTile.cs @@ -403,7 +403,7 @@ namespace CalamityMod.Tiles { Vector2 spreadMinMax = new Vector2(-32.0f, 32.0f); // Drop 4 Soul of Night - if (CalamityConfig.Instance.EarlyHardmodeProgressionRework) + if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework) { DropItem(i, j, ItemID.SoulofNight, quantity: 4, asStack: false, spreadMinMax); WorldGen.altarCount++; // altarCount does not update automatically if ProgressionRework is enabled! diff --git a/UI/CooldownRackUI.cs b/UI/CooldownRackUI.cs index acd23acbd4..8c0469ba29 100644 --- a/UI/CooldownRackUI.cs +++ b/UI/CooldownRackUI.cs @@ -19,7 +19,7 @@ namespace CalamityMod.UI get { // Option 1: Always use compact icons if configured to do so. - if (CalamityConfig.Instance.CooldownDisplay == 1) + if (CalamityClientConfig.Instance.CooldownDisplay == 1) return true; // Option 2: If there are too many cooldowns, auto switch to compact mode. @@ -43,7 +43,7 @@ namespace CalamityMod.UI // 1 - The game isn't even on the game screen yet. // 2 - The player's inventory is open. // 3 - Cooldown display is completely disabled. - if (Main.gameMenu || Main.playerInventory || CalamityConfig.Instance.CooldownDisplay < 1) + if (Main.gameMenu || Main.playerInventory || CalamityClientConfig.Instance.CooldownDisplay < 1) return; IList cooldownsToDraw = Main.LocalPlayer.GetDisplayedCooldowns(); diff --git a/UI/DraedonsArsenal/ChargeMeterUI.cs b/UI/DraedonsArsenal/ChargeMeterUI.cs index 709f36a8dd..b3c159411e 100644 --- a/UI/DraedonsArsenal/ChargeMeterUI.cs +++ b/UI/DraedonsArsenal/ChargeMeterUI.cs @@ -38,7 +38,7 @@ namespace CalamityMod.UI.DraedonsArsenal public static void Draw(SpriteBatch spriteBatch, Player player) { // Sanity check the planned position before drawing - Vector2 screenRatioPosition = new Vector2(CalamityConfig.Instance.ChargeMeterPosX, CalamityConfig.Instance.ChargeMeterPosY); + Vector2 screenRatioPosition = new Vector2(CalamityClientConfig.Instance.ChargeMeterPosX, CalamityClientConfig.Instance.ChargeMeterPosY); if (screenRatioPosition.X < 0f || screenRatioPosition.X > 100f) screenRatioPosition.X = DefaultChargePosX; if (screenRatioPosition.Y < 0f || screenRatioPosition.Y > 100f) @@ -54,23 +54,23 @@ namespace CalamityMod.UI.DraedonsArsenal void SavePosition() { bool changed = false; - if (CalamityConfig.Instance.ChargeMeterPosX != screenRatioPosition.X) + if (CalamityClientConfig.Instance.ChargeMeterPosX != screenRatioPosition.X) { - CalamityConfig.Instance.ChargeMeterPosX = screenRatioPosition.X; + CalamityClientConfig.Instance.ChargeMeterPosX = screenRatioPosition.X; changed = true; } - if (CalamityConfig.Instance.ChargeMeterPosY != screenRatioPosition.Y) + if (CalamityClientConfig.Instance.ChargeMeterPosY != screenRatioPosition.Y) { - CalamityConfig.Instance.ChargeMeterPosY = screenRatioPosition.Y; + CalamityClientConfig.Instance.ChargeMeterPosY = screenRatioPosition.Y; changed = true; } if (changed) - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); } // If the Charge Meter is turned off or the player is not holding an item, stop. Item heldItem = player.ActiveItem(); - if (!CalamityConfig.Instance.ChargeMeter || heldItem is null || heldItem.IsAir) + if (!CalamityClientConfig.Instance.ChargeMeter || heldItem is null || heldItem.IsAir) { Reset(); SavePosition(); @@ -96,7 +96,7 @@ namespace CalamityMod.UI.DraedonsArsenal if (chargeBar.Intersects(mouseHitbox)) { - if (!CalamityConfig.Instance.MeterPosLock) + if (!CalamityClientConfig.Instance.MeterPosLock) Main.LocalPlayer.mouseInterface = true; // If the mouse is on top of the meter, show the exact numeric charge. @@ -106,7 +106,7 @@ namespace CalamityMod.UI.DraedonsArsenal Vector2 newScreenRatioPosition = screenRatioPosition; // Handle mouse dragging - if (!CalamityConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) + if (!CalamityClientConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) { // If the drag offset doesn't exist yet, create it. if (!dragOffset.HasValue) @@ -124,15 +124,15 @@ namespace CalamityMod.UI.DraedonsArsenal Vector2 delta = newScreenRatioPosition - screenRatioPosition; if (Math.Abs(delta.X) >= MouseDragEpsilon || Math.Abs(delta.Y) >= MouseDragEpsilon) { - CalamityConfig.Instance.ChargeMeterPosX = newScreenRatioPosition.X; - CalamityConfig.Instance.ChargeMeterPosY = newScreenRatioPosition.Y; + CalamityClientConfig.Instance.ChargeMeterPosX = newScreenRatioPosition.X; + CalamityClientConfig.Instance.ChargeMeterPosY = newScreenRatioPosition.Y; } // When the mouse is released, save the config and destroy the drag offset. if (ms.LeftButton == ButtonState.Released) { dragOffset = null; - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); } } } diff --git a/UI/FlightBar/FlightBar.cs b/UI/FlightBar/FlightBar.cs index 60ec028cfb..8d9d14b533 100644 --- a/UI/FlightBar/FlightBar.cs +++ b/UI/FlightBar/FlightBar.cs @@ -90,7 +90,7 @@ namespace CalamityMod.UI public static void Draw(SpriteBatch spriteBatch, Player player) { // Sanity check the planned position before drawing - Vector2 screenRatioPosition = new Vector2(CalamityConfig.Instance.FlightBarPosX, CalamityConfig.Instance.FlightBarPosY); + Vector2 screenRatioPosition = new Vector2(CalamityClientConfig.Instance.FlightBarPosX, CalamityClientConfig.Instance.FlightBarPosY); if (screenRatioPosition.X < 0f || screenRatioPosition.X > 100f) screenRatioPosition.X = DefaultFlightPosX; if (screenRatioPosition.Y < 0f || screenRatioPosition.Y > 100f) @@ -106,26 +106,26 @@ namespace CalamityMod.UI CalamityPlayer modPlayer = player.Calamity(); // If not drawing the flight bar, save its latest position to config and leave. - if (CalamityConfig.Instance.FlightBar && ((player.wingsLogic > 0 && player.wingTimeMax > 0) || (player.mount.Active && player.mount._data.flightTimeMax > 0) || player.carpet && !player.canCarpet)) + if (CalamityClientConfig.Instance.FlightBar && ((player.wingsLogic > 0 && player.wingTimeMax > 0) || (player.mount.Active && player.mount._data.flightTimeMax > 0) || player.carpet && !player.canCarpet)) { DrawFlightBar(spriteBatch, modPlayer, screenPos); } else { bool changed = false; - if (CalamityConfig.Instance.FlightBarPosX != screenRatioPosition.X) + if (CalamityClientConfig.Instance.FlightBarPosX != screenRatioPosition.X) { - CalamityConfig.Instance.FlightBarPosX = screenRatioPosition.X; + CalamityClientConfig.Instance.FlightBarPosX = screenRatioPosition.X; changed = true; } - if (CalamityConfig.Instance.FlightBarPosY != screenRatioPosition.Y) + if (CalamityClientConfig.Instance.FlightBarPosY != screenRatioPosition.Y) { - CalamityConfig.Instance.FlightBarPosY = screenRatioPosition.Y; + CalamityClientConfig.Instance.FlightBarPosY = screenRatioPosition.Y; changed = true; } if (changed) - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); return; } @@ -138,7 +138,7 @@ namespace CalamityMod.UI // Handle mouse dragging if (flightBar.Intersects(mouseHitbox)) { - if (!CalamityConfig.Instance.MeterPosLock) + if (!CalamityClientConfig.Instance.MeterPosLock) Main.LocalPlayer.mouseInterface = true; if (modPlayer.Player.equippedWings != null && modPlayer.Player.wingTimeMax > 0 || (player.mount.Active && modPlayer.Player.mount._data.flightTimeMax > 0) || player.carpet && !player.canCarpet) //equipped wings or riding a flying mount and max wingtime/flighttime above 0 (so not disabled bar) @@ -149,7 +149,7 @@ namespace CalamityMod.UI Vector2 newScreenRatioPosition = screenRatioPosition; // As long as the mouse button is held down, drag the meter along with an offset. - if (!CalamityConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) + if (!CalamityClientConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) { // If the drag offset doesn't exist yet, create it. if (!dragOffset.HasValue) @@ -167,15 +167,15 @@ namespace CalamityMod.UI Vector2 delta = newScreenRatioPosition - screenRatioPosition; if (Math.Abs(delta.X) >= MouseDragEpsilon || Math.Abs(delta.Y) >= MouseDragEpsilon) { - CalamityConfig.Instance.FlightBarPosX = newScreenRatioPosition.X; - CalamityConfig.Instance.FlightBarPosY = newScreenRatioPosition.Y; + CalamityClientConfig.Instance.FlightBarPosX = newScreenRatioPosition.X; + CalamityClientConfig.Instance.FlightBarPosY = newScreenRatioPosition.Y; } // When the mouse is released, save the config and destroy the drag offset. if (ms.LeftButton == ButtonState.Released) { dragOffset = null; - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); } } } diff --git a/UI/Rippers/RipperUI.cs b/UI/Rippers/RipperUI.cs index 6c8a3cde57..2f9cce458e 100644 --- a/UI/Rippers/RipperUI.cs +++ b/UI/Rippers/RipperUI.cs @@ -105,14 +105,14 @@ namespace CalamityMod.UI.Rippers public static void Draw(SpriteBatch spriteBatch, Player player) { // Sanity check the planned Rage Meter position - Vector2 rageScreenRatioPos = new Vector2(CalamityConfig.Instance.RageMeterPosX, CalamityConfig.Instance.RageMeterPosY); + Vector2 rageScreenRatioPos = new Vector2(CalamityClientConfig.Instance.RageMeterPosX, CalamityClientConfig.Instance.RageMeterPosY); if (rageScreenRatioPos.X < 0f || rageScreenRatioPos.X > 100f) rageScreenRatioPos.X = DefaultRagePosX; if (rageScreenRatioPos.Y < 0f || rageScreenRatioPos.Y > 100f) rageScreenRatioPos.Y = DefaultRagePosY; // Sanity check the planned Adrenaline Meter position - Vector2 adrenScreenRatioPos = new Vector2(CalamityConfig.Instance.AdrenalineMeterPosX, CalamityConfig.Instance.AdrenalineMeterPosY); + Vector2 adrenScreenRatioPos = new Vector2(CalamityClientConfig.Instance.AdrenalineMeterPosX, CalamityClientConfig.Instance.AdrenalineMeterPosY); if (adrenScreenRatioPos.X < 0f || adrenScreenRatioPos.X > 100f) adrenScreenRatioPos.X = DefaultAdrenPosX; if (adrenScreenRatioPos.Y < 0f || adrenScreenRatioPos.Y > 100f) @@ -135,18 +135,18 @@ namespace CalamityMod.UI.Rippers else { bool changed = false; - if (CalamityConfig.Instance.RageMeterPosX != rageScreenRatioPos.X) + if (CalamityClientConfig.Instance.RageMeterPosX != rageScreenRatioPos.X) { - CalamityConfig.Instance.RageMeterPosX = rageScreenRatioPos.X; + CalamityClientConfig.Instance.RageMeterPosX = rageScreenRatioPos.X; changed = true; } - if (CalamityConfig.Instance.RageMeterPosY != rageScreenRatioPos.Y) + if (CalamityClientConfig.Instance.RageMeterPosY != rageScreenRatioPos.Y) { - CalamityConfig.Instance.RageMeterPosY = rageScreenRatioPos.Y; + CalamityClientConfig.Instance.RageMeterPosY = rageScreenRatioPos.Y; changed = true; } if (changed) - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); } if (modPlayer.AdrenalineEnabled) @@ -154,18 +154,18 @@ namespace CalamityMod.UI.Rippers else { bool changed = false; - if (CalamityConfig.Instance.AdrenalineMeterPosX != adrenScreenRatioPos.X) + if (CalamityClientConfig.Instance.AdrenalineMeterPosX != adrenScreenRatioPos.X) { - CalamityConfig.Instance.AdrenalineMeterPosX = adrenScreenRatioPos.X; + CalamityClientConfig.Instance.AdrenalineMeterPosX = adrenScreenRatioPos.X; changed = true; } - if (CalamityConfig.Instance.AdrenalineMeterPosY != adrenScreenRatioPos.Y) + if (CalamityClientConfig.Instance.AdrenalineMeterPosY != adrenScreenRatioPos.Y) { - CalamityConfig.Instance.AdrenalineMeterPosY = adrenScreenRatioPos.Y; + CalamityClientConfig.Instance.AdrenalineMeterPosY = adrenScreenRatioPos.Y; changed = true; } if (changed) - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); } #region Mouse Interaction @@ -190,7 +190,7 @@ namespace CalamityMod.UI.Rippers if (rageHover && !adrenHover) { // If the meter isn't locked, then the player's mouse counts as being over interface - if (!CalamityConfig.Instance.MeterPosLock) + if (!CalamityClientConfig.Instance.MeterPosLock) Main.LocalPlayer.mouseInterface = true; // Add hover text if the mouse is over Rage bar @@ -199,7 +199,7 @@ namespace CalamityMod.UI.Rippers // The bar is draggable if enabled in config. Vector2 newScreenRatioPosition = rageScreenRatioPos; - if (!CalamityConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) + if (!CalamityClientConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) { // If the drag offset doesn't exist yet, create it. if (!rageDragOffset.HasValue) @@ -217,21 +217,21 @@ namespace CalamityMod.UI.Rippers Vector2 delta = newScreenRatioPosition - rageScreenRatioPos; if (Math.Abs(delta.X) >= MouseDragEpsilon || Math.Abs(delta.Y) >= MouseDragEpsilon) { - CalamityConfig.Instance.RageMeterPosX = newScreenRatioPosition.X; - CalamityConfig.Instance.RageMeterPosY = newScreenRatioPosition.Y; + CalamityClientConfig.Instance.RageMeterPosX = newScreenRatioPosition.X; + CalamityClientConfig.Instance.RageMeterPosY = newScreenRatioPosition.Y; } // When the mouse is released, save the config and destroy the drag offset. if (ms.LeftButton == ButtonState.Released) { rageDragOffset = null; - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); } } else if (adrenHover) { // If the meter isn't locked, then the player's mouse counts as being over interface - if (!CalamityConfig.Instance.MeterPosLock) + if (!CalamityClientConfig.Instance.MeterPosLock) Main.LocalPlayer.mouseInterface = true; // Add hover text if the mouse is over the bar @@ -241,7 +241,7 @@ namespace CalamityMod.UI.Rippers // The bar is draggable if enabled in config. Vector2 newScreenRatioPosition = adrenScreenRatioPos; - if (!CalamityConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) + if (!CalamityClientConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) { // If the drag offset doesn't exist yet, create it. if (!adrenDragOffset.HasValue) @@ -259,15 +259,15 @@ namespace CalamityMod.UI.Rippers Vector2 delta = newScreenRatioPosition - adrenScreenRatioPos; if (Math.Abs(delta.X) >= MouseDragEpsilon || Math.Abs(delta.Y) >= MouseDragEpsilon) { - CalamityConfig.Instance.AdrenalineMeterPosX = newScreenRatioPosition.X; - CalamityConfig.Instance.AdrenalineMeterPosY = newScreenRatioPosition.Y; + CalamityClientConfig.Instance.AdrenalineMeterPosX = newScreenRatioPosition.X; + CalamityClientConfig.Instance.AdrenalineMeterPosY = newScreenRatioPosition.Y; } // When the mouse is released, save the config and destroy the drag offset. if (ms.LeftButton == ButtonState.Released) { adrenDragOffset = null; - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); } } #endregion @@ -446,7 +446,7 @@ namespace CalamityMod.UI.Rippers #endregion private static Vector2 GetShakeOffset() { - float shake = CalamityConfig.Instance.RipperMeterShake; + float shake = CalamityClientConfig.Instance.RipperMeterShake; float shakeX = Main.rand.NextFloat(-shake, shake); float shakeY = Main.rand.NextFloat(-shake, shake); return new Vector2(shakeX, shakeY); diff --git a/UI/SpeedrunTimerUI.cs b/UI/SpeedrunTimerUI.cs index 6f340be742..7835193f47 100644 --- a/UI/SpeedrunTimerUI.cs +++ b/UI/SpeedrunTimerUI.cs @@ -44,11 +44,11 @@ namespace CalamityMod.UI public static void Draw(Player player) { - if (Main.gameMenu || !CalamityConfig.Instance.SpeedrunTimer) + if (Main.gameMenu || !CalamityClientConfig.Instance.SpeedrunTimer) return; // Sanity check the planned position before drawing - Vector2 screenRatioPosition = new Vector2(CalamityConfig.Instance.SpeedrunTimerPosX, CalamityConfig.Instance.SpeedrunTimerPosY); + Vector2 screenRatioPosition = new Vector2(CalamityClientConfig.Instance.SpeedrunTimerPosX, CalamityClientConfig.Instance.SpeedrunTimerPosY); if (screenRatioPosition.X < 0f || screenRatioPosition.X > 100f) screenRatioPosition.X = DefaultTimerPosX; if (screenRatioPosition.Y < 0f || screenRatioPosition.Y > 100f) diff --git a/UI/StealthUI.cs b/UI/StealthUI.cs index 4562d8a1fe..5abcc3896f 100644 --- a/UI/StealthUI.cs +++ b/UI/StealthUI.cs @@ -41,7 +41,7 @@ namespace CalamityMod.UI public static void Draw(SpriteBatch spriteBatch, Player player) { // Sanity check the planned position before drawing - Vector2 screenRatioPosition = new Vector2(CalamityConfig.Instance.StealthMeterPosX, CalamityConfig.Instance.StealthMeterPosY); + Vector2 screenRatioPosition = new Vector2(CalamityClientConfig.Instance.StealthMeterPosX, CalamityClientConfig.Instance.StealthMeterPosY); if (screenRatioPosition.X < 0f || screenRatioPosition.X > 100f) screenRatioPosition.X = DefaultStealthPosX; if (screenRatioPosition.Y < 0f || screenRatioPosition.Y > 100f) @@ -57,26 +57,26 @@ namespace CalamityMod.UI CalamityPlayer modPlayer = player.Calamity(); // If not drawing the stealth meter, save its latest position to config and leave. - if (modPlayer.stealthUIAlpha > 0f && CalamityConfig.Instance.StealthMeter && modPlayer.rogueStealthMax > 0f && modPlayer.wearingRogueArmor) + if (modPlayer.stealthUIAlpha > 0f && CalamityClientConfig.Instance.StealthMeter && modPlayer.rogueStealthMax > 0f && modPlayer.wearingRogueArmor) { DrawStealthBar(spriteBatch, modPlayer, screenPos); } else { bool changed = false; - if (CalamityConfig.Instance.StealthMeterPosX != screenRatioPosition.X) + if (CalamityClientConfig.Instance.StealthMeterPosX != screenRatioPosition.X) { - CalamityConfig.Instance.StealthMeterPosX = screenRatioPosition.X; + CalamityClientConfig.Instance.StealthMeterPosX = screenRatioPosition.X; changed = true; } - if (CalamityConfig.Instance.StealthMeterPosY != screenRatioPosition.Y) + if (CalamityClientConfig.Instance.StealthMeterPosY != screenRatioPosition.Y) { - CalamityConfig.Instance.StealthMeterPosY = screenRatioPosition.Y; + CalamityClientConfig.Instance.StealthMeterPosY = screenRatioPosition.Y; changed = true; } if (changed) - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); } Rectangle mouseHitbox = new Rectangle((int)Main.MouseScreen.X, (int)Main.MouseScreen.Y, 8, 8); @@ -88,7 +88,7 @@ namespace CalamityMod.UI // Handle mouse dragging if (stealthBar.Intersects(mouseHitbox)) { - if (!CalamityConfig.Instance.MeterPosLock) + if (!CalamityClientConfig.Instance.MeterPosLock) Main.LocalPlayer.mouseInterface = true; // If the mouse is on top of the meter, show the player's exact numeric stealth. @@ -113,7 +113,7 @@ namespace CalamityMod.UI Vector2 newScreenRatioPosition = screenRatioPosition; // As long as the mouse button is held down, drag the meter along with an offset. - if (!CalamityConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) + if (!CalamityClientConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) { // If the drag offset doesn't exist yet, create it. if (!dragOffset.HasValue) @@ -131,15 +131,15 @@ namespace CalamityMod.UI Vector2 delta = newScreenRatioPosition - screenRatioPosition; if (Math.Abs(delta.X) >= MouseDragEpsilon || Math.Abs(delta.Y) >= MouseDragEpsilon) { - CalamityConfig.Instance.StealthMeterPosX = newScreenRatioPosition.X; - CalamityConfig.Instance.StealthMeterPosY = newScreenRatioPosition.Y; + CalamityClientConfig.Instance.StealthMeterPosX = newScreenRatioPosition.X; + CalamityClientConfig.Instance.StealthMeterPosY = newScreenRatioPosition.Y; } // When the mouse is released, save the config and destroy the drag offset. if (ms.LeftButton == ButtonState.Released) { dragOffset = null; - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); } } } diff --git a/UI/SulphurousWaterMeter/SulphurousWaterMeterUI.cs b/UI/SulphurousWaterMeter/SulphurousWaterMeterUI.cs index a1a4899dab..97a3df2f64 100644 --- a/UI/SulphurousWaterMeter/SulphurousWaterMeterUI.cs +++ b/UI/SulphurousWaterMeter/SulphurousWaterMeterUI.cs @@ -37,7 +37,7 @@ namespace CalamityMod.UI.SulphurousWaterMeter public static void Draw(SpriteBatch spriteBatch, Player player) { // Sanity check the planned position before drawing. This is done relative. - Vector2 screenRatioPosition = new Vector2(CalamityConfig.Instance.SulphuricWaterMeterPosX, CalamityConfig.Instance.SulphuricWaterMeterPosY); + Vector2 screenRatioPosition = new Vector2(CalamityClientConfig.Instance.SulphuricWaterMeterPosX, CalamityClientConfig.Instance.SulphuricWaterMeterPosY); if (screenRatioPosition.X < 0f || screenRatioPosition.X > 100f) screenRatioPosition.X = DefaultPosX; if (screenRatioPosition.Y < 0f || screenRatioPosition.Y > 100f) @@ -58,19 +58,19 @@ namespace CalamityMod.UI.SulphurousWaterMeter else { bool changed = false; - if (CalamityConfig.Instance.SulphuricWaterMeterPosX != screenRatioPosition.X) + if (CalamityClientConfig.Instance.SulphuricWaterMeterPosX != screenRatioPosition.X) { - CalamityConfig.Instance.SulphuricWaterMeterPosX = screenRatioPosition.X; + CalamityClientConfig.Instance.SulphuricWaterMeterPosX = screenRatioPosition.X; changed = true; } - if (CalamityConfig.Instance.SulphuricWaterMeterPosY != screenRatioPosition.Y) + if (CalamityClientConfig.Instance.SulphuricWaterMeterPosY != screenRatioPosition.Y) { - CalamityConfig.Instance.SulphuricWaterMeterPosY = screenRatioPosition.Y; + CalamityClientConfig.Instance.SulphuricWaterMeterPosY = screenRatioPosition.Y; changed = true; } if (changed) - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); } Rectangle mouseHitbox = new Rectangle((int)Main.MouseScreen.X, (int)Main.MouseScreen.Y, 8, 8); @@ -82,7 +82,7 @@ namespace CalamityMod.UI.SulphurousWaterMeter // Handle mouse dragging if (waterBarArea.Intersects(mouseHitbox)) { - if (!CalamityConfig.Instance.MeterPosLock) + if (!CalamityClientConfig.Instance.MeterPosLock) Main.LocalPlayer.mouseInterface = true; // If the mouse is on top of the meter, show the player's accumulated sulphuric poisoning. @@ -97,7 +97,7 @@ namespace CalamityMod.UI.SulphurousWaterMeter Vector2 newScreenRatioPosition = screenRatioPosition; // As long as the mouse button is held down, drag the meter along with an offset. - if (!CalamityConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) + if (!CalamityClientConfig.Instance.MeterPosLock && ms.LeftButton == ButtonState.Pressed) { // If the drag offset doesn't exist yet, create it. if (!dragOffset.HasValue) @@ -115,15 +115,15 @@ namespace CalamityMod.UI.SulphurousWaterMeter Vector2 delta = newScreenRatioPosition - screenRatioPosition; if (Math.Abs(delta.X) >= MouseDragEpsilon || Math.Abs(delta.Y) >= MouseDragEpsilon) { - CalamityConfig.Instance.SulphuricWaterMeterPosX = newScreenRatioPosition.X; - CalamityConfig.Instance.SulphuricWaterMeterPosY = newScreenRatioPosition.Y; + CalamityClientConfig.Instance.SulphuricWaterMeterPosX = newScreenRatioPosition.X; + CalamityClientConfig.Instance.SulphuricWaterMeterPosY = newScreenRatioPosition.Y; } // When the mouse is released, save the config and destroy the drag offset. if (ms.LeftButton == ButtonState.Released) { dragOffset = null; - CalamityMod.SaveConfig(CalamityConfig.Instance); + CalamityMod.SaveConfig(CalamityClientConfig.Instance); } } else diff --git a/Utilities/DrawingUtils.cs b/Utilities/DrawingUtils.cs index 0c18da9cc3..0ef3726d81 100644 --- a/Utilities/DrawingUtils.cs +++ b/Utilities/DrawingUtils.cs @@ -72,7 +72,7 @@ namespace CalamityMod // If no afterimages are drawn due to an invalid mode being specified, ensure the projectile itself is drawn anyway. bool failedToDrawAfterimages = false; - if (CalamityConfig.Instance.Afterimages) + if (CalamityClientConfig.Instance.Afterimages) { Vector2 centerOffset = drawCentered ? proj.Size / 2f : Vector2.Zero; Color alphaColor = proj.GetAlpha(lightColor); @@ -135,7 +135,7 @@ namespace CalamityMod } // Draw the projectile itself. Only do this if no afterimages are drawn because afterimage 0 is the projectile itself. - if (!CalamityConfig.Instance.Afterimages || ProjectileID.Sets.TrailCacheLength[proj.type] <= 0 || failedToDrawAfterimages) + if (!CalamityClientConfig.Instance.Afterimages || ProjectileID.Sets.TrailCacheLength[proj.type] <= 0 || failedToDrawAfterimages) { Vector2 startPos = drawCentered ? proj.Center : proj.position; Main.spriteBatch.Draw(texture, startPos - Main.screenPosition + new Vector2(0f, proj.gfxOffY), rectangle, proj.GetAlpha(lightColor), rotation, origin, scale, spriteEffects, 0f); diff --git a/Utilities/DropHelper.cs b/Utilities/DropHelper.cs index 88a518df31..0575ad5b0c 100644 --- a/Utilities/DropHelper.cs +++ b/Utilities/DropHelper.cs @@ -487,7 +487,7 @@ namespace CalamityMod public static IItemDropRuleCondition HallowedBarsCondition = If((info) => { // If the Early Hardmode Progression Rework is not enabled, then Hallowed Bars can always drop from Mechanical Bosses. - if (!CalamityConfig.Instance.EarlyHardmodeProgressionRework) + if (!CalamityServerConfig.Instance.EarlyHardmodeProgressionRework) return true; // If the Early Hardmode Progression Rework is enabled, then all 3 Mechanical Bosses must be defeated for Hallowed Bars to drop.