Skip to content

Commit b293137

Browse files
committed
bugfix, make Hotkeys static.... previous bugs seem actually due to hot reload, so no need to fix
1 parent c0ac009 commit b293137

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Entities/SimplifiedSpinner.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ private static void OnLoadLevel(On.Celeste.Level.orig_LoadLevel orig, Level self
114114
}
115115

116116
private static void OnLevelAddEntity(On.Monocle.EntityList.orig_UpdateLists orig, EntityList self) {
117-
if (self.Scene is Level) {
118-
AddingEntities |= self.ToAdd is { } var && var.Count > 0;
119-
}
117+
/* if (self.Scene is Level) {
118+
AddingEntities |= self.ToAdd.Count > 0;
119+
}*/
120120
orig(self);
121121
}
122122

Module/TASHelperSettings.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,19 +438,20 @@ public ButtonBinding KeyPixelGridWidth {
438438

439439
private Hotkey PixelGridWidthHotkey { get; set; } = new Hotkey(keyPixelGridWidth.Keys, keyPixelGridWidth.Buttons, true, false);
440440

441-
private List<Hotkey> Hotkeys = new();
441+
private static List<Hotkey> Hotkeys;
442442

443443
public bool SettingsHotkeysPressed() {
444444
if (Engine.Scene is not Level level) {
445445
return false;
446446
}
447447
bool updateKey = true;
448448
bool updateButton = true;
449-
bool InOuiOptionsMenu = TASHelperMenu.mainItem?.Container?.Focused is bool b && b;
450-
if (InOuiOptionsMenu || level.Tracker.GetEntity<KeyboardConfigUI>() is not null || (level.Tracker.Entities.TryGetValue(typeof(ModuleSettingsKeyboardConfigUIExt), out var list) && list.Count > 0)) {
449+
bool InOuiModOption = TASHelperMenu.mainItem?.Container?.Focused is bool b && b;
450+
if (InOuiModOption || level.Tracker.GetEntity<KeyboardConfigUI>() is not null ||
451+
(level.Tracker.Entities.TryGetValue(typeof(ModuleSettingsKeyboardConfigUIExt), out var list) && list.Count > 0)) {
451452
updateKey = false;
452453
}
453-
if (InOuiOptionsMenu || level.Tracker.GetEntity<ButtonConfigUI>() is not null) {
454+
if (InOuiModOption || level.Tracker.GetEntity<ButtonConfigUI>() is not null) {
454455
updateButton = false;
455456
}
456457
foreach (Hotkey hotkey in Hotkeys) {

0 commit comments

Comments
 (0)