/// <summary> /// Called each time the game's GUIs are to be refreshed. /// </summary> public void OnGUI() { if (_mainGui?.Display() ?? false) { _config.SetScreenPosition(_mainGui.GuiCoordinates); } if (_mainGui?.RequestedPlacement == null) { return; } "placing kerbal".Debug(); WalkAboutKspAccess.PlaceKerbal(_mainGui.RequestedPlacement); "Saving game".Log(); GamePersistence.SaveGame("persistent", HighLogic.SaveFolder, SaveMode.OVERWRITE); PerformPostPlacementAction(); _items.UpdateQueueing(_mainGui.RequestedPlacement.Items); _map.UpdateQueuing(_mainGui.RequestedPlacement.Location.LocationName); _mainGui.RequestedPlacement = null; }