Disable ship log builder for now

This commit is contained in:
Nick J. Connors 2022-01-04 12:42:53 -05:00
parent e3015b51e9
commit 085ddbf3d3
2 changed files with 8 additions and 20 deletions

View File

@ -13,6 +13,7 @@ namespace NewHorizons.Builder.General
public static void Init()
{
/*
var shipLogRoot = GameObject.Find("Ship_Body/Module_Cabin/Systems_Cabin/ShipLogPivot/ShipLog/ShipLogPivot/ShipLogCanvas");
var starChartLog = GameObject.Instantiate(shipLogRoot.transform.Find("DetectiveMode"), shipLogRoot.transform);
starChartLog.transform.name = "StarChartMode";
@ -33,6 +34,7 @@ namespace NewHorizons.Builder.General
StarChartMode._cardDict = new Dictionary<string, ShipLogEntryCard>();
StarChartMode._cardList = new List<ShipLogEntryCard>();
StarChartMode._centerPromptList = detectiveMode.GetComponent<ShipLogDetectiveMode>()._centerPromptList;
*/
}
}
}

View File

@ -339,28 +339,15 @@ namespace NewHorizons.Utility
return (Locator.GetPlayerRulesetDetector()?.GetPlanetoidRuleset()?.GetGravityVolume() != null);
}
// Replacing the entire method
public static bool OnShipLogControllerUpdate(ShipLogController __instance)
{
if (__instance._exiting)
{
if (__instance._canvasAnimator.IsComplete())
{
__instance.enabled = false;
__instance._shipLogCanvas.gameObject.SetActive(false);
}
return false;
}
if (OWInput.GetInputMode() != InputMode.ShipComputer)
{
return false;
}
if (__instance._exiting
|| OWInput.GetInputMode() != InputMode.ShipComputer
|| __instance._currentMode.AllowCancelInput() && OWInput.IsNewlyPressed(InputLibrary.cancel, InputMode.All)
|| ShipLogBuilder.StarChartMode == null)
return true;
__instance._exitPrompt.SetVisibility(__instance._currentMode.AllowCancelInput());
if (__instance._currentMode.AllowCancelInput() && OWInput.IsNewlyPressed(InputLibrary.cancel, InputMode.All))
{
__instance.ExitShipComputer();
return false;
}
__instance._currentMode.UpdateMode();
if (__instance._currentMode.AllowModeSwap() && OWInput.IsNewlyPressed(InputLibrary.swapShipLogMode, InputMode.All))
{
@ -380,7 +367,6 @@ namespace NewHorizons.Utility
__instance._currentMode.EnterMode(focusedEntryID, null);
__instance._oneShotSource.PlayOneShot(flag ? global::AudioType.ShipLogEnterDetectiveMode : global::AudioType.ShipLogEnterMapMode, 1f);
}
return false;
}
}