shadowmage45 / SSTULabs

Dev repository for testing/unfinished KSP parts/plugins/etc.
Other
62 stars 41 forks source link

Lightweight and Superlightweight Tank upgrades unavailable #731

Closed norcalplanner closed 5 years ago

norcalplanner commented 5 years ago

Playing a 1.4.5 modded career with CTT, the upgrades for lightweight and superlightweight tanks are not available in the R&D complex in the current version of SSTU. Was discussed briefly on the forums on July 4/5 in this post and just wanted to make sure it didn't fall off the radar.

shadowmage45 commented 5 years ago

Is this only with CTT installed, or all of the time?

norcalplanner commented 5 years ago

Good question. I'll yank CTT and start a new career to see if it's specific to that and let you know the result.

shadowmage45 commented 5 years ago

Seem to be being caused by a null-reference somewhere in the stock part-upgrade system, likely caused by an incorrect config somewhere in SSTU:

[EXC 10:08:12.607] NullReferenceException: Object reference not set to an instance of an object
    KSP.UI.Screens.EditorPartIcon.InstantiatePartIcon ()
    KSP.UI.Screens.EditorPartIcon.Create (KSP.UI.Screens.EditorPartList partList, .AvailablePart part, Single iconSize, Single iconOverScale, Single iconOverSpin)
    KSP.UI.Screens.RDPartListItem.Setup (System.String label, System.String buttonState, .AvailablePart availablePart, .Upgrade upgrade)
    KSP.UI.Screens.RDPartList.SetPart (KSP.UI.Screens.RDPartListItem item, Boolean unlocked, System.String label, .AvailablePart part, .Upgrade upgrade)
    KSP.UI.Screens.RDPartList.AddUpgradeListItem (.Upgrade upgrade, Boolean purchased)
    KSP.UI.Screens.RDPartList.AddUpgrades (System.Collections.Generic.List`1 purchased, System.Collections.Generic.List`1 available)
    KSP.UI.Screens.RDPartList.SetupParts (KSP.UI.Screens.RDNode node)
    KSP.UI.Screens.RDController.ShowNodePanel (KSP.UI.Screens.RDNode node)
    KSP.UI.Screens.RDNode.NodeInput ()
    UnityEngine.Events.InvokableCall.Invoke ()
    UnityEngine.Events.UnityEvent.Invoke ()
    KSP.UI.UIStateButton.<Awake>m__0 ()
    UnityEngine.Events.InvokableCall.Invoke ()
    UnityEngine.Events.UnityEvent.Invoke ()
    UnityEngine.UI.Button.Press ()
    UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData)
    UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData)
    UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor)
    UnityEngine.EventSystems.EventSystem:Update()
[EXC 10:08:12.622] ArgumentNullException: Argument cannot be null.
Parameter name: key
    System.Collections.Generic.Dictionary`2[AvailablePart,System.Int32].ContainsKey (.AvailablePart key)
    ResearchAndDevelopment.IsExperimentalPart (.AvailablePart ap)
    KSP.UI.Screens.EditorPartIcon.CheckExperimental ()
    KSP.UI.Screens.EditorPartIcon.Update ()
shadowmage45 commented 5 years ago

Caused by the old part name still being referenced in the upgrade part files... (stupid stock crap where you need a full 'part' config just to get an icon for the upgrade...).

Names have been fixed, and it appears to be working agian....