-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the necessary patches to make waypoints actually work?
- Loading branch information
1 parent
91ef880
commit ef052c3
Showing
4 changed files
with
50 additions
and
6 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,18 @@ | ||
using HarmonyLib; | ||
using KSP.Map; | ||
using KSP.Sim; | ||
using KSP.Sim.impl; | ||
using UnityEngine; | ||
|
||
namespace SpaceWarp.Patches; | ||
|
||
[HarmonyPatch] | ||
internal static class MapPatches | ||
{ | ||
[HarmonyPatch(typeof(Map3DView), nameof(Map3DView.ProcessSingleMapItem))] | ||
[HarmonyPrefix] | ||
// ReSharper disable once InconsistentNaming | ||
public static bool SkipBadItems(Map3DView __instance, MapItem item) => | ||
item.MapItemType != MapItemType.Waypoint || | ||
((ISimulationModelMap)__instance.Game.UniverseModel).FromGlobalId(item.SimGUID) != null; | ||
} |
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