mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
fix helper method returning null if no keybind
This commit is contained in:
1 parent
b19a0178ad
commit
705ef64b4d
1 file changed
+2
-2
@@ -33,11 +33,11 @@ public static class KeybindUtils
|
||||
/// </summary>
|
||||
/// <param name="actionId">The action ID.</param>
|
||||
/// <returns>The keyboard keycode.</returns>
|
||||
public static KeyboardKeyCode? GetKeycodeByActionId(int actionId)
|
||||
public static KeyboardKeyCode GetKeycodeByActionId(int actionId)
|
||||
{
|
||||
var player = ReInput.players.GetPlayer(0);
|
||||
return player.controllers.maps.GetFirstElementMapWithAction(ControllerType.Keyboard, actionId, false)?
|
||||
.keyboardKeyCode;
|
||||
.keyboardKeyCode ?? KeyboardKeyCode.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user