diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index c37d030846..5a28523942 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -1831,7 +1831,7 @@ namespace CalamityMod.ILEditing droids.velocity = -self.velocity.RotatedByRandom(MathHelper.Pi / 20f) * 2f; droids.netUpdate = true; droids.shimmerTransparency = 1f; - NetMessage.SendData(146, -1, -1, null, 2, droids.whoAmI); + NetMessage.SendData(MessageID.ShimmerActions, -1, -1, null, 2, droids.whoAmI); } self.TurnToAir(); @@ -1844,8 +1844,8 @@ namespace CalamityMod.ILEditing } else { - NetMessage.SendData(146, -1, -1, null, 0, (int)self.Center.X, (int)self.Center.Y); - NetMessage.SendData(145, -1, -1, null, self.whoAmI, 1f); + NetMessage.SendData(MessageID.ShimmerActions, -1, -1, null, 0, (int)self.Center.X, (int)self.Center.Y); + NetMessage.SendData(MessageID.SyncItemsWithShimmer, -1, -1, null, self.whoAmI, 1f); } } } diff --git a/Items/Weapons/Melee/MirrorBlade.cs b/Items/Weapons/Melee/MirrorBlade.cs index 557ec7e81e..7a855ec3e7 100644 --- a/Items/Weapons/Melee/MirrorBlade.cs +++ b/Items/Weapons/Melee/MirrorBlade.cs @@ -1,20 +1,14 @@ -using System; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.BaseProjectiles; using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.Melee; using CalamityMod.Rarities; -using CalamityMod.Systems.Collections; using Microsoft.Xna.Framework; -using Mono.Cecil; using Terraria; using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; -using Terraria.Localization; -using Terraria.Audio; -using CalamityMod.Items.Weapons.Summon; using Terraria.ModLoader; -using static System.Net.Mime.MediaTypeNames; namespace CalamityMod.Items.Weapons.Melee { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 77cd50d0bf..c1e95adb16 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -998,7 +998,6 @@ namespace CalamityMod.NPCs #endregion - bool hasModHotOil = false; //Apply DoT Debuffs for (var index = 0; index < npc.buffType.Count(); index++) { @@ -1007,8 +1006,6 @@ namespace CalamityMod.NPCs if (debuffData == null || debuffData == DebuffData.Oiled) //Oiled is done after continue; debuffData.NPCLifeRegenMethod(npc, type, ref index,ref damage); - if (debuffData.HeatDebuffScaling > 0) - hasModHotOil = true; } //Oiled comes after so that we can detect if they have a heat debuff in the above loop bool hasVanillaOil = npc.onFrostBurn || npc.onFrostBurn2 || npc.onFire || npc.onFire2 || npc.onFire3 || npc.shadowFlame; @@ -6872,13 +6869,13 @@ namespace CalamityMod.NPCs // Draw the glowmasks. int frameCounter = (int)npc.frameCounter / 4; - Rectangle frame = TextureAssets.Extra[106].Value.Frame(1, 8); + Rectangle frame = TextureAssets.Extra[ExtrasID.GolemLights4].Value.Frame(1, 8); frame.Y += frame.Height * 2 * frameCounter + npc.frame.Y; Rectangle glowFrame = frame; - spriteBatch.Draw(TextureAssets.Extra[106].Value, eyesDrawPosition, glowFrame, eyeColor, 0f, glowFrame.Size() * 0.5f, npc.scale, SpriteEffects.None, 0f); + spriteBatch.Draw(TextureAssets.Extra[ExtrasID.GolemLights4].Value, eyesDrawPosition, glowFrame, eyeColor, 0f, glowFrame.Size() * 0.5f, npc.scale, SpriteEffects.None, 0f); frame = npc.frame; Rectangle glowFrame2 = frame; - spriteBatch.Draw(TextureAssets.Extra[107].Value, eyesDrawPosition, glowFrame2, eyeColor, 0f, glowFrame2.Size() * 0.5f, npc.scale, SpriteEffects.None, 0f); + spriteBatch.Draw(TextureAssets.Extra[ExtrasID.GolemLights5].Value, eyesDrawPosition, glowFrame2, eyeColor, 0f, glowFrame2.Size() * 0.5f, npc.scale, SpriteEffects.None, 0f); // Draw the sparkle telegraphs for the laser spread attack if applicable. if (npc.ai[0] == 3f && npc.ai[1] <= 60f) diff --git a/NPCs/SunkenSea/FesteringRemains.cs b/NPCs/SunkenSea/FesteringRemains.cs index 21f70be2af..71b6781d45 100644 --- a/NPCs/SunkenSea/FesteringRemains.cs +++ b/NPCs/SunkenSea/FesteringRemains.cs @@ -73,7 +73,7 @@ namespace CalamityMod.NPCs.SunkenSea bonePos = NPC.Center + new Vector2(Main.rand.Next(-extraDistX, extraDistX + 1), Main.rand.Next(-extraDistY, extraDistY + 1)); } } - Particle bone = new ChumBone(bonePos, Vector2.Zero, NPC.GetAlpha(Color.White), Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4), Main.rand.NextFloat(0.8f, 1.6f), 4, Main.rand.NextBool(), Main.rand.NextBool()); + Particle bone = new ChumBone(bonePos, Vector2.Zero, NPC.GetAlpha(Color.White), Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4), Main.rand.NextFloat(0.8f, 1.6f), 4, Main.rand.NextBool()); GeneralParticleHandler.SpawnParticle(bone); // Add to a list of bones bones.Add(bone); diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/MoonLordAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/MoonLordAI.cs index 690f75f2a3..ae415f485e 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/MoonLordAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/MoonLordAI.cs @@ -1858,7 +1858,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (trueEyeSphereDirection.HasNaNs()) trueEyeSphereDirection = Vector2.UnitY * -1f; - float spreadVelocity = 4f; trueEyeSphereDirection *= 4f; int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center.X + freeEyeRotation.X, npc.Center.Y + freeEyeRotation.Y, trueEyeSphereDirection.X, trueEyeSphereDirection.Y, type, 0, 0f, Main.myPlayer, 30f, npc.whoAmI); Main.projectile[proj].timeLeft = 1200; diff --git a/Particles/ChumBone.cs b/Particles/ChumBone.cs index 88838070b4..9e7875dc0f 100644 --- a/Particles/ChumBone.cs +++ b/Particles/ChumBone.cs @@ -14,11 +14,10 @@ namespace CalamityMod.Particles public override bool UseCustomDraw => true; public override bool SetLifetime => true; - private bool direction; - private bool variant; + private bool TexVariant; public static string Texture2 => "CalamityMod/Particles/ChumBone2"; - public ChumBone(Vector2 position, Vector2 velocity, Color color, float rotation, float scale, int lifeTime, bool variant, bool direction) + public ChumBone(Vector2 position, Vector2 velocity, Color color, float rotation, float scale, int lifeTime, bool variant) { Position = position; Velocity = velocity; @@ -26,6 +25,7 @@ namespace CalamityMod.Particles Lifetime = lifeTime; Rotation = rotation; Color = color; + TexVariant = variant; } public override void Update() @@ -54,8 +54,8 @@ namespace CalamityMod.Particles public override void CustomDraw(SpriteBatch spriteBatch) { - Texture2D tex = variant ? ModContent.Request(Texture2).Value : ModContent.Request(Texture).Value; - SpriteEffects spriteDir = direction ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Texture2D tex = TexVariant ? ModContent.Request(Texture2).Value : ModContent.Request(Texture).Value; + SpriteEffects spriteDir = SpriteEffects.FlipHorizontally; spriteBatch.Draw(tex, Position - Main.screenPosition, null, Lighting.GetColor(Position.ToTileCoordinates()), Rotation, new Vector2(tex.Width / 2, tex.Height), Scale, spriteDir, 0); } } diff --git a/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs b/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs index 6e413c3fd5..ebdfb9cc2d 100644 --- a/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs @@ -265,20 +265,17 @@ namespace CalamityMod.Projectiles.BaseProjectiles public override void ModifyDamageHitbox(ref Rectangle hitbox) { Vector2 cen = Projectile.Center + new Vector2(HitboxOutset, 0).RotatedBy(FinalRotation + HitboxRotationOffset); - hitbox = new Rectangle((int)cen.X - (int)(HitboxSize.X / 2), (int)cen.Y - (int)(HitboxSize.Y / 2), (int)HitboxSize.X, (int)HitboxSize.Y); - if (false) // Turn this on to show the hitbox, useful for testing if it's working how you want - { - Particle blastRing = new CustomPulse(hitbox.TopLeft(), Vector2.Zero, Color.Red, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 4); - GeneralParticleHandler.SpawnParticle(blastRing); - Particle blastRing2 = new CustomPulse(hitbox.TopRight(), Vector2.Zero, Color.Gold, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 4); - GeneralParticleHandler.SpawnParticle(blastRing2); - Particle blastRing3 = new CustomPulse(hitbox.BottomLeft(), Vector2.Zero, Color.Green, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 4); - GeneralParticleHandler.SpawnParticle(blastRing3); - Particle blastRing4 = new CustomPulse(hitbox.BottomRight(), Vector2.Zero, Color.Cyan, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 4); - GeneralParticleHandler.SpawnParticle(blastRing4); - } + // Turn this on to show the hitbox, useful for testing if it's working how you want + /*Particle blastRing = new CustomPulse(hitbox.TopLeft(), Vector2.Zero, Color.Red, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 4); + GeneralParticleHandler.SpawnParticle(blastRing); + Particle blastRing2 = new CustomPulse(hitbox.TopRight(), Vector2.Zero, Color.Gold, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 4); + GeneralParticleHandler.SpawnParticle(blastRing2); + Particle blastRing3 = new CustomPulse(hitbox.BottomLeft(), Vector2.Zero, Color.Green, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 4); + GeneralParticleHandler.SpawnParticle(blastRing3); + Particle blastRing4 = new CustomPulse(hitbox.BottomRight(), Vector2.Zero, Color.Cyan, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 4); + GeneralParticleHandler.SpawnParticle(blastRing4);*/ base.ModifyDamageHitbox(ref hitbox); } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 1880f10b17..4c81b95fe7 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -448,7 +448,7 @@ namespace CalamityMod.Projectiles if (Main.rand.NextBool(24)) SoundEngine.PlaySound(SoundID.DD2_BetsyFireballShot, projectile.Center); - Dust fire = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(projectile.width, projectile.height) * 0.42f, 267); + Dust fire = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(projectile.width, projectile.height) * 0.42f, DustID.RainbowMk2); fire.color = Color.Lerp(Color.Orange, Color.Red, Main.rand.NextFloat(0.45f, 1f)); fire.scale = Main.rand.NextFloat(1.4f, 1.65f); fire.fadeIn = 0.5f; @@ -1444,7 +1444,7 @@ namespace CalamityMod.Projectiles { float x2 = projectile.position.X - projectile.velocity.X / (float)totalDust * (float)i; float y2 = projectile.position.Y - projectile.velocity.Y / (float)totalDust * (float)i; - int dust = Dust.NewDust(new Vector2(x2, y2), 1, 1, 75); + int dust = Dust.NewDust(new Vector2(x2, y2), 1, 1, DustID.CursedTorch); Main.dust[dust].alpha = projectile.alpha; Main.dust[dust].position.X = x2; Main.dust[dust].position.Y = y2; @@ -2061,14 +2061,14 @@ namespace CalamityMod.Projectiles projectile.rotation = projectile.velocity.ToRotation(); for (int dustIndex = 0; dustIndex < 5; dustIndex++) { - Dust dust = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(24f, 24f), 16, projectile.velocity * MathHelper.Lerp(0.2f, 0.7f, Main.rand.NextFloat())); + Dust dust = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(24f, 24f), DustID.Cloud, projectile.velocity * MathHelper.Lerp(0.2f, 0.7f, Main.rand.NextFloat())); dust.velocity += Main.rand.NextVector2Circular(0.5f, 0.5f); dust.scale = 0.8f + Main.rand.NextFloat() * 0.5f; } for (int dustIndex = 0; dustIndex < 5; dustIndex++) { - Dust dust = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(24f, 24f), 16, Main.rand.NextVector2Circular(2f, 2f) + projectile.velocity * MathHelper.Lerp(0.2f, 0.5f, Main.rand.NextFloat())); + Dust dust = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(24f, 24f), DustID.Cloud, Main.rand.NextVector2Circular(2f, 2f) + projectile.velocity * MathHelper.Lerp(0.2f, 0.5f, Main.rand.NextFloat())); dust.velocity += Main.rand.NextVector2Circular(0.5f, 0.5f); dust.scale = 0.8f + Main.rand.NextFloat() * 0.5f; dust.fadeIn = 1f; @@ -4254,7 +4254,7 @@ namespace CalamityMod.Projectiles for (int i = 0; i < 2; ++i) { - Dust dust = Dust.NewDustPerfect(projectile.Center + projectile.velocity, 261, -projectile.velocity * Main.rand.NextFloat(0.1f, 0.9f)); + Dust dust = Dust.NewDustPerfect(projectile.Center + projectile.velocity, DustID.AncientLight, -projectile.velocity * Main.rand.NextFloat(0.1f, 0.9f)); dust.noGravity = true; dust.scale = Main.rand.NextFloat(0.65f, 0.9f); dust.alpha = 100; @@ -4277,7 +4277,7 @@ namespace CalamityMod.Projectiles for (int i = 0; i < 3; ++i) { - Dust dust = Dust.NewDustPerfect(projectile.Center + spawnOffset, 278, projectile.velocity * Main.rand.NextFloat(0.05f, 0.2f)); + Dust dust = Dust.NewDustPerfect(projectile.Center + spawnOffset, DustID.FireworksRGB, projectile.velocity * Main.rand.NextFloat(0.05f, 0.2f)); dust.noGravity = true; dust.scale = Main.rand.NextFloat(0.35f, 0.45f); dust.color = color; @@ -4306,7 +4306,7 @@ namespace CalamityMod.Projectiles for (int i = 0; i < 3; ++i) { - Dust dust = Dust.NewDustPerfect(projectile.Center + spawnOffset, 278, projectile.velocity * Main.rand.NextFloat(0.05f, 0.2f)); + Dust dust = Dust.NewDustPerfect(projectile.Center + spawnOffset, DustID.FireworksRGB, projectile.velocity * Main.rand.NextFloat(0.05f, 0.2f)); dust.noGravity = true; dust.scale = Main.rand.NextFloat(0.35f, 0.45f); dust.color = color; @@ -4875,7 +4875,7 @@ namespace CalamityMod.Projectiles if (projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.EntitySpriteDraw(TextureAssets.Extra[98].Value, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY) - projectile.velocity * projectile.scale * 0.5f, null, projectile.GetAlpha(new Color(vector41.X, vector41.Y, vector41.Z, vector41.W)), projectile.rotation + MathHelper.PiOver2, TextureAssets.Extra[98].Value.Size() / 2f, projectile.scale * 0.9f, spriteEffects); + Main.EntitySpriteDraw(TextureAssets.Extra[ExtrasID.SharpTears].Value, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY) - projectile.velocity * projectile.scale * 0.5f, null, projectile.GetAlpha(new Color(vector41.X, vector41.Y, vector41.Z, vector41.W)), projectile.rotation + MathHelper.PiOver2, TextureAssets.Extra[ExtrasID.SharpTears].Value.Size() / 2f, projectile.scale * 0.9f, spriteEffects); Color color49 = projectile.GetAlpha(Color.White) * Utils.Remap(projectile.ai[0], 0f, killGateValue, 0.5f, 0f); color49.A = 0; diff --git a/Projectiles/Damageable/DamageableProjectile.cs b/Projectiles/Damageable/DamageableProjectile.cs index 123e64c7a8..78b8dfc344 100644 --- a/Projectiles/Damageable/DamageableProjectile.cs +++ b/Projectiles/Damageable/DamageableProjectile.cs @@ -151,17 +151,11 @@ namespace CalamityMod.Projectiles.Damageable } if (wasHit && Life > 0) { - if (HitSound != null) - { - SoundEngine.PlaySound(HitSound, Projectile.Center); - } + SoundEngine.PlaySound(HitSound, Projectile.Center); } else if (Life <= 0) { - if (DeathSound != null) - { - SoundEngine.PlaySound(DeathSound, Projectile.Center); - } + SoundEngine.PlaySound(DeathSound, Projectile.Center); DamageKillEffect(); Projectile.Kill(); } diff --git a/Projectiles/DraedonsArsenal/NidhoggHoldout.cs b/Projectiles/DraedonsArsenal/NidhoggHoldout.cs index a8b14bd9f5..916229dc40 100644 --- a/Projectiles/DraedonsArsenal/NidhoggHoldout.cs +++ b/Projectiles/DraedonsArsenal/NidhoggHoldout.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public new string LocalizationCategory => "Projectiles.Misc"; public override int AssociatedItemID => ModContent.ItemType(); - public Player Owner => Main.player[Projectile.owner]; public float offsetBase = 30; public override float MaxOffsetLengthFromArm => offsetBase; public override float RecoilResolveSpeed => (shootingTimer < 0) ? 0.02f : 0.1f; diff --git a/Projectiles/DraedonsArsenal/PhalanxSurgeHoldout.cs b/Projectiles/DraedonsArsenal/PhalanxSurgeHoldout.cs index 9903b3f728..29031dc634 100644 --- a/Projectiles/DraedonsArsenal/PhalanxSurgeHoldout.cs +++ b/Projectiles/DraedonsArsenal/PhalanxSurgeHoldout.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public new string LocalizationCategory => "Projectiles.Misc"; public override int AssociatedItemID => ModContent.ItemType(); - public Player Owner => Main.player[Projectile.owner]; public float offsetBase = 30; public override float MaxOffsetLengthFromArm => doingChargeAttack ? 100f : offsetBase; public override float RecoilResolveSpeed => doingChargeAttack ? 2f : (shootingTimer < 0) ? 0.2f : 0.1f; diff --git a/Projectiles/DraedonsArsenal/PhalanxSurgeLaser.cs b/Projectiles/DraedonsArsenal/PhalanxSurgeLaser.cs index 5c1d41f657..a2537d86b8 100644 --- a/Projectiles/DraedonsArsenal/PhalanxSurgeLaser.cs +++ b/Projectiles/DraedonsArsenal/PhalanxSurgeLaser.cs @@ -11,7 +11,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public new string LocalizationCategory => "Projectiles.Misc"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - private int dust = 127; public int time = 0; public override void SetDefaults() { diff --git a/Projectiles/DraedonsArsenal/VulcanSpear.cs b/Projectiles/DraedonsArsenal/VulcanSpear.cs index 3d9bc39047..55707121f9 100644 --- a/Projectiles/DraedonsArsenal/VulcanSpear.cs +++ b/Projectiles/DraedonsArsenal/VulcanSpear.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public bool canStick = true; public int stuckTimer = 420; public Vector2 placementCenter; - Vector2 placementVelocity; + public override void SetDefaults() { Projectile.width = Projectile.height = 35; diff --git a/Projectiles/Enemy/GhostBellShock.cs b/Projectiles/Enemy/GhostBellShock.cs index aad4009344..4bbbb66073 100644 --- a/Projectiles/Enemy/GhostBellShock.cs +++ b/Projectiles/Enemy/GhostBellShock.cs @@ -132,8 +132,8 @@ namespace CalamityMod.Projectiles.Enemy int boltPoints = 12; // How many times can a bolt bend int minimumBolts = 6; // Minimum number of bolts int maximumBolts = 12; // Maximum number of bolts - int minimumSplits = 0; // Minimum number of split bolts - int maximumSplits = 2; // Maximum number of split bolts + //int minimumSplits = 0; // Minimum number of split bolts + //int maximumSplits = 2; // Maximum number of split bolts points.Clear(); bolts.Clear(); jellyBolts.Clear(); diff --git a/Projectiles/Magic/HolyLaser.cs b/Projectiles/Magic/HolyLaser.cs index c78db03e4c..52d7db66e3 100644 --- a/Projectiles/Magic/HolyLaser.cs +++ b/Projectiles/Magic/HolyLaser.cs @@ -6,6 +6,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Utilities; using Terraria; +using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; @@ -38,7 +39,6 @@ namespace CalamityMod.Projectiles.Magic private Player Owner { get; set; } - private SlotId BigBeamSoundSlot; public int time = 0; public override void SetDefaults() { @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Magic if (Main.rand.NextBool() || isBigLaser) { - Dust laserDust = Dust.NewDustPerfect(randomLineEffectPosition, 278, Projectile.velocity * Main.rand.NextFloat(5f, 40f), Scale: Main.rand.NextFloat(0.8f, 1.1f)); + Dust laserDust = Dust.NewDustPerfect(randomLineEffectPosition, DustID.FireworksRGB, Projectile.velocity * Main.rand.NextFloat(5f, 40f), Scale: Main.rand.NextFloat(0.8f, 1.1f)); laserDust.noGravity = true; laserDust.color = Main.rand.NextBool(3) ? color2 : color1; } diff --git a/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs b/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs index 183a1b9d1a..850635fff0 100644 --- a/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs +++ b/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public const int MaxUpdates = 3; private const float Radius = 100f; - private SlotId mmmmmm; private bool spawnedAura = false; public int soundCooldown = 0; diff --git a/Projectiles/Ranged/M1GarandHoldout.cs b/Projectiles/Ranged/M1GarandHoldout.cs index 575f176b8c..94301063f8 100644 --- a/Projectiles/Ranged/M1GarandHoldout.cs +++ b/Projectiles/Ranged/M1GarandHoldout.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Ranged // Muzzle flash textures public static Asset MuzzleFlash; - public static Asset GlowTexture; + public static Asset HoldoutGlow; public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/WulfrumBlunderbussFire") { PitchVariance = 0.1f }; public static readonly SoundStyle PingSound = new("CalamityMod/Sounds/Item/M1GarandPing"); @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Ranged public override void Load() { MuzzleFlash = ModContent.Request("CalamityMod/Projectiles/Ranged/M1GarandMuzzleFlash", AssetRequestMode.ImmediateLoad); - GlowTexture = ModContent.Request("CalamityMod/Projectiles/Ranged/M1GarandHoldoutGlow", AssetRequestMode.ImmediateLoad); + HoldoutGlow = ModContent.Request("CalamityMod/Projectiles/Ranged/M1GarandHoldoutGlow", AssetRequestMode.ImmediateLoad); } public override void SetStaticDefaults() => Main.projFrames[Type] = 6; @@ -344,7 +344,7 @@ namespace CalamityMod.Projectiles.Ranged { Texture2D texture = TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(verticalFrames: Main.projFrames[Type], frameY: Math.Clamp(Projectile.frame, 0, Main.projFrames[Type] - 1)); - Texture2D glowTexture = GlowTexture.Value; + Texture2D glowTexture = HoldoutGlow.Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float drawRotation = Projectile.rotation + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f); diff --git a/Projectiles/Ranged/TauCannonHoldout.cs b/Projectiles/Ranged/TauCannonHoldout.cs index 216a74c57f..71a4e9c79a 100644 --- a/Projectiles/Ranged/TauCannonHoldout.cs +++ b/Projectiles/Ranged/TauCannonHoldout.cs @@ -9,6 +9,7 @@ using ReLogic.Content; using ReLogic.Utilities; using Terraria; using Terraria.Audio; +using Terraria.ID; using static Terraria.ModLoader.ModContent; namespace CalamityMod.Projectiles.Ranged @@ -255,7 +256,7 @@ namespace CalamityMod.Projectiles.Ranged float randomRadius = Utils.Remap(Timer, 0f, TimePerCharge * 3f, 5f, 15f); Dust orbDust = Dust.NewDustPerfect( GunTipPosition + Main.rand.NextVector2Circular(randomRadius, randomRadius), - 278, + DustID.FireworksRGB, -Vector2.UnitY.RotatedByRandom(100) * Main.rand.NextFloat(2f, 5f) * Utils.Remap(Timer, 0f, TimePerCharge * 3f, 1f, 5f), Scale: Main.rand.NextFloat(0.3f, 0.9f)); orbDust.noGravity = true; @@ -299,13 +300,14 @@ namespace CalamityMod.Projectiles.Ranged AIState.Level3 => 36, AIState.Level2 => 24, AIState.Level1 => 12, + _ => 0 }; for (int i = 0; i < dustAmount; i++) { float angle = MathHelper.TwoPi / dustAmount * i; Vector2 velocity = angle.ToRotationVector2() * 8f; - Dust chargeDust = Dust.NewDustPerfect(GunTipPosition, 267, velocity, Scale: Utils.Remap(dustAmount, 10f, 30f, 1.5f, 2.2f)); + Dust chargeDust = Dust.NewDustPerfect(GunTipPosition, DustID.RainbowMk2, velocity, Scale: Utils.Remap(dustAmount, 10f, 30f, 1.5f, 2.2f)); chargeDust.noGravity = true; chargeDust.noLight = true; chargeDust.noLightEmittence = true; @@ -328,6 +330,7 @@ namespace CalamityMod.Projectiles.Ranged AIState.Level3 => ChargeLV2Sound, AIState.Level2 => ChargeLV1Sound, AIState.Level1 => ChargeLV1Sound, + _ => ChargeLV1Sound }; SoundEngine.PlaySound(chargeSound, GunTipPosition); diff --git a/Projectiles/Rogue/LeviathanToothStealth.cs b/Projectiles/Rogue/LeviathanToothStealth.cs index d727b1a8a8..807d174e87 100644 --- a/Projectiles/Rogue/LeviathanToothStealth.cs +++ b/Projectiles/Rogue/LeviathanToothStealth.cs @@ -166,7 +166,7 @@ namespace CalamityMod.Projectiles.Rogue if (!spawnedDust && toothNum > 1) { - Dust dust = Dust.NewDustPerfect(finalDrawPos, 5, (rotation.ToRotationVector2().RotatedBy(MathHelper.PiOver2)).RotatedByRandom(0.5f).RotatedBy(1.2f * (isTopJaw ? -1 : 1)) * Main.rand.NextFloat(5f, 8f), 100, default, Main.rand.NextFloat(1.1f, 1.9f) * scale); + Dust dust = Dust.NewDustPerfect(finalDrawPos, DustID.Blood, (rotation.ToRotationVector2().RotatedBy(MathHelper.PiOver2)).RotatedByRandom(0.5f).RotatedBy(1.2f * (isTopJaw ? -1 : 1)) * Main.rand.NextFloat(5f, 8f), 100, default, Main.rand.NextFloat(1.1f, 1.9f) * scale); dust.noGravity = true; dust.alpha = (int)(255 * (1 - toothOpacity)); Particle blood = new CustomSpark(finalDrawPos, (rotation.ToRotationVector2().RotatedBy(MathHelper.PiOver2)).RotatedByRandom(0.4f).RotatedBy(1.2f * (isTopJaw ? -1 : 1)) * Main.rand.NextFloat(5f, 8f), "CalamityMod/Particles/LargeBloom", @@ -187,15 +187,13 @@ namespace CalamityMod.Projectiles.Rogue if (!canDamage) return false; - Player Owner = Main.player[Projectile.owner]; Vector2 start = Projectile.Center; float length = jawLength; float size = 165; float _ = float.NaN; - bool hit = Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, start + Projectile.velocity.SafeNormalize(Vector2.UnitX) * length, size, ref _); - return (hit); - return CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.Calamity().stealthStrike ? 50 : 18, targetHitbox); + bool hit = Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, start + Projectile.velocity.SafeNormalize(Vector2.UnitX) * length, size, ref _); + return hit; } } } diff --git a/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs b/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs index 14b31a2c20..2b0fab8e3d 100644 --- a/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs +++ b/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs @@ -9,7 +9,6 @@ namespace CalamityMod.Projectiles.Rogue public class SamsaraSlicerSmallDisk : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - private double rotation = 0; public Projectile Parent = null; public override void SetStaticDefaults() { diff --git a/Projectiles/Summon/ForbiddenCircletEater.cs b/Projectiles/Summon/ForbiddenCircletEater.cs index 52e97c0270..cc72dd3d22 100644 --- a/Projectiles/Summon/ForbiddenCircletEater.cs +++ b/Projectiles/Summon/ForbiddenCircletEater.cs @@ -69,7 +69,6 @@ namespace CalamityMod.Projectiles.Summon float projX = Projectile.position.X; float projY = Projectile.position.Y; float attackDistance = 100000f; - bool canAttack = false; Projectile.ai[0] += 1f; NPC target = null; diff --git a/Projectiles/Summon/LuxorsGiftSummon.cs b/Projectiles/Summon/LuxorsGiftSummon.cs index 4e1654aa79..4459170bff 100644 --- a/Projectiles/Summon/LuxorsGiftSummon.cs +++ b/Projectiles/Summon/LuxorsGiftSummon.cs @@ -14,7 +14,6 @@ namespace CalamityMod.Projectiles.Summon public class LuxorsGiftSummon : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; - private int dust = 3; public NPC targeted; public int attackTime = 0; public override void SetStaticDefaults() @@ -57,7 +56,7 @@ namespace CalamityMod.Projectiles.Summon { bool sparkly = Main.rand.NextBool(3); Vector2 dustVel = -(Projectile.rotation - MathHelper.PiOver2).ToRotationVector2().RotatedByRandom(0.5f) * Main.rand.NextFloat(0.8f, 1.3f); - Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(8, 8), sparkly ? 278 : ModContent.DustType(), dustVel * Main.rand.NextFloat(0.5f, 1.2f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(8, 8), sparkly ? DustID.FireworksRGB : ModContent.DustType(), dustVel * Main.rand.NextFloat(0.5f, 1.2f)); dust.noGravity = !sparkly; dust.scale = Main.rand.NextFloat(0.45f, 0.6f) * (sparkly ? 1.6f : 1); dust.color = Color.Lime; diff --git a/Projectiles/Typeless/RelicOfDeliveranceSpear.cs b/Projectiles/Typeless/RelicOfDeliveranceSpear.cs index a99c92601f..0ea16c1483 100644 --- a/Projectiles/Typeless/RelicOfDeliveranceSpear.cs +++ b/Projectiles/Typeless/RelicOfDeliveranceSpear.cs @@ -49,7 +49,6 @@ namespace CalamityMod.Projectiles.Typeless public bool inTiles = false; public float respawnMult = 0; - int postHitTimer = 0; public Color bColor = Color.White; public SlotId digSoundSlot; public int digFXCooldown = 0; diff --git a/Projectiles/Typeless/VictideSpirit.cs b/Projectiles/Typeless/VictideSpirit.cs index 3b6ea32a18..47f2719a4f 100644 --- a/Projectiles/Typeless/VictideSpirit.cs +++ b/Projectiles/Typeless/VictideSpirit.cs @@ -23,12 +23,12 @@ namespace CalamityMod.Projectiles.Typeless public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public Player Owner => Main.player[Projectile.owner]; - public static Asset GlowTexture; + public static Asset SpiritGlow; public ref float SubmergedTimer => ref Projectile.ai[0]; public ref float DustCounter => ref Projectile.ai[1]; - public override void Load() => GlowTexture = ModContent.Request("CalamityMod/Particles/BloomCircle"); + public override void Load() => SpiritGlow = ModContent.Request("CalamityMod/Particles/BloomCircle"); public override void SetStaticDefaults() { @@ -289,7 +289,7 @@ namespace CalamityMod.Projectiles.Typeless if (Projectile.timeLeft < 180) { Main.spriteBatch.EnterShaderRegion(BlendState.Additive); - Texture2D glow = GlowTexture.Value; + Texture2D glow = SpiritGlow.Value; Vector2 drawPos = Projectile.Center + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; Color glowColor = new Color(255, 170, 204) * (0.2f * MathF.Sin(Projectile.timeLeft * MathHelper.Pi * 0.25f) + Utils.Remap(Projectile.timeLeft, 180f, 0f, 0.2f, 0.6f, true)); Main.EntitySpriteDraw(glow, drawPos, null, glowColor, Projectile.rotation, glow.Size() * 0.5f, new Vector2(0.6f, 0.5f), SpriteEffects.None); diff --git a/Systems/Graphic/LavaRenderingSystem.cs b/Systems/Graphic/LavaRenderingSystem.cs index 84d5f6cce2..d96ff9c4f8 100644 --- a/Systems/Graphic/LavaRenderingSystem.cs +++ b/Systems/Graphic/LavaRenderingSystem.cs @@ -760,13 +760,8 @@ namespace CalamityMod.Systems int num34 = -1; int num45 = -1; float num47 = 0f; - float num48 = 99999f; - float num49 = 99999f; int num50 = -1; int num2 = -1; - Rectangle value = default(Rectangle); - Rectangle value2 = default(Rectangle); - Vector2 origin = default(Vector2); for (int i = 0; i < currentMax; i++) { if (waterfalls[i].type != 1) diff --git a/Tiles/Abyss/RustyChestTile.cs b/Tiles/Abyss/RustyChestTile.cs index fa7a0a62b8..60a4fd1425 100644 --- a/Tiles/Abyss/RustyChestTile.cs +++ b/Tiles/Abyss/RustyChestTile.cs @@ -10,11 +10,11 @@ namespace CalamityMod.Tiles.Abyss { public class RustyChestTile : ModTile { - public static int Type; + public static int TileType; public override void SetStaticDefaults() { - Type = (ushort)ModContent.TileType(); + TileType = (ushort)ModContent.TileType(); this.SetUpChest(ModContent.ItemType()); AddMapEntry(new Color(113, 90, 71), CalamityUtils.GetItemName(), CalamityUtils.GetMapChestName); diff --git a/Tiles/Furniture/CalamityCanvas2023Tile.cs b/Tiles/Furniture/CalamityCanvas2023Tile.cs index b5693bbff7..a09418f8e9 100644 --- a/Tiles/Furniture/CalamityCanvas2023Tile.cs +++ b/Tiles/Furniture/CalamityCanvas2023Tile.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Tiles.Furniture Tile t = Main.tile[i, j]; Texture2D texture = TextureAssets.Tile[Type].Value; TECanvasPainting cube = CalamityUtils.FindTileEntity(i, j, 1, 1); - float baseDimension = 80; // 5 * 16 + Vector2 pos = new Vector2(i * 16, j * 16) + CalamityUtils.TileDrawOffset; if (cube != null && t.TileFrameX == 0) { diff --git a/Tiles/Furniture/CalamityCanvas2024Tile.cs b/Tiles/Furniture/CalamityCanvas2024Tile.cs index 70df710ad1..70fa5b30de 100644 --- a/Tiles/Furniture/CalamityCanvas2024Tile.cs +++ b/Tiles/Furniture/CalamityCanvas2024Tile.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Tiles.Furniture Tile t = Main.tile[i, j]; Texture2D texture = TextureAssets.Tile[Type].Value; TECanvasPainting cube = CalamityUtils.FindTileEntity(i, j, 1, 1); - float baseDimension = 80; // 5 * 16 + Vector2 pos = new Vector2(i * 16, j * 16) + CalamityUtils.TileDrawOffset; if (cube != null && t.TileFrameX == 0) { diff --git a/UI/ResourceSets/CalamityResourceOverlay.cs b/UI/ResourceSets/CalamityResourceOverlay.cs index 82bcf2a992..e970458711 100644 --- a/UI/ResourceSets/CalamityResourceOverlay.cs +++ b/UI/ResourceSets/CalamityResourceOverlay.cs @@ -99,10 +99,10 @@ namespace CalamityMod.UI.ResourceSets if (drawingLife) { - if (!CalPlayer.chaliceOfTheBloodGod) return; - var bleed = CalPlayer.chaliceBleedoutBuffer; - var hearts = snapshot.AmountOfLifeHearts; - var height = 0; + if (!CalPlayer.chaliceOfTheBloodGod) + return; + var bleed = CalPlayer.chaliceBleedoutBuffer; + var hearts = snapshot.AmountOfLifeHearts; int drawType = -1; //0 - bars 1- regular heart 2 - fancy heart Vector2 position = new Vector2(Main.screenWidth - 60, 28); @@ -110,16 +110,13 @@ namespace CalamityMod.UI.ResourceSets switch (displaySet.NameKey) { case "HorizontalBarsWithText": - height = 12; drawType = 0; break; case "HorizontalBarsWithFullText": - height = 12; position.Y -= 2; drawType = 0; break; case "HorizontalBars": - height = 12; position.Y -= 4; drawType = 0; break; @@ -200,9 +197,8 @@ namespace CalamityMod.UI.ResourceSets // This is where Mana Burn is drawn else if (Player.statMana < 0) { - var mana = -Player.statMana; - var stars = snapshot.AmountOfManaStars; - var height = 0; + var mana = -Player.statMana; + var stars = snapshot.AmountOfManaStars; int drawType = -1; //0 - bars 1- regular heart 2 - fancy heart Vector2 position = new Vector2(Main.screenWidth - 70, 52); @@ -210,16 +206,13 @@ namespace CalamityMod.UI.ResourceSets switch (displaySet.NameKey) { case "HorizontalBarsWithText": - height = 12; drawType = 0; break; case "HorizontalBarsWithFullText": - height = 12; position.Y -= 2; drawType = 0; break; case "HorizontalBars": - height = 12; position.Y -= 4; drawType = 0; break; diff --git a/Waters/BasaltGullyWater.cs b/Waters/BasaltGullyWater.cs index ffa6cf1762..e29677d136 100644 --- a/Waters/BasaltGullyWater.cs +++ b/Waters/BasaltGullyWater.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Waters if (outputColor == Vector3.One || outputColor == new Vector3(0.25f, 0.25f, 0.25f) || outputColor == new Vector3(0.5f, 0.5f, 0.5f)) return; - if (tile.TileType != RustyChestTile.Type) + if (tile.TileType != RustyChestTile.TileType) { CalamityUtils.SunkenSeaWaterLighting(i, j, WaterGlowColor, ref outputColor.X, ref outputColor.Y, ref outputColor.Z); } diff --git a/Waters/SulphuricDepthsWater.cs b/Waters/SulphuricDepthsWater.cs index 4642b32461..2ea476b384 100644 --- a/Waters/SulphuricDepthsWater.cs +++ b/Waters/SulphuricDepthsWater.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Waters { Vector3 outputColor = new Vector3(r, g, b); - if (tile.TileType != RustyChestTile.Type) + if (tile.TileType != RustyChestTile.TileType) { outputColor = Vector3.Lerp(outputColor, Color.MediumSeaGreen.ToVector3(), 0.18f); } diff --git a/Waters/SulphuricWater.cs b/Waters/SulphuricWater.cs index 72135efa68..8f1e476b22 100644 --- a/Waters/SulphuricWater.cs +++ b/Waters/SulphuricWater.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Waters GeneralParticleHandler.SpawnParticle(acidFoam); } - if (tile.TileType != RustyChestTile.Type) + if (tile.TileType != RustyChestTile.TileType) { if (Main.dayTime && !Main.raining) { diff --git a/Waters/SunkenSeaBurrowsWater.cs b/Waters/SunkenSeaBurrowsWater.cs index 25be900b27..89c13859d4 100644 --- a/Waters/SunkenSeaBurrowsWater.cs +++ b/Waters/SunkenSeaBurrowsWater.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Waters { Vector3 outputColor = new Vector3(r, g, b); - if (tile.TileType != RustyChestTile.Type) + if (tile.TileType != RustyChestTile.TileType) { CalamityUtils.SunkenSeaWaterLighting(i, j, WaterGlowColor, ref outputColor.X, ref outputColor.Y, ref outputColor.Z); } diff --git a/Waters/SunkenSeaPolypWater.cs b/Waters/SunkenSeaPolypWater.cs index 7967539d7f..1aa13ee354 100644 --- a/Waters/SunkenSeaPolypWater.cs +++ b/Waters/SunkenSeaPolypWater.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Waters { Vector3 outputColor = new Vector3(r, g, b); - if (tile.TileType != RustyChestTile.Type) + if (tile.TileType != RustyChestTile.TileType) { CalamityUtils.SunkenSeaWaterLighting(i, j, WaterGlowColor, ref outputColor.X, ref outputColor.Y, ref outputColor.Z); } diff --git a/Waters/SunkenSeaReefsWater.cs b/Waters/SunkenSeaReefsWater.cs index e0db74851a..f30fd3a82b 100644 --- a/Waters/SunkenSeaReefsWater.cs +++ b/Waters/SunkenSeaReefsWater.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Waters { Vector3 outputColor = new Vector3(r, g, b); - if (tile.TileType != RustyChestTile.Type) + if (tile.TileType != RustyChestTile.TileType) { CalamityUtils.SunkenSeaWaterLighting(i, j, WaterGlowColor, ref outputColor.X, ref outputColor.Y, ref outputColor.Z); } diff --git a/Waters/SunkenSeaShoresWater.cs b/Waters/SunkenSeaShoresWater.cs index ae828a4fa8..1f34f44f61 100644 --- a/Waters/SunkenSeaShoresWater.cs +++ b/Waters/SunkenSeaShoresWater.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Waters { Vector3 outputColor = new Vector3(r, g, b); - if (tile.TileType != RustyChestTile.Type) + if (tile.TileType != RustyChestTile.TileType) { CalamityUtils.SunkenSeaWaterLighting(i, j, WaterGlowColor, ref outputColor.X, ref outputColor.Y, ref outputColor.Z); } diff --git a/World/GiantHive.cs b/World/GiantHive.cs index cca8d6cd37..b5fbcbd987 100644 --- a/World/GiantHive.cs +++ b/World/GiantHive.cs @@ -241,7 +241,7 @@ namespace CalamityMod.World } // Honey chests - Vector2 honeyChestLocation = default; + //Vector2 honeyChestLocation = default; //for (int l = 0; l < maxAttempts; l++) //{ // Vector2 newStructureLocation = larvaLocation; diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index fe847dcf80..f4d2c5f018 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -1547,7 +1547,7 @@ namespace CalamityMod.World if (caveNoiseMap * caveNoiseMap > caveCreationThreshold) { t.HasTile = false; - t.LiquidType = 1; + t.LiquidType = LiquidID.Lava; } float horizontalOffsetNoiseWallsinner = CalamityUtils.PerlinNoise2D(X / 80, Y / 80, 5, unchecked(cavePerlinSeedWalls + 1)) * 0.01f; @@ -1630,7 +1630,7 @@ namespace CalamityMod.World //get rid of water if (Main.tile[X, Y].LiquidType == LiquidID.Water) { - t.LiquidType = 1; + t.LiquidType = LiquidID.Lava; } //get rid of obsidian blocks @@ -1694,12 +1694,9 @@ namespace CalamityMod.World //Timeless Shores ambiant tiles if (Main.tile[X, Y].TileType == ModContent.TileType()) { - int Rand3() => WorldGen.genRand.Next(3); - int MediumShorePileVariants = Rand3(); - int Rand6() => WorldGen.genRand.Next(6); - int DriftwoodVariants = Rand6(); - int Rand9() => WorldGen.genRand.Next(9); - int ShorePileVariants = Rand9(); + int MediumShorePileVariants = WorldGen.genRand.Next(3); + int DriftwoodVariants = WorldGen.genRand.Next(6); + int ShorePileVariants = WorldGen.genRand.Next(9); //Driftwood Ambiance if (WorldGen.genRand.NextBool(100)) { @@ -1749,8 +1746,7 @@ namespace CalamityMod.World if (Main.tile[X, Y].TileType == ModContent.TileType()) { - int Rand6() => WorldGen.genRand.Next(6); - int DriftwoodVariants = Rand6(); + int DriftwoodVariants = WorldGen.genRand.Next(6); //Driftwood Ambiance if (WorldGen.genRand.NextBool(80)) { @@ -1771,8 +1767,7 @@ namespace CalamityMod.World //gleaming burrows ambient tiles if (Main.tile[X, Y].TileType == ModContent.TileType()) { - int Rand6() => WorldGen.genRand.Next(6); - int NavystonePileVariants = Rand6(); + int NavystonePileVariants = WorldGen.genRand.Next(6); //brain coral if (WorldGen.genRand.NextBool(30)) { @@ -1883,11 +1878,9 @@ namespace CalamityMod.World } if (Main.tile[X, Y].TileType == ModContent.TileType()) { - int Rand3() => WorldGen.genRand.Next(3); int TableCoralVariants = WorldGen.genRand.Next(3); int SpeleothemsVariants = WorldGen.genRand.Next(3); - int Rand6() => WorldGen.genRand.Next(6); - int NavystonePileVariants = Rand6(); + int NavystonePileVariants = WorldGen.genRand.Next(6); if (WorldGen.genRand.NextBool(30) && !Main.tile[X + 1, Y].HasTile) { @@ -1970,14 +1963,9 @@ namespace CalamityMod.World } if (Main.tile[X, Y].TileType == ModContent.TileType()) { - int Rand8() => WorldGen.genRand.Next(8); - int BranchCoralVariants = Rand8(); - - int Rand4() => WorldGen.genRand.Next(4); - int WideScarletSeagrassVariants = Rand4(); - - int Rand6() => WorldGen.genRand.Next(6); - int DriftwoodVariants = Rand6(); + int BranchCoralVariants = WorldGen.genRand.Next(8); + int WideScarletSeagrassVariants = WorldGen.genRand.Next(4); + int DriftwoodVariants = WorldGen.genRand.Next(6); //BranchCoralsOnSand if (WorldGen.genRand.NextBool(25)) @@ -2078,8 +2066,7 @@ namespace CalamityMod.World })); } - int Rand6() => WorldGen.genRand.Next(6); - int DriftwoodVariants = Rand6(); + int DriftwoodVariants = WorldGen.genRand.Next(6); //Driftwood Ambiance if (WorldGen.genRand.NextBool(30)) {