diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 177977fd31..892ac382ba 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4197,7 +4197,7 @@ namespace CalamityMod.CalPlayer } // Neither mirror can be used if either is on cooldown - if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GlobalDodgeCooldown)) && !eclipseMirrorCooldown && !abyssalMirrorCooldown) + if (!Cooldowns.Exists(cooldown => cooldown.GetType() == typeof(GlobalDodgeCooldown))) { if (eclipseMirror) { @@ -4294,7 +4294,7 @@ namespace CalamityMod.CalPlayer { if (player.whoAmI == Main.myPlayer && abyssalMirror && !abyssalMirrorCooldown && !eclipseMirror) { - Cooldowns.Add(new GlobalDodgeCooldown(MirrorDodgeCooldown, player)); + Cooldowns.Add(new GlobalDodgeCooldown(MirrorDodgeCooldown, player, "abyssmirror")); // TODO -- why is this here? player.noKnockback = true; @@ -4324,7 +4324,7 @@ namespace CalamityMod.CalPlayer { if (player.whoAmI == Main.myPlayer && eclipseMirror && !eclipseMirrorCooldown) { - Cooldowns.Add(new GlobalDodgeCooldown(MirrorDodgeCooldown, player)); + Cooldowns.Add(new GlobalDodgeCooldown(MirrorDodgeCooldown, player, "eclipsemirror")); // TODO -- why is this here? player.noKnockback = true; diff --git a/CalPlayer/CalamityPlayerNetcode.cs b/CalPlayer/CalamityPlayerNetcode.cs index f0481c2eaf..e5ca5b99df 100644 --- a/CalPlayer/CalamityPlayerNetcode.cs +++ b/CalPlayer/CalamityPlayerNetcode.cs @@ -153,7 +153,8 @@ namespace CalamityMod.CalPlayer internal void SyncCooldown(bool server, string cooldownID = "") { - //If no specific sync id is provided, sync all of the player's cooldowns. Ideally this doesn't happen though. Ideally. + //If no specific sync id is provided, sync all of the player's cooldowns. Ideally this doesn't happen though. Ideally. Do we even need it frankly? Like i guess we could call it on death but idk if it needs to be synced every frames since its + //Already being synced when it gets created and then when it expires if (cooldownID == "") { foreach (string key in CooldownIndicator.IDtoType.Keys) diff --git a/UI/CooldownIndicators/AbyssEvade.png b/UI/CooldownIndicators/AbyssEvade.png new file mode 100644 index 0000000000..4f96b246c6 Binary files /dev/null and b/UI/CooldownIndicators/AbyssEvade.png differ diff --git a/UI/CooldownIndicators/AbyssEvadeOutline.png b/UI/CooldownIndicators/AbyssEvadeOutline.png new file mode 100644 index 0000000000..83631ef9f0 Binary files /dev/null and b/UI/CooldownIndicators/AbyssEvadeOutline.png differ diff --git a/UI/CooldownIndicators/AbyssEvadeOverlay.png b/UI/CooldownIndicators/AbyssEvadeOverlay.png new file mode 100644 index 0000000000..c38a9b9c19 Binary files /dev/null and b/UI/CooldownIndicators/AbyssEvadeOverlay.png differ diff --git a/UI/CooldownIndicators/AbyssalMadness.png b/UI/CooldownIndicators/AbyssalMadness.png new file mode 100644 index 0000000000..a9b965bd42 Binary files /dev/null and b/UI/CooldownIndicators/AbyssalMadness.png differ diff --git a/UI/CooldownIndicators/AbyssalMadnessOutline.png b/UI/CooldownIndicators/AbyssalMadnessOutline.png new file mode 100644 index 0000000000..8a74a5867c Binary files /dev/null and b/UI/CooldownIndicators/AbyssalMadnessOutline.png differ diff --git a/UI/CooldownIndicators/AbyssalMadnessOverlay.png b/UI/CooldownIndicators/AbyssalMadnessOverlay.png new file mode 100644 index 0000000000..0e20ba7c5c Binary files /dev/null and b/UI/CooldownIndicators/AbyssalMadnessOverlay.png differ diff --git a/UI/CooldownIndicators/BrokenPlates.png b/UI/CooldownIndicators/BrokenPlates.png new file mode 100644 index 0000000000..8e1026c057 Binary files /dev/null and b/UI/CooldownIndicators/BrokenPlates.png differ diff --git a/UI/CooldownIndicators/BrokenPlatesOutline.png b/UI/CooldownIndicators/BrokenPlatesOutline.png new file mode 100644 index 0000000000..64eecea7e1 Binary files /dev/null and b/UI/CooldownIndicators/BrokenPlatesOutline.png differ diff --git a/UI/CooldownIndicators/BrokenPlatesOverlay.png b/UI/CooldownIndicators/BrokenPlatesOverlay.png new file mode 100644 index 0000000000..82a575537e Binary files /dev/null and b/UI/CooldownIndicators/BrokenPlatesOverlay.png differ diff --git a/UI/CooldownIndicators/Cooldowns.cs b/UI/CooldownIndicators/Cooldowns.cs index 0f130989a1..0f3cfb5f71 100644 --- a/UI/CooldownIndicators/Cooldowns.cs +++ b/UI/CooldownIndicators/Cooldowns.cs @@ -28,12 +28,42 @@ namespace CalamityMod.UI.CooldownIndicators public override string SyncID => "GlobalDodge"; public override bool DisplayMe => true; public override string Name => "Dodge Cooldown"; - public override string Texture => "CalamityMod/UI/CooldownIndicators/GlobalDodge"; - public override Color CooldownColorStart => Color.CornflowerBlue; + public override string Texture => "CalamityMod/UI/CooldownIndicators/" + skinTexture; + public override Color OutlineColor => outlineColor; + public override Color CooldownColorStart => cooldownColorStart; + public override Color CooldownColorEnd => cooldownColorEnd; + //It's the same cooldown with different skins each time, basically. + public string skinTexture; + public Color outlineColor; + public Color cooldownColorStart; + public Color cooldownColorEnd; - public GlobalDodgeCooldown(int duration, Player player) : base(duration, player) + public GlobalDodgeCooldown(int duration, Player player, string skin = "default") : base(duration, player) { + switch (skin) + { + case "abyssmirror": + skinTexture = "AbyssEvade"; + outlineColor = new Color(125, 157, 149); + cooldownColorStart = new Color(167, 147, 151); + cooldownColorEnd = new Color(217, 209, 195); + break; + + case "eclipsemirror": + skinTexture = "EclipseEvade"; + outlineColor = new Color(152, 206, 248); + cooldownColorStart = new Color(255, 192, 71); + cooldownColorEnd = new Color(255, 255, 151); + break; + + default: + skinTexture = "GlobalDodge"; + outlineColor = Color.White; + cooldownColorStart = Color.CornflowerBlue; + cooldownColorEnd = Color.White; + break; + } } } diff --git a/UI/CooldownIndicators/CounterScarf.png b/UI/CooldownIndicators/CounterScarf.png new file mode 100644 index 0000000000..fee8b582e6 Binary files /dev/null and b/UI/CooldownIndicators/CounterScarf.png differ diff --git a/UI/CooldownIndicators/CounterScarfOutline.png b/UI/CooldownIndicators/CounterScarfOutline.png new file mode 100644 index 0000000000..0596f400e9 Binary files /dev/null and b/UI/CooldownIndicators/CounterScarfOutline.png differ diff --git a/UI/CooldownIndicators/CounterScarfOverlay.png b/UI/CooldownIndicators/CounterScarfOverlay.png new file mode 100644 index 0000000000..15dc82cc57 Binary files /dev/null and b/UI/CooldownIndicators/CounterScarfOverlay.png differ diff --git a/UI/CooldownIndicators/EclipseEvade.png b/UI/CooldownIndicators/EclipseEvade.png new file mode 100644 index 0000000000..04f9364317 Binary files /dev/null and b/UI/CooldownIndicators/EclipseEvade.png differ diff --git a/UI/CooldownIndicators/EclipseEvadeOutline.png b/UI/CooldownIndicators/EclipseEvadeOutline.png new file mode 100644 index 0000000000..c607d42282 Binary files /dev/null and b/UI/CooldownIndicators/EclipseEvadeOutline.png differ diff --git a/UI/CooldownIndicators/EclipseEvadeOverlay.png b/UI/CooldownIndicators/EclipseEvadeOverlay.png new file mode 100644 index 0000000000..2f0ea83ee4 Binary files /dev/null and b/UI/CooldownIndicators/EclipseEvadeOverlay.png differ diff --git a/UI/CooldownIndicators/EvasionScarf.png b/UI/CooldownIndicators/EvasionScarf.png new file mode 100644 index 0000000000..a16d008d6d Binary files /dev/null and b/UI/CooldownIndicators/EvasionScarf.png differ diff --git a/UI/CooldownIndicators/EvasionScarfOutline.png b/UI/CooldownIndicators/EvasionScarfOutline.png new file mode 100644 index 0000000000..0a5abd0edd Binary files /dev/null and b/UI/CooldownIndicators/EvasionScarfOutline.png differ diff --git a/UI/CooldownIndicators/EvasionScarfOverlay.png b/UI/CooldownIndicators/EvasionScarfOverlay.png new file mode 100644 index 0000000000..9c00f719ed Binary files /dev/null and b/UI/CooldownIndicators/EvasionScarfOverlay.png differ diff --git a/UI/CooldownIndicators/GodslayerDash.png b/UI/CooldownIndicators/GodslayerDash.png new file mode 100644 index 0000000000..20915cc7d5 Binary files /dev/null and b/UI/CooldownIndicators/GodslayerDash.png differ diff --git a/UI/CooldownIndicators/GodslayerDashOutline.png b/UI/CooldownIndicators/GodslayerDashOutline.png new file mode 100644 index 0000000000..5c6ee4f97e Binary files /dev/null and b/UI/CooldownIndicators/GodslayerDashOutline.png differ diff --git a/UI/CooldownIndicators/GodslayerDashOverlay.png b/UI/CooldownIndicators/GodslayerDashOverlay.png new file mode 100644 index 0000000000..465538cb08 Binary files /dev/null and b/UI/CooldownIndicators/GodslayerDashOverlay.png differ diff --git a/UI/CooldownIndicators/InkBomb.png b/UI/CooldownIndicators/InkBomb.png new file mode 100644 index 0000000000..e38a89b665 Binary files /dev/null and b/UI/CooldownIndicators/InkBomb.png differ diff --git a/UI/CooldownIndicators/InkBombOutline.png b/UI/CooldownIndicators/InkBombOutline.png new file mode 100644 index 0000000000..473ec7e989 Binary files /dev/null and b/UI/CooldownIndicators/InkBombOutline.png differ diff --git a/UI/CooldownIndicators/InkBombOverlay.png b/UI/CooldownIndicators/InkBombOverlay.png new file mode 100644 index 0000000000..fb15dbe57d Binary files /dev/null and b/UI/CooldownIndicators/InkBombOverlay.png differ diff --git a/UI/CooldownIndicators/LionHeartShield.png b/UI/CooldownIndicators/LionHeartShield.png new file mode 100644 index 0000000000..9ba7f60f63 Binary files /dev/null and b/UI/CooldownIndicators/LionHeartShield.png differ diff --git a/UI/CooldownIndicators/LionHeartShieldOutline.png b/UI/CooldownIndicators/LionHeartShieldOutline.png new file mode 100644 index 0000000000..84f07755d0 Binary files /dev/null and b/UI/CooldownIndicators/LionHeartShieldOutline.png differ diff --git a/UI/CooldownIndicators/LionHeartShieldOverlay.png b/UI/CooldownIndicators/LionHeartShieldOverlay.png new file mode 100644 index 0000000000..975844ee87 Binary files /dev/null and b/UI/CooldownIndicators/LionHeartShieldOverlay.png differ diff --git a/UI/CooldownIndicators/PermafrostConcoction.png b/UI/CooldownIndicators/PermafrostConcoction.png new file mode 100644 index 0000000000..51f81d9411 Binary files /dev/null and b/UI/CooldownIndicators/PermafrostConcoction.png differ diff --git a/UI/CooldownIndicators/PermafrostConcoctionOutline.png b/UI/CooldownIndicators/PermafrostConcoctionOutline.png new file mode 100644 index 0000000000..ca3cb96ce2 Binary files /dev/null and b/UI/CooldownIndicators/PermafrostConcoctionOutline.png differ diff --git a/UI/CooldownIndicators/PermafrostConcoctionOverlay.png b/UI/CooldownIndicators/PermafrostConcoctionOverlay.png new file mode 100644 index 0000000000..33a1445533 Binary files /dev/null and b/UI/CooldownIndicators/PermafrostConcoctionOverlay.png differ diff --git a/UI/CooldownIndicators/SandCloak.png b/UI/CooldownIndicators/SandCloak.png new file mode 100644 index 0000000000..fbed9180de Binary files /dev/null and b/UI/CooldownIndicators/SandCloak.png differ diff --git a/UI/CooldownIndicators/SandCloakOutline.png b/UI/CooldownIndicators/SandCloakOutline.png new file mode 100644 index 0000000000..cdc2b73bc5 Binary files /dev/null and b/UI/CooldownIndicators/SandCloakOutline.png differ diff --git a/UI/CooldownIndicators/SandCloakOverlay.png b/UI/CooldownIndicators/SandCloakOverlay.png new file mode 100644 index 0000000000..2aeea5d3d9 Binary files /dev/null and b/UI/CooldownIndicators/SandCloakOverlay.png differ diff --git a/UI/CooldownIndicators/SilvaRevive.png b/UI/CooldownIndicators/SilvaRevive.png new file mode 100644 index 0000000000..5bb18752d8 Binary files /dev/null and b/UI/CooldownIndicators/SilvaRevive.png differ diff --git a/UI/CooldownIndicators/SilvaReviveOutline.png b/UI/CooldownIndicators/SilvaReviveOutline.png new file mode 100644 index 0000000000..ab41cab47f Binary files /dev/null and b/UI/CooldownIndicators/SilvaReviveOutline.png differ diff --git a/UI/CooldownIndicators/SilvaReviveOverlay.png b/UI/CooldownIndicators/SilvaReviveOverlay.png new file mode 100644 index 0000000000..86ec5fef87 Binary files /dev/null and b/UI/CooldownIndicators/SilvaReviveOverlay.png differ