public static void Prefix(DropshipLocation state) { if (state != DropshipLocation.NAVIGATION) { MapModesUI.TurnMapModeOff(); } }
public void Unapply(SimGameState simGame) { foreach (var system in simGame.StarSystemDictionary.Keys) { MapModesUI.ScaleSystem(system, 0.5f); } }
public void Apply(SimGameState simGame) { var visitedSystems = Traverse.Create(simGame).Field("VisitedStarSystems").GetValue <List <string> >(); foreach (var system in visitedSystems) { MapModesUI.DimSystem(system, _dimLevel); } }
// ENTRY POINT public static void Init(string modDir, string modSettings) { var harmony = HarmonyInstance.Create("io.github.mpstark.NavigationComputer"); harmony.PatchAll(Assembly.GetExecutingAssembly()); HBSLog = Logger.GetLogger("NavigationComputer"); MapModesUI.Setup(); }
public void Apply(SimGameState simGame) { foreach (var system in simGame.StarSystemDictionary.Keys) { var starSystem = simGame.StarSystemDictionary[system]; var difficulty = starSystem.Def.GetDifficulty(simGame.SimGameMode); MapModesUI.ScaleSystem(system, difficulty / 5f); } }
public static bool Prefix(ref bool __result) { if (MapModesUI.CurrentMapMode == null) { return(true); } // the return value in __result is if the esc was handled MapModesUI.TurnMapModeOff(); __result = true; return(false); }
private void ApplyFilter(SimGameState simGame, string searchString) { searchString = searchString.ToLower(); var andSplit = searchString.Split('&'); var searchTree = andSplit.Select(andTerm => andTerm.Split('|').Select(orTerm => new SearchValue(orTerm)).ToArray()).ToArray(); foreach (var systemID in simGame.StarSystemDictionary.Keys) { var system = simGame.StarSystemDictionary[systemID]; var matches = searchTree.All(andTerm => andTerm.Any(searchValue => DoesSystemMatchSearch(system, searchValue))); // dim level of 1 means it should "stay" the reg system color MapModesUI.DimSystem(systemID, matches ? 1 : _dimLevel); } }
public static void Postfix() { foreach (var key in MapModesUI.DiscreteMapModes.Keys) { if (Input.GetKeyUp(key)) { MapModesUI.ToggleMapMode(key); } } if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.F)) { MapModesUI.StartSearching(); } }
public static void Postfix(SGNavigationScreen __instance, SimGameState simGame) { MapModesUI.SetupUIObjects(__instance); MapModesUI.SimGame = simGame; }
public static void Prefix() { MapModesUI.TurnMapModeOff(); }