refactor(plugins): プラグイン管理UIのグループ化表示および特定ゲーム専用プラグインの分離に対応
- ModPluginDefinition に IsGameSpecific, TargetGameKey, GroupName, DefaultEnabled を追加 - プリンセスシナジー専用プラグイン(AlwaysMaxHp/AlwaysMaxMp)を一般ゲーム一覧から除外し対象ゲーム限定で表示 - TkoolGameItem のプラグイン一覧を CommonPluginOptions と SpecificPluginOptions に分離 - プラグイン設定Expander内に「共通プラグイン」と「固有ゲーム専用プラグイン」のグループ分けUIを実装 - 右側詳細パネルのレイアウトを改善し、起動ボタンを上部固定したまま下部設定のみを開閉可能に変更 - 不要な旧プラグイン GameLauncher_Mod.js の削除および読み込み除外処理を徹底
This commit is contained in:
1 parent
c0989362a9
commit
6f98860892
8 files changed
+273
-198
No files matched your search
@@ -615,27 +615,46 @@ namespace GameLauncher.Engines.Tkool
|
|||||||
|
|
||||||
private Dictionary<string, bool> _pluginSettings = new(StringComparer.OrdinalIgnoreCase);
|
private Dictionary<string, bool> _pluginSettings = new(StringComparer.OrdinalIgnoreCase);
|
||||||
private ObservableCollection<ModPluginOptionItem> _pluginOptions = [];
|
private ObservableCollection<ModPluginOptionItem> _pluginOptions = [];
|
||||||
|
private ObservableCollection<ModPluginOptionItem> _commonPluginOptions = [];
|
||||||
|
private ObservableCollection<ModPluginOptionItem> _specificPluginOptions = [];
|
||||||
|
|
||||||
public Dictionary<string, bool> PluginSettings
|
public Dictionary<string, bool> PluginSettings
|
||||||
{
|
{
|
||||||
get => _pluginSettings;
|
get => this._pluginSettings;
|
||||||
set { if (_pluginSettings != value) { _pluginSettings = value; OnPropertyChanged(); } }
|
set { if (this._pluginSettings != value) { this._pluginSettings = value; this.OnPropertyChanged(); } }
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ObservableCollection<ModPluginOptionItem> PluginOptions
|
public override ObservableCollection<ModPluginOptionItem> PluginOptions
|
||||||
{
|
{
|
||||||
get => _pluginOptions;
|
get => this._pluginOptions;
|
||||||
set { if (_pluginOptions != value) { _pluginOptions = value; OnPropertyChanged(); } }
|
set { if (this._pluginOptions != value) { this._pluginOptions = value; this.OnPropertyChanged(); } }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>共通プラグイン設定コレクション</summary>
|
||||||
|
public ObservableCollection<ModPluginOptionItem> CommonPluginOptions
|
||||||
|
{
|
||||||
|
get => this._commonPluginOptions;
|
||||||
|
set { if (this._commonPluginOptions != value) { this._commonPluginOptions = value; this.OnPropertyChanged(); } }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>固有ゲーム専用プラグイン設定コレクション</summary>
|
||||||
|
public ObservableCollection<ModPluginOptionItem> SpecificPluginOptions
|
||||||
|
{
|
||||||
|
get => this._specificPluginOptions;
|
||||||
|
set { if (this._specificPluginOptions != value) { this._specificPluginOptions = value; this.OnPropertyChanged(); } }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>固有ゲーム専用プラグインが存在するかどうか</summary>
|
||||||
|
public bool HasSpecificPlugins => this._specificPluginOptions.Count > 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// プリンセスシナジー専用: HP常時MAX(プラグイン "AlwaysMaxHp")の有効状態。
|
/// プリンセスシナジー専用: HP常時MAX(プラグイン "AlwaysMaxHp")の有効状態。
|
||||||
/// PluginSettings に直接マッピングされ、既存の改造適用パイプラインで反映されます。
|
/// PluginSettings に直接マッピングされ、既存の改造適用パイプラインで反映されます。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool PrincessAlwaysMaxHp
|
public bool PrincessAlwaysMaxHp
|
||||||
{
|
{
|
||||||
get => IsPluginEnabled("AlwaysMaxHp", fallbackVal: false);
|
get => this.IsPluginEnabled("AlwaysMaxHp", fallbackVal: false);
|
||||||
set => SetPrincessPluginSetting("AlwaysMaxHp", value);
|
set => this.SetPrincessPluginSetting("AlwaysMaxHp", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -643,8 +662,8 @@ namespace GameLauncher.Engines.Tkool
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool PrincessAlwaysMaxMp
|
public bool PrincessAlwaysMaxMp
|
||||||
{
|
{
|
||||||
get => IsPluginEnabled("AlwaysMaxMp", fallbackVal: false);
|
get => this.IsPluginEnabled("AlwaysMaxMp", fallbackVal: false);
|
||||||
set => SetPrincessPluginSetting("AlwaysMaxMp", value);
|
set => this.SetPrincessPluginSetting("AlwaysMaxMp", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -652,15 +671,23 @@ namespace GameLauncher.Engines.Tkool
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void SetPrincessPluginSetting(string pluginId, bool value)
|
private void SetPrincessPluginSetting(string pluginId, bool value)
|
||||||
{
|
{
|
||||||
if (_pluginSettings.TryGetValue(pluginId, out var cur) && cur == value)
|
if (this._pluginSettings.TryGetValue(pluginId, out var cur) && cur == value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_pluginSettings[pluginId] = value;
|
this._pluginSettings[pluginId] = value;
|
||||||
OnPropertyChanged(pluginId == "AlwaysMaxHp" ? nameof(PrincessAlwaysMaxHp) : nameof(PrincessAlwaysMaxMp));
|
this.OnPropertyChanged(pluginId == "AlwaysMaxHp" ? nameof(this.PrincessAlwaysMaxHp) : nameof(this.PrincessAlwaysMaxMp));
|
||||||
|
|
||||||
|
// プラグイン一覧側のアイテムとも同期
|
||||||
|
var optItem = this._pluginOptions.FirstOrDefault(o => string.Equals(o.Id, pluginId, StringComparison.OrdinalIgnoreCase));
|
||||||
|
if (optItem != null && optItem.IsEnabled != value)
|
||||||
|
{
|
||||||
|
optItem.IsEnabled = value;
|
||||||
|
}
|
||||||
|
|
||||||
// 連動して独自の改造設定であることを示す
|
// 連動して独自の改造設定であることを示す
|
||||||
HasCustomApplyMod = true;
|
this.HasCustomApplyMod = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsPluginEnabled(string pluginId, Dictionary<string, bool>? defaultSettings = null, bool fallbackVal = true)
|
public bool IsPluginEnabled(string pluginId, Dictionary<string, bool>? defaultSettings = null, bool fallbackVal = true)
|
||||||
@@ -691,6 +718,12 @@ namespace GameLauncher.Engines.Tkool
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ショップ初期個数最大および個別ゲーム専用プラグインは既定でOFF
|
||||||
|
if (pluginId is "ShopMaxBuy" or "AlwaysMaxHp" or "AlwaysMaxMp")
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return fallbackVal;
|
return fallbackVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -732,33 +765,55 @@ namespace GameLauncher.Engines.Tkool
|
|||||||
|
|
||||||
public void SyncPluginOptions(IEnumerable<ModPluginDefinition> availablePlugins, Dictionary<string, bool>? defaultSettings = null)
|
public void SyncPluginOptions(IEnumerable<ModPluginDefinition> availablePlugins, Dictionary<string, bool>? defaultSettings = null)
|
||||||
{
|
{
|
||||||
_pluginOptions.Clear();
|
this._pluginOptions.Clear();
|
||||||
if (EngineType is TkoolEngineType.Wolf or TkoolEngineType.Nwjs)
|
this._commonPluginOptions.Clear();
|
||||||
|
this._specificPluginOptions.Clear();
|
||||||
|
|
||||||
|
if (this.EngineType is TkoolEngineType.Wolf or TkoolEngineType.Nwjs)
|
||||||
{
|
{
|
||||||
|
this.OnPropertyChanged(nameof(this.HasSpecificPlugins));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerable<ModPluginDefinition> targetDefs;
|
IEnumerable<ModPluginDefinition> targetDefs;
|
||||||
if (EngineType == TkoolEngineType.Tyrano)
|
if (this.EngineType == TkoolEngineType.Tyrano)
|
||||||
{
|
{
|
||||||
targetDefs = DefaultTyranoPlugins;
|
targetDefs = DefaultTyranoPlugins;
|
||||||
}
|
}
|
||||||
else if (IsRgss)
|
else if (this.IsRgss)
|
||||||
{
|
{
|
||||||
targetDefs = DefaultRgssPlugins;
|
targetDefs = DefaultRgssPlugins;
|
||||||
}
|
}
|
||||||
else if (IsSrpgStudio)
|
else if (this.IsSrpgStudio)
|
||||||
{
|
{
|
||||||
targetDefs = DefaultSrpgPlugins;
|
targetDefs = DefaultSrpgPlugins;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
targetDefs = availablePlugins;
|
// MV / MZ: 固有ゲームプラグイン(AlwaysMaxHp/AlwaysMaxMp等)は、対象ゲーム以外では一覧に表示しない
|
||||||
|
targetDefs = availablePlugins.Where(p =>
|
||||||
|
{
|
||||||
|
// 削除対象の旧プラグインは除外
|
||||||
|
if (string.Equals(p.Id, "GameLauncher_Mod", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
string.Equals(p.Id, "GameLauncher_StandaloneMod", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (p.IsGameSpecific)
|
||||||
|
{
|
||||||
|
if (string.Equals(p.TargetGameKey, "PrincessSynergy", StringComparison.OrdinalIgnoreCase) && !this.IsPrincessSynergy)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var def in targetDefs)
|
foreach (var def in targetDefs)
|
||||||
{
|
{
|
||||||
bool isEnabled = IsPluginEnabled(def.Id, defaultSettings, fallbackVal: true);
|
bool isEnabled = this.IsPluginEnabled(def.Id, defaultSettings, fallbackVal: def.DefaultEnabled);
|
||||||
var item = new ModPluginOptionItem
|
var item = new ModPluginOptionItem
|
||||||
{
|
{
|
||||||
Definition = def,
|
Definition = def,
|
||||||
@@ -768,11 +823,30 @@ namespace GameLauncher.Engines.Tkool
|
|||||||
{
|
{
|
||||||
if (e.PropertyName == nameof(ModPluginOptionItem.IsEnabled))
|
if (e.PropertyName == nameof(ModPluginOptionItem.IsEnabled))
|
||||||
{
|
{
|
||||||
_pluginSettings[def.Id] = item.IsEnabled;
|
this._pluginSettings[def.Id] = item.IsEnabled;
|
||||||
|
if (def.Id == "AlwaysMaxHp")
|
||||||
|
{
|
||||||
|
this.OnPropertyChanged(nameof(this.PrincessAlwaysMaxHp));
|
||||||
|
}
|
||||||
|
else if (def.Id == "AlwaysMaxMp")
|
||||||
|
{
|
||||||
|
this.OnPropertyChanged(nameof(this.PrincessAlwaysMaxMp));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
_pluginOptions.Add(item);
|
|
||||||
|
this._pluginOptions.Add(item);
|
||||||
|
if (def.IsGameSpecific)
|
||||||
|
{
|
||||||
|
this._specificPluginOptions.Add(item);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this._commonPluginOptions.Add(item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.OnPropertyChanged(nameof(this.HasSpecificPlugins));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ModPluginOptions ModOptions
|
public ModPluginOptions ModOptions
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -31,7 +31,11 @@ namespace GameLauncher.Engines.Tkool
|
|||||||
"BattleTurnRecover",
|
"BattleTurnRecover",
|
||||||
"MaxGainGold",
|
"MaxGainGold",
|
||||||
"MaxGainExp",
|
"MaxGainExp",
|
||||||
"InstantMessage"
|
"InstantMessage",
|
||||||
|
"GameLauncher_Mod",
|
||||||
|
"GameLauncherMod",
|
||||||
|
"GameLauncher_StandaloneMod",
|
||||||
|
"GameLauncherStandaloneMod"
|
||||||
];
|
];
|
||||||
|
|
||||||
private List<ModPluginDefinition> _availablePlugins = [];
|
private List<ModPluginDefinition> _availablePlugins = [];
|
||||||
@@ -86,7 +90,16 @@ namespace GameLauncher.Engines.Tkool
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
list.Add(ModPluginDefinition.FromFile(file));
|
var def = ModPluginDefinition.FromFile(file);
|
||||||
|
if (string.Equals(def.Id, "GameLauncher_Mod", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
string.Equals(def.Id, "GameLauncher_StandaloneMod", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
string.Equals(def.Id, "GameLauncherMod", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
string.Equals(def.Id, "GameLauncherStandaloneMod", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
list.Add(def);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
<None Remove="Engines\Nwjs\Tools\speedhack-i686\hid.dll" />
|
<None Remove="Engines\Nwjs\Tools\speedhack-i686\hid.dll" />
|
||||||
<None Remove="Engines\Nwjs\Tools\speedhack-i686\version.dll" />
|
<None Remove="Engines\Nwjs\Tools\speedhack-i686\version.dll" />
|
||||||
<None Remove="plugins\AlwaysMaxHpMp.js" />
|
<None Remove="plugins\AlwaysMaxHpMp.js" />
|
||||||
<None Remove="plugins\GameLauncher_StandaloneMod.js" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
+105
-57
@@ -784,25 +784,24 @@
|
|||||||
|
|
||||||
<!-- 右側:詳細 & 操作パネル -->
|
<!-- 右側:詳細 & 操作パネル -->
|
||||||
<Border Grid.Column="2" Background="{StaticResource SidePanelBg}" Padding="12,10">
|
<Border Grid.Column="2" Background="{StaticResource SidePanelBg}" Padding="12,10">
|
||||||
<DockPanel>
|
<Grid x:Name="pnlGameDetails">
|
||||||
<!-- 詳細パネルの開閉トグル(コンパクト化のため既定は展開、必要時に折りたたみ) -->
|
<!-- 未選択時メッセージ -->
|
||||||
<Button x:Name="btnToggleDetails" DockPanel.Dock="Top"
|
<StackPanel x:Name="pnlNoSelection" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,80,0,0" Opacity="0.6">
|
||||||
Style="{StaticResource ModernButton}" Padding="8,4" FontSize="11"
|
<TextBlock Text="👈" FontSize="44" HorizontalAlignment="Center" Margin="0,0,0,10"/>
|
||||||
HorizontalAlignment="Right" Margin="0,0,0,6"
|
<TextBlock Text="ゲームを選択してください" FontSize="16" HorizontalAlignment="Center"/>
|
||||||
Content="▾ 詳細を折りたたむ" Click="btnToggleDetails_Click"/>
|
<TextBlock Text="ダブルクリックで即時起動することもできます" FontSize="12" HorizontalAlignment="Center" Margin="0,6,0,0"/>
|
||||||
<ScrollViewer x:Name="scvDetails" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
</StackPanel>
|
||||||
<Grid x:Name="pnlGameDetails" Margin="0,0,4,0">
|
|
||||||
<!-- 未選択時メッセージ -->
|
|
||||||
<StackPanel x:Name="pnlNoSelection" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,80,0,0" Opacity="0.6">
|
|
||||||
<TextBlock Text="👈" FontSize="44" HorizontalAlignment="Center" Margin="0,0,0,10"/>
|
|
||||||
<TextBlock Text="ゲームを選択してください" FontSize="16" HorizontalAlignment="Center"/>
|
|
||||||
<TextBlock Text="ダブルクリックで即時起動することもできます" FontSize="12" HorizontalAlignment="Center" Margin="0,6,0,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<!-- 選択時コンテンツ -->
|
<!-- 選択時コンテンツ(上部固定ヘッダー + 下部スクロールエリア) -->
|
||||||
<StackPanel x:Name="pnlSelectedContent" Margin="0,0,0,16" Visibility="Collapsed">
|
<Grid x:Name="pnlSelectedContent" Visibility="Collapsed">
|
||||||
<!-- 1. ゲームアイコン・タイトル・バッジ(共通) -->
|
<Grid.RowDefinitions>
|
||||||
<Grid Margin="0,0,0,16">
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- 1. ゲームアイコン・タイトル・ブックマーク・起動ボタン(上部固定エリア) -->
|
||||||
|
<StackPanel Grid.Row="0" Margin="0,0,0,8">
|
||||||
|
<Grid Margin="0,0,0,12">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="64"/>
|
<ColumnDefinition Width="64"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
@@ -921,6 +920,21 @@
|
|||||||
<TextBlock Text="WOLF RPGエディター" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
<TextBlock Text="WOLF RPGエディター" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<!-- NW.jsバッジ -->
|
||||||
|
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeNwjsBg}">
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding SelectedItem.IsNwjs, ElementName=lstGames}" Value="True">
|
||||||
|
<Setter Property="Visibility" Value="Visible"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<TextBlock Text="NW.js" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<!-- Unityバックエンドバッジ -->
|
<!-- Unityバックエンドバッジ -->
|
||||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeIl2cppBg}"
|
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeIl2cppBg}"
|
||||||
Visibility="{Binding SelectedItem, ElementName=lstGames, Converter={x:Static helpers:IsUnityToVisibilityConverter.Instance}}">
|
Visibility="{Binding SelectedItem, ElementName=lstGames, Converter={x:Static helpers:IsUnityToVisibilityConverter.Instance}}">
|
||||||
@@ -950,21 +964,6 @@
|
|||||||
<TextBlock Text="{Binding SelectedItem.WolfArchiveBadgeText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
<TextBlock Text="{Binding SelectedItem.WolfArchiveBadgeText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- NW.jsバッジ -->
|
|
||||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeNwjsBg}">
|
|
||||||
<Border.Style>
|
|
||||||
<Style TargetType="Border">
|
|
||||||
<Setter Property="Visibility" Value="Collapsed"/>
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger Binding="{Binding SelectedItem.IsNwjs, ElementName=lstGames}" Value="True">
|
|
||||||
<Setter Property="Visibility" Value="Visible"/>
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</Border.Style>
|
|
||||||
<TextBlock Text="NW.js" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<!-- 改造中バッジ -->
|
<!-- 改造中バッジ -->
|
||||||
<Border CornerRadius="4" Padding="6,2" Background="{StaticResource BadgeModdedBg}" Margin="0,0,6,0">
|
<Border CornerRadius="4" Padding="6,2" Background="{StaticResource BadgeModdedBg}" Margin="0,0,6,0">
|
||||||
<Border.Style>
|
<Border.Style>
|
||||||
@@ -984,15 +983,25 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- 2. 起動ボタン(大・共通) -->
|
<!-- 2. 起動ボタン(大・共通) -->
|
||||||
<Button x:Name="btnLaunchGame" Style="{StaticResource LaunchBigButton}" Height="48" Margin="0,0,0,12" Click="btnLaunchGame_Click">
|
<Button x:Name="btnLaunchGame" Style="{StaticResource LaunchBigButton}" Height="48" Margin="0,0,0,8" Click="btnLaunchGame_Click">
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||||
<TextBlock Text="🚀" FontSize="20" Margin="0,0,10,0" VerticalAlignment="Center"/>
|
<TextBlock Text="🚀" FontSize="20" Margin="0,0,10,0" VerticalAlignment="Center"/>
|
||||||
<TextBlock Text="ゲームを起動" FontSize="16" FontWeight="Bold" VerticalAlignment="Center"/>
|
<TextBlock Text="ゲームを起動" FontSize="16" FontWeight="Bold" VerticalAlignment="Center"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- ================= A. ツクール / ティラノ 選択時の個別UI ================= -->
|
<!-- 詳細設定の開閉トグルボタン -->
|
||||||
<StackPanel x:Name="pnlTkoolDetails" Visibility="{Binding SelectedItem, ElementName=lstGames, Converter={x:Static helpers:IsTkoolToVisibilityConverter.Instance}}">
|
<Button x:Name="btnToggleDetails"
|
||||||
|
Style="{StaticResource ModernButton}" Padding="8,4" FontSize="11"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,0,4"
|
||||||
|
Content="▾ 詳細設定を折りたたむ" Click="btnToggleDetails_Click"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- ================= 2. 下部可変・スクロールエリア ================= -->
|
||||||
|
<ScrollViewer x:Name="scvDetails" Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||||
|
<StackPanel Margin="0,0,4,16">
|
||||||
|
<!-- ================= A. ツクール / ティラノ 選択時の個別UI ================= -->
|
||||||
|
<StackPanel x:Name="pnlTkoolDetails" Visibility="{Binding SelectedItem, ElementName=lstGames, Converter={x:Static helpers:IsTkoolToVisibilityConverter.Instance}}">
|
||||||
<!-- クイックボタン -->
|
<!-- クイックボタン -->
|
||||||
<Grid Margin="0,0,0,14">
|
<Grid Margin="0,0,0,14">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -1162,24 +1171,63 @@
|
|||||||
|
|
||||||
<!-- 個別プラグインアコーディオン -->
|
<!-- 個別プラグインアコーディオン -->
|
||||||
<Expander Header="プラグイン個別設定(詳細)" IsExpanded="True" Foreground="{StaticResource TextSecondary}" FontSize="12">
|
<Expander Header="プラグイン個別設定(詳細)" IsExpanded="True" Foreground="{StaticResource TextSecondary}" FontSize="12">
|
||||||
<ItemsControl ItemsSource="{Binding SelectedItem.PluginOptions, ElementName=lstGames}" Margin="4,8,0,0">
|
<StackPanel Margin="4,8,0,0">
|
||||||
<ItemsControl.ItemTemplate>
|
<!-- 共通機能プラグイン グループ -->
|
||||||
<DataTemplate DataType="{x:Type models:ModPluginOptionItem}">
|
<TextBlock Text="【共通プラグイン】" FontSize="11" FontWeight="Bold" Foreground="#A29BFE" Margin="2,2,0,6"/>
|
||||||
<Border Margin="0,0,0,6" Background="#1B1B26" CornerRadius="5" Padding="10,7" BorderBrush="#35354A" BorderThickness="1">
|
<ItemsControl ItemsSource="{Binding SelectedItem.CommonPluginOptions, ElementName=lstGames}">
|
||||||
<Grid>
|
<ItemsControl.ItemTemplate>
|
||||||
<Grid.RowDefinitions>
|
<DataTemplate DataType="{x:Type models:ModPluginOptionItem}">
|
||||||
<RowDefinition Height="Auto"/>
|
<Border Margin="0,0,0,6" Background="#1B1B26" CornerRadius="5" Padding="10,7" BorderBrush="#35354A" BorderThickness="1">
|
||||||
<RowDefinition Height="Auto"/>
|
<Grid>
|
||||||
</Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<CheckBox Grid.Row="0" IsChecked="{Binding IsEnabled, Mode=TwoWay}"
|
<RowDefinition Height="Auto"/>
|
||||||
Content="{Binding Name}" FontWeight="SemiBold" FontSize="12" Foreground="{StaticResource TextPrimary}"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<TextBlock Grid.Row="1" Text="{Binding Description}" FontSize="11" Foreground="{StaticResource TextSecondary}"
|
</Grid.RowDefinitions>
|
||||||
TextWrapping="Wrap" Margin="22,2,0,0" Opacity="0.85"/>
|
<CheckBox Grid.Row="0" IsChecked="{Binding IsEnabled, Mode=TwoWay}"
|
||||||
</Grid>
|
Content="{Binding Name}" FontWeight="SemiBold" FontSize="12" Foreground="{StaticResource TextPrimary}"/>
|
||||||
</Border>
|
<TextBlock Grid.Row="1" Text="{Binding Description}" FontSize="11" Foreground="{StaticResource TextSecondary}"
|
||||||
</DataTemplate>
|
TextWrapping="Wrap" Margin="22,2,0,0" Opacity="0.85"/>
|
||||||
</ItemsControl.ItemTemplate>
|
</Grid>
|
||||||
</ItemsControl>
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
|
||||||
|
<!-- 固有ゲーム専用プラグイン グループ(プリンセスシナジー等でのみ表示) -->
|
||||||
|
<Border Margin="0,8,0,0" Background="#231A2D" BorderBrush="#E84393" BorderThickness="1.2" CornerRadius="6" Padding="8,8,8,2">
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding SelectedItem.HasSpecificPlugins, ElementName=lstGames}" Value="True">
|
||||||
|
<Setter Property="Visibility" Value="Visible"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="【💖 固有ゲーム専用プラグイン】" FontSize="11" FontWeight="Bold" Foreground="#FD79A8" Margin="2,0,0,6"/>
|
||||||
|
<ItemsControl ItemsSource="{Binding SelectedItem.SpecificPluginOptions, ElementName=lstGames}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type models:ModPluginOptionItem}">
|
||||||
|
<Border Margin="0,0,0,6" Background="#1E1626" CornerRadius="5" Padding="10,7" BorderBrush="#633959" BorderThickness="1">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<CheckBox Grid.Row="0" IsChecked="{Binding IsEnabled, Mode=TwoWay}"
|
||||||
|
Content="{Binding Name}" FontWeight="SemiBold" FontSize="12" Foreground="#FFEAA7"/>
|
||||||
|
<TextBlock Grid.Row="1" Text="{Binding Description}" FontSize="11" Foreground="{StaticResource TextSecondary}"
|
||||||
|
TextWrapping="Wrap" Margin="22,2,0,0" Opacity="0.85"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
</Expander>
|
</Expander>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -1465,10 +1513,10 @@
|
|||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</DockPanel>
|
</Grid>
|
||||||
</Border>
|
</Grid>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- ================= リアルタイムログコンソール ================= -->
|
<!-- ================= リアルタイムログコンソール ================= -->
|
||||||
|
|||||||
+22
-12
@@ -44,7 +44,6 @@ namespace GameLauncher
|
|||||||
private readonly WolfModService _wolfModService = new();
|
private readonly WolfModService _wolfModService = new();
|
||||||
private readonly SrpgArchiveService _srpgArchiveService = new();
|
private readonly SrpgArchiveService _srpgArchiveService = new();
|
||||||
private readonly SrpgModService _srpgModService = new();
|
private readonly SrpgModService _srpgModService = new();
|
||||||
private readonly TkoolInjectionService _injectionService = new();
|
|
||||||
private readonly WindowResizeService _windowResizeService = new();
|
private readonly WindowResizeService _windowResizeService = new();
|
||||||
|
|
||||||
/// <summary>直近に起動したゲームプロセス(起動後の外部連携処理で使用)</summary>
|
/// <summary>直近に起動したゲームプロセス(起動後の外部連携処理で使用)</summary>
|
||||||
@@ -207,29 +206,39 @@ namespace GameLauncher
|
|||||||
_modService.LoadAvailablePlugins();
|
_modService.LoadAvailablePlugins();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var plugin in _modService.AvailablePlugins)
|
foreach (var plugin in this._modService.AvailablePlugins)
|
||||||
{
|
{
|
||||||
if (!_config.DefaultPluginSettings.ContainsKey(plugin.Id))
|
if (!this._config.DefaultPluginSettings.ContainsKey(plugin.Id))
|
||||||
{
|
{
|
||||||
_config.DefaultPluginSettings[plugin.Id] = true;
|
this._config.DefaultPluginSettings[plugin.Id] = plugin.DefaultEnabled;
|
||||||
modified = true;
|
modified = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 削除対象の旧Modプラグイン設定を除去
|
||||||
|
if (this._config.DefaultPluginSettings.Remove("GameLauncher_Mod"))
|
||||||
|
{
|
||||||
|
modified = true;
|
||||||
|
}
|
||||||
|
if (this._config.DefaultPluginSettings.Remove("GameLauncher_StandaloneMod"))
|
||||||
|
{
|
||||||
|
modified = true;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var tyranoPlugin in TkoolGameItem.DefaultTyranoPlugins)
|
foreach (var tyranoPlugin in TkoolGameItem.DefaultTyranoPlugins)
|
||||||
{
|
{
|
||||||
if (!_config.DefaultPluginSettings.ContainsKey(tyranoPlugin.Id))
|
if (!this._config.DefaultPluginSettings.ContainsKey(tyranoPlugin.Id))
|
||||||
{
|
{
|
||||||
_config.DefaultPluginSettings[tyranoPlugin.Id] = true;
|
this._config.DefaultPluginSettings[tyranoPlugin.Id] = tyranoPlugin.DefaultEnabled;
|
||||||
modified = true;
|
modified = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var rgssPlugin in TkoolGameItem.DefaultRgssPlugins)
|
foreach (var rgssPlugin in TkoolGameItem.DefaultRgssPlugins)
|
||||||
{
|
{
|
||||||
if (!_config.DefaultPluginSettings.ContainsKey(rgssPlugin.Id))
|
if (!this._config.DefaultPluginSettings.ContainsKey(rgssPlugin.Id))
|
||||||
{
|
{
|
||||||
_config.DefaultPluginSettings[rgssPlugin.Id] = true;
|
this._config.DefaultPluginSettings[rgssPlugin.Id] = rgssPlugin.DefaultEnabled;
|
||||||
modified = true;
|
modified = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1086,13 +1095,14 @@ namespace GameLauncher
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 右側の詳細パネルを折りたたみ/展開し、横幅の狭い表示でも一覧を見やすくします。
|
/// 右側の詳細設定セクションを折りたたみ/展開します。
|
||||||
|
/// タイトルおよび起動ボタンは上部に固定されたまま、詳細エリアのみを開閉します。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void btnToggleDetails_Click(object sender, RoutedEventArgs e)
|
private void btnToggleDetails_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
bool collapse = scvDetails.Visibility == Visibility.Visible;
|
bool collapse = this.scvDetails.Visibility == Visibility.Visible;
|
||||||
scvDetails.Visibility = collapse ? Visibility.Collapsed : Visibility.Visible;
|
this.scvDetails.Visibility = collapse ? Visibility.Collapsed : Visibility.Visible;
|
||||||
btnToggleDetails.Content = collapse ? "▸ 詳細を表示" : "▾ 詳細を折りたたむ";
|
this.btnToggleDetails.Content = collapse ? "▸ 詳細設定を展開" : "▾ 詳細設定を折りたたむ";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -17,6 +17,18 @@ namespace GameLauncher.Models
|
|||||||
public string FileName { get; set; } = string.Empty; // ファイル名 (例: "BattleSpeedUp.js")
|
public string FileName { get; set; } = string.Empty; // ファイル名 (例: "BattleSpeedUp.js")
|
||||||
public string FilePath { get; set; } = string.Empty; // フルパス
|
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>
|
/// <summary>
|
||||||
/// .js ファイルから定義情報を解析・生成します。
|
/// .js ファイルから定義情報を解析・生成します。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -38,6 +50,16 @@ namespace GameLauncher.Models
|
|||||||
catch { }
|
catch { }
|
||||||
|
|
||||||
string displayName = GetFriendlyName(id, desc);
|
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
|
return new ModPluginDefinition
|
||||||
{
|
{
|
||||||
@@ -45,7 +67,11 @@ namespace GameLauncher.Models
|
|||||||
Name = displayName,
|
Name = displayName,
|
||||||
Description = desc,
|
Description = desc,
|
||||||
FileName = fileName,
|
FileName = fileName,
|
||||||
FilePath = filePath
|
FilePath = filePath,
|
||||||
|
IsGameSpecific = isSpecific,
|
||||||
|
TargetGameKey = targetKey,
|
||||||
|
GroupName = groupName,
|
||||||
|
DefaultEnabled = defEnabled
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,6 +91,8 @@ namespace GameLauncher.Models
|
|||||||
"GoldGainMax" => "所持金増減時MAX (9999999G)",
|
"GoldGainMax" => "所持金増減時MAX (9999999G)",
|
||||||
"ExpGainMax" => "経験値獲得時MAX (一気にLv99)",
|
"ExpGainMax" => "経験値獲得時MAX (一気にLv99)",
|
||||||
"MessageInstant" => "メッセージ瞬間表示 (ウェイトスキップ)",
|
"MessageInstant" => "メッセージ瞬間表示 (ウェイトスキップ)",
|
||||||
|
"AlwaysMaxHp" => "HP常時MAX (プリンセスシナジー専用)",
|
||||||
|
"AlwaysMaxMp" => "MP常時MAX (プリンセスシナジー専用)",
|
||||||
_ => !string.IsNullOrEmpty(desc) ? $"{id} ({desc})" : id
|
_ => !string.IsNullOrEmpty(desc) ? $"{id} ({desc})" : id
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -78,9 +106,11 @@ namespace GameLauncher.Models
|
|||||||
private bool _isEnabled = true;
|
private bool _isEnabled = true;
|
||||||
|
|
||||||
public ModPluginDefinition Definition { get; set; } = null!;
|
public ModPluginDefinition Definition { get; set; } = null!;
|
||||||
public string Id => Definition.Id;
|
public string Id => this.Definition.Id;
|
||||||
public string Name => Definition.Name;
|
public string Name => this.Definition.Name;
|
||||||
public string Description => Definition.Description;
|
public string Description => this.Definition.Description;
|
||||||
|
public string GroupName => this.Definition.GroupName;
|
||||||
|
public bool IsGameSpecific => this.Definition.IsGameSpecific;
|
||||||
|
|
||||||
public bool IsEnabled
|
public bool IsEnabled
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1163,7 +1163,7 @@ namespace GameLauncher.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 8. 汎用 NW.js ゲームの検出
|
// 8. 汎用 NW.js ゲームの検出
|
||||||
var nwjsGame = Engines.Nwjs.NwjsDetector.DetectNwjsGame(dirPath, folderName, folderModified, (exe, dir) => LoadIcon(exe, dir));
|
var nwjsGame = NwjsDetector.DetectNwjsGame(dirPath, folderName, folderModified, (exe, dir) => LoadIcon(exe, dir));
|
||||||
if (nwjsGame != null)
|
if (nwjsGame != null)
|
||||||
{
|
{
|
||||||
return nwjsGame;
|
return nwjsGame;
|
||||||
|
|||||||
@@ -1,99 +0,0 @@
|
|||||||
/*:
|
|
||||||
* @plugindesc GameLauncher mod (HP once at self turn start / MP always MAX / speed).
|
|
||||||
* @author GameLauncher
|
|
||||||
*
|
|
||||||
* @param EnableHpRecover
|
|
||||||
* @text HP自動回復(自ターン開始時のみ)
|
|
||||||
* @type boolean
|
|
||||||
* @default true
|
|
||||||
*
|
|
||||||
* @param EnableMpRecover
|
|
||||||
* @text MP常時MAX
|
|
||||||
* @type boolean
|
|
||||||
* @default true
|
|
||||||
*
|
|
||||||
* @param SpeedMultiplier
|
|
||||||
* @text 速度倍率
|
|
||||||
* @type number
|
|
||||||
* @decimals 2
|
|
||||||
* @default 3.0
|
|
||||||
*/
|
|
||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var pluginName = 'GameLauncher_Mod';
|
|
||||||
var params = PluginManager.parameters(pluginName) || {};
|
|
||||||
|
|
||||||
function toBool(v, def) {
|
|
||||||
if (v === undefined || v === null || v === '') return def;
|
|
||||||
return String(v).toLowerCase() === 'true';
|
|
||||||
}
|
|
||||||
|
|
||||||
var ENABLE_HP = toBool(params['EnableHpRecover'], true);
|
|
||||||
var ENABLE_MP = toBool(params['EnableMpRecover'], true);
|
|
||||||
var SPEED = parseFloat(params['SpeedMultiplier']);
|
|
||||||
if (isNaN(SPEED) || SPEED <= 0) SPEED = 3.0;
|
|
||||||
|
|
||||||
// 自パーティのアクターかどうか(他ゲーム・敵などへ影響しないよう厳密判定)
|
|
||||||
function isPlayerActor(battler) {
|
|
||||||
return battler && typeof battler.isActor === 'function' && battler.isActor();
|
|
||||||
}
|
|
||||||
|
|
||||||
// =========================================================================
|
|
||||||
// HP: 自ターン開始時に1度だけ MAX まで回復する。
|
|
||||||
// 毎フレーム回復はしない(次ターンまでプレイヤーは自由にHPを減らせる)。
|
|
||||||
// =========================================================================
|
|
||||||
if (ENABLE_HP && typeof BattleManager !== 'undefined' && BattleManager.startTurn) {
|
|
||||||
var _GameLauncher_startTurn = BattleManager.startTurn;
|
|
||||||
BattleManager.startTurn = function () {
|
|
||||||
_GameLauncher_startTurn.call(this);
|
|
||||||
var battler = this.actor && this.actor();
|
|
||||||
if (isPlayerActor(battler)) {
|
|
||||||
// この瞬間に一度だけ全回復(以降はダメージで減らせる)
|
|
||||||
battler.setHp(battler.mhp);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// =========================================================================
|
|
||||||
// MP: 常時 MAX を維持する(自アクターのみ、値が mmp 未満なら即座に戻す)。
|
|
||||||
// =========================================================================
|
|
||||||
if (ENABLE_MP && typeof Game_Battler !== 'undefined' && Game_Battler.prototype) {
|
|
||||||
var _GameLauncher_setMp = Game_Battler.prototype.setMp;
|
|
||||||
Game_Battler.prototype.setMp = function (value) {
|
|
||||||
_GameLauncher_setMp.call(this, value);
|
|
||||||
if (isPlayerActor(this)) {
|
|
||||||
this._mp = this.mmp;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var _GameLauncher_refresh = Game_Battler.prototype.refresh;
|
|
||||||
Game_Battler.prototype.refresh = function () {
|
|
||||||
_GameLauncher_refresh.call(this);
|
|
||||||
if (isPlayerActor(this)) {
|
|
||||||
this._mp = this.mmp;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// =========================================================================
|
|
||||||
// 速度倍率: シーン更新のデルタタイムを実質的に乗算する(speedhack)。
|
|
||||||
// =========================================================================
|
|
||||||
if (SPEED !== 1.0 && typeof SceneManager !== 'undefined' && SceneManager.updateMain) {
|
|
||||||
var _GameLauncher_updateMain = SceneManager.updateMain;
|
|
||||||
SceneManager.updateMain = function () {
|
|
||||||
var scene = this._scene;
|
|
||||||
if (scene && scene.isActive && scene.isActive()) {
|
|
||||||
var delta = this._deltaTime || (1000 / 60);
|
|
||||||
if (scene.update) {
|
|
||||||
scene.update(delta * SPEED);
|
|
||||||
}
|
|
||||||
if (scene.isActive && scene.isActive()) {
|
|
||||||
_GameLauncher_updateMain.call(this);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_GameLauncher_updateMain.call(this);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
Reference in new issue
Block a user