Jump to content

For the love of Buddha...


Recommended Posts

So that I might achieve harmony with the heavens, I'd love to have the order I sort parts by remembered. 

I always want my parts to be sorted by mass because it  is useful. Sort by name (the default) is always pointless and sort by cost pointless to me as I only play science mode or sandbox.  

I know its only a click away to change the sort but a small nagging pain to have to do it on every return to the VAB/SPH. How hard would it would for Squad to sneak into the settings file the last order I used?

Om. 

Link to comment
Share on other sites

  On 5/24/2017 at 4:06 PM, Foxster said:

Umm, I don't recall the pre-1.2 sorting being that different. You mean what appeared on what tab?

Expand  

Yeah they split everything up into more precise tabs and it seems I'm the 1% that dislikes it. I still go to structural for decouplers, utility for docking ports and electrical components and aero for the fairings.

...Ugh...

Link to comment
Share on other sites

  On 5/24/2017 at 4:14 PM, Foxster said:

I'm fairly sure that there is a customising mod that lets you set your own part groups. Or is it maybe even stock now?

Expand  

If there's a mod to reset it to the classic setting, I don't know of it and it isn't in 1.2.2. I can't update to 1.2.9 so I wouldn't know if it has for that version or for the upcoming 1.3 update. Hope it is.

Link to comment
Share on other sites

  On 5/24/2017 at 4:16 PM, ZooNamedGames said:

If there's a mod to reset it to the classic setting, I don't know of it and it isn't in 1.2.2. I can't update to 1.2.9 so I wouldn't know if it has for that version or for the upcoming 1.3 update. Hope it is.

Expand  

You can move the parts with module manager.  The new tabs will remain though.

Link to comment
Share on other sites

  On 5/30/2017 at 5:23 PM, Foxster said:

It's a pity that the least useful sort (by name) is the default one.

Expand  

I gave it a shot, but the area of the API in question is not documented at all.  I despise coding by experimentation, that's why I don't have many KSP mods.  If someone wants to try and continue the work, this is the code I started on.  It doesn't work.

using UnityEngine;
using KSP.UI.Screens;

namespace SortByMass
{
    [KSPAddon(KSPAddon.Startup.EditorAny, true)]
    public class SortByMass : MonoBehaviour
    {
        [KSPField(guiActive = false, isPersistant = true)]
        int sortMode;

        [KSPField(guiActive = false, isPersistant = true)]
        bool ascending;

        [KSPField(guiActive = false, isPersistant = true)]
        bool isSorted = false;

        public void Awake()
        {
            PartCategorizer.Instance.editorPartList.partListSorter.AddOnSortCallback(onSort);
            GameEvents.onEditorShowPartList.Add(sort);
        }

        public void onSort(int mode, bool asc)
        {
            sortMode = mode;
            ascending = asc;
            isSorted = true;
        }

        public void sort()
        {
            if (isSorted)
            {
                PartCategorizer.Instance.editorPartList.partListSorter.startSortingMode.SetState(sortMode);
                PartCategorizer.Instance.editorPartList.partListSorter.startSortingAsc = ascending;
                PartCategorizer.Instance.editorPartList.Refresh();
            }
        }
    }
}

 

Link to comment
Share on other sites

  On 5/31/2017 at 4:56 AM, ZooNamedGames said:

Let me know if you get anywhere with my idea.

Expand  

Well, if all you want is "stop putting those parts in the new, fine-grained categories, and put them back where they used to be", then that's barely even a mod-- I don't think any code is needed, you could do it with just a simple ModuleManager patch.  (e.g. "for every part in the 'electrical' category, set it to 'utility' category" or whatever you like).

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...