generated from Distance-Modding/Template.CSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
1ecb283
commit 819b68f
Showing
2 changed files
with
34 additions
and
0 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
33 changes: 33 additions & 0 deletions
33
Distance.EditorAnnihilator/Harmony/Assembly-CSharp/LevelSettings/OpenLevelSelectMenu.cs
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,33 @@ | ||
| ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
|
||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using HarmonyLib; | ||
using LevelEditorTools; | ||
using UnityEngine; | ||
using System.Reflection; | ||
|
||
namespace Mod.EditorAnnihilator.Harmony | ||
{ | ||
[HarmonyPatch(typeof(LevelEditor), "OpenLevelSelectMenu")] | ||
internal static class LevelEditor__OpenLevelSelectMenu | ||
{ | ||
//__instance is the class you are patching, so you can call functions on it. | ||
//If patching a function with paramaters, you can just add those paramaters as paramaters inside Postfix. | ||
//If the function you're patching has a return type, you can modify the result value with the parameter 'ref [type of return value] __result' | ||
[HarmonyPrefix] | ||
internal static void Prefix() | ||
{ | ||
if (!Mod.CNF) | ||
{ | ||
Mod.DevBuildForCreatorName = false; | ||
} | ||
} | ||
} | ||
} |