refactor(plugins): プラグイン管理UIのグループ化表示および特定ゲーム専用プラグインの分離に対応

- ModPluginDefinition に IsGameSpecific, TargetGameKey, GroupName, DefaultEnabled を追加
- プリンセスシナジー専用プラグイン(AlwaysMaxHp/AlwaysMaxMp)を一般ゲーム一覧から除外し対象ゲーム限定で表示
- TkoolGameItem のプラグイン一覧を CommonPluginOptions と SpecificPluginOptions に分離
- プラグイン設定Expander内に「共通プラグイン」と「固有ゲーム専用プラグイン」のグループ分けUIを実装
- 右側詳細パネルのレイアウトを改善し、起動ボタンを上部固定したまま下部設定のみを開閉可能に変更
- 不要な旧プラグイン GameLauncher_Mod.js の削除および読み込み除外処理を徹底
This commit is contained in:
armonica committed 2026-10-09 10:48:20 +09:00
1 parent c0989362a9
commit 6f98860892
8 files changed
+273 -198

No files matched your search

+34 -4
View File
@@ -17,6 +17,18 @@ namespace GameLauncher.Models
public string FileName { get; set; } = string.Empty; // ファイル名 (例: "BattleSpeedUp.js")
public string FilePath { get; set; } = string.Empty; // フルパス
/// <summary>特定ゲーム専用プラグインかどうか</summary>
public bool IsGameSpecific { get; set; }
/// <summary>対象ゲーム識別子 (例: "PrincessSynergy")</summary>
public string TargetGameKey { get; set; } = string.Empty;
/// <summary>表示用グループ名</summary>
public string GroupName { get; set; } = "共通機能";
/// <summary>初期チェックの既定値 (未設定時の初期値)</summary>
public bool DefaultEnabled { get; set; } = true;
/// <summary>
/// .js ファイルから定義情報を解析・生成します。
/// </summary>
@@ -38,6 +50,16 @@ namespace GameLauncher.Models
catch { }
string displayName = GetFriendlyName(id, desc);
bool isSpecific = id is "AlwaysMaxHp" or "AlwaysMaxMp";
string targetKey = isSpecific ? "PrincessSynergy" : string.Empty;
string groupName = isSpecific ? "固有ゲーム専用プラグイン" : "共通プラグイン";
bool defEnabled = id switch
{
"ShopMaxBuy" => false,
"AlwaysMaxHp" => false,
"AlwaysMaxMp" => false,
_ => true
};
return new ModPluginDefinition
{
@@ -45,7 +67,11 @@ namespace GameLauncher.Models
Name = displayName,
Description = desc,
FileName = fileName,
FilePath = filePath
FilePath = filePath,
IsGameSpecific = isSpecific,
TargetGameKey = targetKey,
GroupName = groupName,
DefaultEnabled = defEnabled
};
}
@@ -65,6 +91,8 @@ namespace GameLauncher.Models
"GoldGainMax" => "所持金増減時MAX (9999999G)",
"ExpGainMax" => "経験値獲得時MAX (一気にLv99)",
"MessageInstant" => "メッセージ瞬間表示 (ウェイトスキップ)",
"AlwaysMaxHp" => "HP常時MAX (プリンセスシナジー専用)",
"AlwaysMaxMp" => "MP常時MAX (プリンセスシナジー専用)",
_ => !string.IsNullOrEmpty(desc) ? $"{id} ({desc})" : id
};
}
@@ -78,9 +106,11 @@ namespace GameLauncher.Models
private bool _isEnabled = true;
public ModPluginDefinition Definition { get; set; } = null!;
public string Id => Definition.Id;
public string Name => Definition.Name;
public string Description => Definition.Description;
public string Id => this.Definition.Id;
public string Name => this.Definition.Name;
public string Description => this.Definition.Description;
public string GroupName => this.Definition.GroupName;
public bool IsGameSpecific => this.Definition.IsGameSpecific;
public bool IsEnabled
{