small fixes + new util
This commit is contained in:
1 parent
193a1e3593
commit
6bd8325bde
2 files changed
+13
No files matched your search
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using CalamityMod.Systems.Collections;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.GameInput;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod
|
||||
@@ -212,5 +214,14 @@ namespace CalamityMod
|
||||
|
||||
return CalamityKeybinds.AccessoryKeybinds[keybindToUse];
|
||||
}
|
||||
|
||||
public static bool HasBoundDynamicHotkey(this Item item)
|
||||
{
|
||||
var h = item.GetDynamicModHotkey();
|
||||
if (h == null) return false;
|
||||
if (h?.GetAssignedKeysOrEmpty(PlayerInput.CurrentInputMode).Count() == 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -314,6 +314,8 @@ namespace CalamityMod
|
||||
|
||||
try
|
||||
{
|
||||
if (mode == InputMode.Mouse)
|
||||
mode = InputMode.Keyboard;
|
||||
return keybind.GetAssignedKeys(mode);
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in new issue
Block a user