スタイル: コーディング規約に準拠したコードフォーマットの適用(this.の明示、空白スタイルの統一)
- 自インスタンスメンバーアクセスへの this. 付与(28ファイル) - .editorconfig に準拠したインデント・波括弧・空白スタイルの適用 - UTF-8 (BOMあり)、CRLF改行コード、行末空白除去の整合性検証
This commit is contained in:
1 parent
2fa40c950f
commit
ae86b53147
28 files changed
+1362
-1380
No files matched your search
@@ -415,11 +415,11 @@ namespace GameLauncher.Engines.Rgss
|
||||
{
|
||||
if (game.ApplyMod)
|
||||
{
|
||||
return await ApplyModAsync(game, pluginSettings, rgssExtractorPath);
|
||||
return await this.ApplyModAsync(game, pluginSettings, rgssExtractorPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
return RestoreOriginal(game);
|
||||
return this.RestoreOriginal(game);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ namespace GameLauncher.Engines.Rgss
|
||||
// 1. スクリプトファイルが存在しない場合(RGSS暗号化アーカイブ内の場合)、自動抽出
|
||||
if (string.IsNullOrEmpty(scriptsPath) || !File.Exists(scriptsPath))
|
||||
{
|
||||
var (extractSuccess, extractMsg) = await ExtractScriptsAsync(game, rgssExtractorPath);
|
||||
var (extractSuccess, extractMsg) = await this.ExtractScriptsAsync(game, rgssExtractorPath);
|
||||
if (!extractSuccess)
|
||||
{
|
||||
return (false, $"スクリプトの抽出に失敗したため改造を適用できませんでした: {extractMsg}");
|
||||
@@ -819,14 +819,13 @@ namespace GameLauncher.Engines.Rgss
|
||||
if (parserType != null)
|
||||
{
|
||||
var parser = Activator.CreateInstance(parserType);
|
||||
var parseFileMethod = parserType.GetMethod("parse_file", new[] { typeof(string) });
|
||||
var parseFileMethod = parserType.GetMethod("parse_file", [typeof(string)]);
|
||||
var getFileDataMethod = parserType.GetMethod("get_filedata");
|
||||
var closeFileMethod = parserType.GetMethod("close_file");
|
||||
|
||||
if (parseFileMethod != null && getFileDataMethod != null && parser != null)
|
||||
{
|
||||
var entries = parseFileMethod.Invoke(parser, new object[] { archivePath }) as System.Collections.IEnumerable;
|
||||
if (entries != null)
|
||||
if (parseFileMethod.Invoke(parser, [archivePath]) is System.Collections.IEnumerable entries)
|
||||
{
|
||||
foreach (var entry in entries)
|
||||
{
|
||||
@@ -839,8 +838,7 @@ namespace GameLauncher.Engines.Rgss
|
||||
(entryName.EndsWith(targetFileName, StringComparison.OrdinalIgnoreCase) ||
|
||||
Path.GetFileName(entryName).Equals(targetFileName, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
var fileBytes = getFileDataMethod.Invoke(parser, new object[] { entry }) as byte[];
|
||||
if (fileBytes != null && fileBytes.Length > 0)
|
||||
if (getFileDataMethod.Invoke(parser, [entry]) is byte[] fileBytes && fileBytes.Length > 0)
|
||||
{
|
||||
closeFileMethod?.Invoke(parser, null);
|
||||
|
||||
@@ -873,10 +871,7 @@ namespace GameLauncher.Engines.Rgss
|
||||
};
|
||||
|
||||
using var proc = Process.Start(psi);
|
||||
if (proc != null)
|
||||
{
|
||||
proc.WaitForExit(30000); // 最大30秒待機
|
||||
}
|
||||
proc?.WaitForExit(30000); // 最大30秒待機
|
||||
|
||||
// RGSS Extractor はツール自身のフォルダ配下に Data\Scripts.rvdata2 等を出力
|
||||
var possibleOutput = Path.Combine(toolDir, "Data", targetFileName);
|
||||
|
||||
Reference in new issue
Block a user