Cooldown Rack display config is now enum
Updated to expanded config options
This commit is contained in:
1 parent
783e08b1a3
commit
1dc7c3b8c6
5 files changed
+56
-29
No files matched your search
+2
-8
@@ -108,12 +108,8 @@ namespace CalamityMod
|
||||
public bool DebuffDisplay { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 2f)]
|
||||
[DefaultValue(2f)]
|
||||
[Increment(1f)]
|
||||
[DrawTicks]
|
||||
public float CooldownDisplay { get; set; }
|
||||
[DefaultValue(CooldownDisplayOptions.Full)]
|
||||
public CooldownDisplayOptions CooldownDisplay { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
@@ -264,8 +260,6 @@ namespace CalamityMod
|
||||
public bool FasterFallHotkey { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[DrawTicks]
|
||||
[DefaultValue(SetBonusDoubleTapOptions.Auto)]
|
||||
public SetBonusDoubleTapOptions SetBonusDoubleTap { get; set; }
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using Terraria.ModLoader.Config;
|
||||
|
||||
namespace CalamityMod.Enums
|
||||
{
|
||||
public enum CooldownDisplayOptions
|
||||
{
|
||||
Full,
|
||||
Compact,
|
||||
Hidden
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,8 @@ namespace CalamityMod.Enums
|
||||
{
|
||||
public enum SetBonusDoubleTapOptions
|
||||
{
|
||||
[LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.On")]
|
||||
On,
|
||||
[LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.Auto")]
|
||||
Auto,
|
||||
[LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.Off")]
|
||||
Off
|
||||
}
|
||||
}
|
||||
@@ -79,11 +79,7 @@ CalamityClientConfig: {
|
||||
|
||||
CooldownDisplay: {
|
||||
Label: "[i:CalamityMod/NebulousCore] Cooldown Rack Display Mode"
|
||||
Tooltip:
|
||||
'''
|
||||
Adds the Cooldown Rack which displays all important cooldowns right underneath buffs and debuffs.
|
||||
Set this to 1 to display the Cooldown Rack in compact mode, and to 0 to hide it entirely.
|
||||
'''
|
||||
Tooltip: Adds the Cooldown Rack which displays all important cooldowns right underneath buffs and debuffs.
|
||||
}
|
||||
|
||||
DebuffDisplay: {
|
||||
@@ -252,17 +248,7 @@ CalamityClientConfig: {
|
||||
|
||||
SetBonusDoubleTap: {
|
||||
Label: "[i:VortexHelmet] Allow Double Tap for Armor Set Bonuses"
|
||||
Tooltip:
|
||||
'''
|
||||
Allows all armor set bonuses to be triggered by the vanilla double-tap {$Key.DOWN} hotkey (or {$Key.UP} depending on your settings).
|
||||
Set to Auto to automatically turn off double-tap as long as Calamity's {$Keybinds.ArmorSetBonus.DisplayName} hotkey is bound.
|
||||
'''
|
||||
|
||||
Options: {
|
||||
On: Always On
|
||||
Auto: Auto
|
||||
Off: Always Off
|
||||
}
|
||||
Tooltip: Allows all armor set bonuses to be triggered by the vanilla double-tap {$Key.DOWN} hotkey (or {$Key.UP} depending on your settings).
|
||||
}
|
||||
|
||||
ShopNewAlert: {
|
||||
@@ -572,3 +558,41 @@ CalamityServerConfig: {
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
CooldownDisplayOptions: {
|
||||
Tooltip: ""
|
||||
|
||||
Full: {
|
||||
Label: Full
|
||||
Tooltip: Displays a circular bar around an icon which indicates cooldown duration
|
||||
}
|
||||
|
||||
Compact: {
|
||||
Label: Compact
|
||||
Tooltip: Displays a gradient over an icon which indicates cooldown duration
|
||||
}
|
||||
|
||||
Hidden: {
|
||||
Label: Hidden
|
||||
Tooltip: ""
|
||||
}
|
||||
}
|
||||
|
||||
SetBonusDoubleTapOptions: {
|
||||
Tooltip: ""
|
||||
|
||||
On: {
|
||||
Label: Always On
|
||||
Tooltip: Always enables double-tap. Can be used in conjunction with Calamity's {$Keybinds.ArmorSetBonus.DisplayName} hotkey.
|
||||
}
|
||||
|
||||
Auto: {
|
||||
Label: Auto
|
||||
Tooltip: Automatically turns off double-tap as long as Calamity's {$Keybinds.ArmorSetBonus.DisplayName} hotkey is bound.
|
||||
}
|
||||
|
||||
Off: {
|
||||
Label: Always Off
|
||||
Tooltip: Always disables double-tap. Can be used to completely disable set bonus activation.
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Enums;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -19,7 +20,7 @@ namespace CalamityMod.UI
|
||||
get
|
||||
{
|
||||
// Option 1: Always use compact icons if configured to do so.
|
||||
if (CalamityClientConfig.Instance.CooldownDisplay == 1)
|
||||
if (CalamityClientConfig.Instance.CooldownDisplay == CooldownDisplayOptions.Compact)
|
||||
return true;
|
||||
|
||||
// Option 2: If there are too many cooldowns, auto switch to compact mode.
|
||||
@@ -43,7 +44,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 || CalamityClientConfig.Instance.CooldownDisplay < 1)
|
||||
if (Main.gameMenu || Main.playerInventory || CalamityClientConfig.Instance.CooldownDisplay == CooldownDisplayOptions.Hidden)
|
||||
return;
|
||||
|
||||
IList<CooldownInstance> cooldownsToDraw = Main.LocalPlayer.GetDisplayedCooldowns();
|
||||
|
||||
Reference in new issue
Block a user