Skip to content

Commit

Permalink
Fixed creator name field issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
PredatoryBalloon committed Jan 2, 2022
1 parent 1ecb283 commit 819b68f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
<Compile Include="Harmony\Assembly-CSharp\LevelSettings\MedalTimeSpanToString.cs" />
<Compile Include="Harmony\Assembly-CSharp\LevelSettings\MedalTimeSpanTryParse.cs" />
<Compile Include="Harmony\Assembly-CSharp\LevelSettings\NGUIVisitMedalTime.cs" />
<Compile Include="Harmony\Assembly-CSharp\LevelSettings\OpenLevelSelectMenu.cs" />
<Compile Include="Harmony\Assembly-CSharp\LevelSettings\UpdateLevelSets.cs" />
<Compile Include="Harmony\Assembly-CSharp\LevelSettings\Visit.cs" />
<Compile Include="Harmony\Assembly-CSharp\NewObject\LevelName_.cs" />
Expand Down
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;
}
}
}
}

0 comments on commit 819b68f

Please sign in to comment.