Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:44:53 +09:30
commit f1fbbe67bb
1722 changed files with 165268 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
namespace Harmony.XUiC
{
public class XUiC_NewContinueGamePatches
{
[HarmonyPatch(typeof(XUiC_NewContinueGame))]
[HarmonyPatch("BtnConfirmDelete_OnPressed")]
public class BtnConfirmDelete_OnPressedPatch
{
public static bool Prefix(XUiC_NewContinueGame __instance, XUiController _sender, int _mouseButton)
{
XUiC_SavegamesList.ListEntry entry = __instance.savesList.SelectedEntry.GetEntry();
string SaveDataPath = SaveDataPath = GameIO.GetUserGameDataDir() + "/RebirthData/Scenarios";
string scenarioPath = $"{SaveDataPath}/{entry.worldName}/{entry.saveName}";
if (System.IO.Directory.Exists(scenarioPath))
{
Directory.Delete(scenarioPath, true);
}
return true;
}
}
[HarmonyPatch(typeof(XUiC_NewContinueGame))]
[HarmonyPatch("OnOpen")]
public class OnOpenPatch
{
public static bool Prefix(XUiC_NewContinueGame __instance)
{
//Log.Out("XUiC_NewContinueGamePatches-OnOpen START");
CustomGameOptions.LoadGameOptions(null, __instance.isContinueGame);
return true;
}
}
/*[HarmonyPatch(typeof(XUiC_NewContinueGame))]
[HarmonyPatch("CbxWorldName_OnValueChanged")]
public class CbxWorldName_OnValueChangedPatch
{
public static void Postfix(XUiC_NewContinueGame __instance, XUiController _sender, XUiC_NewContinueGame.LevelInfo _oldValue, XUiC_NewContinueGame.LevelInfo _newValue)
{
Log.Out("XUiC_NewContinueGamePatches-CbxWorldName_OnValueChanged world: " + GamePrefs.GetString(EnumGamePrefs.GameWorld));
Log.Out("XUiC_NewContinueGamePatches-CbxWorldName_OnValueChanged game: " + GamePrefs.GetString(EnumGamePrefs.GameName));
CustomGameOptions.LoadGameOptions(null);
}
}*/
}
}