Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
starfi5h committed Dec 6, 2024
1 parent f99b079 commit b953f67
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions NebulaPatcher/Patches/Transpilers/UIProductEntry_Transpiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,6 @@ private static IEnumerable<CodeInstruction> UpdateExtraProductTexts_Transpiler(I
AccessTools.Method(typeof(UIProductEntry_Transpiler), nameof(GetFactoryIndex)))
)
.InstructionEnumeration();
/*
// planetData.factory != null => GetFactoryIndex(planetData) != -1
instructions = new CodeMatcher(instructions)
.MatchForward(false,
new CodeMatch(OpCodes.Ldfld, AccessTools.Field(typeof(PlanetData), nameof(PlanetData.factory))),
new CodeMatch(OpCodes.Brfalse)
)
.Repeat(matcher => matcher
.SetAndAdvance(OpCodes.Call, AccessTools.Method(typeof(UIProductEntry_Transpiler), nameof(GetFactoryIndex)))
.InsertAndAdvance(new CodeInstruction(OpCodes.Ldc_I4_M1))
.SetOpcodeAndAdvance(OpCodes.Beq_S)
)
.InstructionEnumeration()
*/

instructions = new CodeMatcher(instructions)
.MatchForward(false,
Expand Down

0 comments on commit b953f67

Please sign in to comment.