magico13 / KCT

Kerbal Construction Time - An addon for Kerbal Space Program
29 stars 40 forks source link

Simulation is broken in 1.2.1 #146

Closed petersohn closed 7 years ago

petersohn commented 7 years ago

I am using the latest commit on the development branch. When I try to enter simulation, the game controls get completely locked up. Looking at the logs, the following exceptions are spammed infinitely:

[EXC 15:13:00.763] NullReferenceException: Object reference not set to an instance of an object
    KerbalConstructionTime.KCT_GUI.SetGUIPositions (UnityEngine.WindowFunction OnWindow)
    KerbalConstructionTime.KerbalConstructionTime.OnDraw ()
    KerbalConstructionTime.KerbalConstructionTime.OnGUI ()
[EXC 15:13:00.789] NullReferenceException: Object reference not set to an instance of an object
    KerbalConstructionTime.KCT_GUI.DrawEditorGUI (Int32 windowID)
    UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)
    UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)

I tried it in a new game, and the simultion option doesn't even appear there.

magico13 commented 7 years ago

Simulations and all related code were removed from KCT for 1.2. You have to use an alternative mod, like KRASH, for simulations. I'm not sure how you managed to even get it to ask you about simulations.

petersohn commented 7 years ago

Is it planned to be put back?

Anyway, it is definitely not removed properly, because I managed to start a simulation somehow. Besides, there are things like this in the code, eg. in KCT_GUI.cs:

                if (showSimulationCompleteEditor)
                    centralWindowPosition = GUILayout.Window(8951, centralWindowPosition, KCT_GUI.DrawSimulationCompleteEditor, "Simulation Complete!", HighLogic.Skin.window);
                if (showSimulationCompleteFlight)
                    centralWindowPosition = GUILayout.Window(8952, centralWindowPosition, KCT_GUI.DrawSimulationCompleteFlight, "Simulation Complete!", HighLogic.Skin.window);
                if (showSimulationWindow)
                    simulationWindowPosition = GUILayout.Window(8955, simulationWindowPosition, KCT_GUI.DrawSimulationWindow, "KCT Simulation", HighLogic.Skin.window);
magico13 commented 7 years ago

I'll have to do a more thorough removal I guess. No, it isn't planned to be reintroduced. It's been slated for removal since at least 1.1. It was actually disabled by default in the last releases.

petersohn commented 7 years ago

Never mind. KRASH works way more smoothly than KCT's simulation had been.