-
Notifications
You must be signed in to change notification settings - Fork 101
Dont show patching menu unless user specifically enables it. #1282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,7 @@ public class MainViewModel : BaseNotifyPropertyChanged, IChangeModEnableState | |
| private bool _panaceaSoundDebugEnabled; | ||
| private bool _panaceaCacheEnabled; | ||
| private bool _panaceaQuickMenuEnabled; | ||
| private bool _devView; | ||
| private bool _enablePatching; | ||
| private bool _autoUpdateMods = false; | ||
| private string _launchGame = "kh2"; | ||
| private List<string> _supportedGames = new List<string>() | ||
|
|
@@ -126,8 +126,7 @@ public ModViewModel SelectedValue | |
|
|
||
| public Visibility IsModInfoVisible => IsModSelected ? Visibility.Visible : Visibility.Collapsed; | ||
| public Visibility IsModUnselectedMessageVisible => !IsModSelected ? Visibility.Visible : Visibility.Collapsed; | ||
| public Visibility PatchVisible => PC && !PanaceaInstalled || PC && DevView ? Visibility.Visible : Visibility.Collapsed; | ||
| public Visibility ModLoader => !PC || PanaceaInstalled ? Visibility.Visible : Visibility.Collapsed; | ||
| public Visibility PatchVisible => PC && EnablePatching ? Visibility.Visible : Visibility.Collapsed; | ||
| public Visibility notPC => !PC ? Visibility.Visible : Visibility.Collapsed; | ||
| public Visibility isPC => PC ? Visibility.Visible : Visibility.Collapsed; | ||
| public bool GameSelectInteractable => (PC && Directory.Exists(ConfigurationService.PcReleaseLocation)) || (PCSX2 && MultiEmuGames); | ||
|
|
@@ -229,13 +228,13 @@ public bool PanaceaQuickMenuEnabled | |
| UpdatePanaceaSettings(); | ||
| } | ||
| } | ||
| public bool DevView | ||
| public bool EnablePatching | ||
| { | ||
| get => _devView; | ||
| get => _enablePatching; | ||
| set | ||
| { | ||
| _devView = value; | ||
| ConfigurationService.DevView = DevView; | ||
| _enablePatching = value; | ||
| ConfigurationService.EnablePatching = EnablePatching; | ||
| OnPropertyChanged(nameof(PatchVisible)); | ||
| } | ||
| } | ||
|
Comment on lines
+231
to
240
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
file="OpenKh.Tools.ModsManager/ViewModels/MainViewModel.cs"
printf '%s\n' '--- target file context ---'
sed -n '200,260p' "$file"
sed -n '350,420p' "$file"
printf '%s\n' '--- EnablePatching and wizard references ---'
rg -n -C 4 'EnablePatching|WizardCommand|PCSX2|PanaceaInstalled|PatchVisible' "$file"Repository: OpenKH/OpenKh Length of output: 20376 🏁 Script executed: #!/bin/bash
set -eu
file="OpenKh.Tools.ModsManager/ViewModels/MainViewModel.cs"
printf '%s\n' '--- wizard command ---'
sed -n '630,735p' "$file"
printf '%s\n' '--- property backing fields and notification implementation ---'
rg -n -C 3 '_enablePatching|OnPropertyChanged|INotifyPropertyChanged' "$file"
printf '%s\n' '--- bindings for EnablePatching and PatchVisible ---'
rg -n -C 3 'EnablePatching|PatchVisible' -g '*.xaml' -g '*.cs' .Repository: OpenKH/OpenKh Length of output: 20902 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
path = Path("OpenKh.Tools.ModsManager/ViewModels/MainViewModel.cs")
text = path.read_text()
constructor_pc = "EnablePatching = ConfigurationService.EnablePatching;"
wizard_pc = """PC = true;
PCSX2 = false;
PanaceaInstalled = ConfigurationService.PanaceaInstalled;"""
print("constructor PC branch loads EnablePatching:", text.count(constructor_pc) >= 1)
print("wizard PC branch contains persisted EnablePatching load:",
wizard_pc + "\n EnablePatching = ConfigurationService.EnablePatching;" in text)
print("EnablePatching setter notifies EnablePatching:",
"OnPropertyChanged(nameof(EnablePatching));" in text[text.index("public bool EnablePatching"):text.index("public bool AutoUpdateMods")])
print("EnablePatching setter notifies PatchVisible:",
"OnPropertyChanged(nameof(PatchVisible));" in text[text.index("public bool EnablePatching"):text.index("public bool AutoUpdateMods")])
PYRepository: OpenKH/OpenKh Length of output: 366 Reload When the app starts in PCSX2 mode, the wizard's PC branch does not load 🤖 Prompt for AI Agents |
||
|
|
@@ -255,7 +254,6 @@ public bool PanaceaInstalled | |
| { | ||
| _panaceaInstalled = value; | ||
| OnPropertyChanged(nameof(PatchVisible)); | ||
| OnPropertyChanged(nameof(ModLoader)); | ||
| OnPropertyChanged(nameof(PanaceaSettings)); | ||
| } | ||
| } | ||
|
|
@@ -267,7 +265,6 @@ public bool PC | |
| { | ||
| _pc = value; | ||
| OnPropertyChanged(nameof(PC)); | ||
| OnPropertyChanged(nameof(ModLoader)); | ||
| OnPropertyChanged(nameof(PatchVisible)); | ||
| OnPropertyChanged(nameof(notPC)); | ||
| OnPropertyChanged(nameof(isPC)); | ||
|
|
@@ -284,7 +281,6 @@ public bool PCSX2 | |
| { | ||
| _pcsx2 = value; | ||
| OnPropertyChanged(nameof(PCSX2)); | ||
| OnPropertyChanged(nameof(ModLoader)); | ||
| OnPropertyChanged(nameof(PatchVisible)); | ||
| OnPropertyChanged(nameof(notPC)); | ||
| OnPropertyChanged(nameof(isPC)); | ||
|
|
@@ -390,7 +386,7 @@ public MainViewModel() | |
| PC = true; | ||
| PCSX2 = false; | ||
| PanaceaInstalled = ConfigurationService.PanaceaInstalled; | ||
| DevView = ConfigurationService.DevView; | ||
| EnablePatching = ConfigurationService.EnablePatching; | ||
| _panaceaConsoleEnabled = ConfigurationService.ShowConsole; | ||
| _panaceaDebugLogEnabled = ConfigurationService.DebugLog; | ||
| _panaceaSoundDebugEnabled = ConfigurationService.SoundDebug; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: OpenKH/OpenKh
Length of output: 151
🏁 Script executed:
Repository: OpenKH/OpenKh
Length of output: 18394
🏁 Script executed:
Repository: OpenKH/OpenKh
Length of output: 8433
🏁 Script executed:
Repository: OpenKH/OpenKh
Length of output: 739
🏁 Script executed:
Repository: OpenKH/OpenKh
Length of output: 7414
Migrate
devViewtoenablePatchingfor existing configurations.Configignores unmatched YAML keys, so existingdevView: truevalues load asfalse; no migration path exists. Preserve the value whenenablePatchingis absent, or document the intentional reset. NoDevViewreferences remain.🤖 Prompt for AI Agents