Skip to content

Commit e66f349

Browse files
authored
Merge pull request #21 from apple1417/master
fix keybinds not setting is_enabled
2 parents d707f44 + 7262b18 commit e66f349

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## v3.3: (Upcoming)
4+
5+
### Keybinds v1.1
6+
- Updated with new `mods_base` keybind interface, fixing that `is_enabled` wasn't being set.
7+
8+
### [Mods Base v1.7](https://github.com/bl-sdk/mods_base/blob/master/Readme.md#v17)
9+
> - Changed the functions the keybind implementation should overwrite from `KeybindType.enable` to
10+
> `KeybindType._enable` (+ same for disable). These functions don't need to set `is_enabled`.
11+
312
## v3.2: Razorback
413

514
### Legacy Compat v1.1

src/keybinds/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"__version_info__",
1717
)
1818

19-
__version_info__: tuple[int, int] = (1, 0)
19+
__version_info__: tuple[int, int] = (1, 1)
2020
__version__: str = f"{__version_info__[0]}.{__version_info__[1]}"
2121
__author__: str = "bl-sdk"
2222

@@ -49,16 +49,16 @@ def ui_interaction_input_key(
4949
ui_interaction_input_key.enable()
5050

5151

52-
@wraps(KeybindType.enable)
52+
@wraps(KeybindType._enable) # pyright: ignore[reportPrivateUsage]
5353
def enable_keybind(self: KeybindType) -> None:
5454
if self not in active_keybinds:
5555
active_keybinds.append(self)
5656

5757

58-
@wraps(KeybindType.disable)
58+
@wraps(KeybindType._disable) # pyright: ignore[reportPrivateUsage]
5959
def disable_keybind(self: KeybindType) -> None:
6060
active_keybinds.remove(self)
6161

6262

63-
KeybindType.enable = enable_keybind
64-
KeybindType.disable = disable_keybind
63+
KeybindType._enable = enable_keybind # pyright: ignore[reportPrivateUsage]
64+
KeybindType._disable = disable_keybind # pyright: ignore[reportPrivateUsage]

src/mods_base

0 commit comments

Comments
 (0)