This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
74 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Marsey.Subversion; | ||
|
||
public static class Subverse | ||
{ | ||
private static MarseyPatch? _subverter = null; | ||
|
||
public static bool InitSubverter() | ||
{ | ||
if (_subverter != null) | ||
return true; | ||
|
||
Subverter.LoadSubverts(); | ||
List<MarseyPatch> patches = Subverter.GetSubverterPatches(); | ||
foreach (MarseyPatch p in patches) | ||
{ | ||
if (p.Name == "Subverter") | ||
{ | ||
AssignSubverter(p); | ||
PatchAssemblyManager.InitLogger(patches); | ||
patches.RemoveAll(p => p.Name == "Subverter"); | ||
return true; | ||
} | ||
} | ||
|
||
return false; | ||
} | ||
|
||
private static void AssignSubverter(MarseyPatch subverter) | ||
{ | ||
_subverter = subverter; | ||
} | ||
|
||
public static void PatchSubverter() | ||
{ | ||
if (_subverter != null) GameAssemblyManager.PatchProc(new List<MarseyPatch>() { _subverter }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters