Jump to content

[0.25.0] Part Search 1.3.0 (cont.)


Banbury

Recommended Posts

Part Search 1.3.0

Part Search adds a quick search window to the Vehicle Assembly Building (VAB) and the Space Plane Hangar (SPH). When entering text in the search window, the addon searches for (partial) matches in the names and descriptions of vehicle parts. The parts window is filtered dynamically to only contain the matching parts. Finding those elusive landing gears is now just a matter of a few key presses.

screenshot0.jpg

Download

Kerbal Stuff

Github

Changes

1.3.0 (11.10.14)

  • Now using PartListFilter for better compatibility with other mods.
  • Fix for duplicated toolbar button.
  • Nicer icon by CaptRobau.
  • Category buttons are hidden when '∞' button is pressed.
  • Part List is reset to first page when search text is changed.
  • Text box gets focus when the search window is opened.

1.2.0 (03.10.14)

  • GUI is now inside a window
  • Window can be toggled via toolbar
  • Support for KSP-AVC

Installation

Copy all the files to the GameData directory in your KSP installation.

Usage

After successful installation the the toolbars in the VAB and SPH display a new button named 'Find'. This button will toggle the search window on and off.

The search window can be moved around freely. The addon remembers the last position of the window. The window contains a text field and two buttons. Clicking in the text field allows entering text. While typing the part window displays only the parts matching the search term. For example typing 'tank' will show all parts whose name or description contain the string tank (this includes partial matches).

The button marked 'C' clears the contents of the textfield.

When the '∞' button is clicked searches include all parts in all categories. Otherwise only the current category is searched. The category buttons will be hidden until the button is clicked again or the search window is closed.

Notes

  • If a search is started, while the part window is not on the first page, the search results might not be visible. Use the 'Previous Page' button to switch to the first page.
  • If the search window is not visible when clicking the find button, try deleting the file PartSearch\PluginData\PartSearch\config.xml. This resets the window position. The game must be restarted to see the effect.
  • Part Search might interfere with other addons, that manipulate the part window. Thanks to a hint by BlackNecro the latest version is now using PartListFilter, which should help with compatibility.

Thanks

  • CaptRobau for the pretty toolbar icon
  • BlackNecro for the hint with the PartListFilter

This mod was originally written by IcculusC.

Edited by Banbury
Update for KSP 0.25
Link to comment
Share on other sites

Saw the simple toolbar icon you were using and had some spare time, so I made a more visually appealing one for you to use. A credit somewhere is all that's needed for that, if you want to use it of course.

https://dl.dropboxusercontent.com/u/23500849/tbbutton.png

Really Nice! Thanks!

I will use it with the next release.

And I'll add your name to the license text. But I'd need some license to fit with the MIT code. Creative Commons maybe?

Link to comment
Share on other sites

Makes sense. I have a suggestion, btw. Sometimes the description or name of a part doesn't contain the words it's most commonly associated with. A lot of the solar panels for example don't have the word solar in them, even though people instinctively would want to search using that term. Same goes for 'ladder' for the Mobility Enhancers, nuclear for the LV-N and so on. My suggestion would be to have a simple tag module, which adds a term that Part Search could then look for. Would something like that be possible?

Link to comment
Share on other sites

Makes sense. I have a suggestion, btw. Sometimes the description or name of a part doesn't contain the words it's most commonly associated with. A lot of the solar panels for example don't have the word solar in them, even though people instinctively would want to search using that term. Same goes for 'ladder' for the Mobility Enhancers, nuclear for the LV-N and so on. My suggestion would be to have a simple tag module, which adds a term that Part Search could then look for. Would something like that be possible?

Possible? Everything's possible. The programming wouldn't be the hard part. Maintaining the tags would be a lot of continuous work, especially with mods. If anyone volunteers to keep the tags updated, then I'll add the feature.

Link to comment
Share on other sites

I can do a Module Manager config for stock, but I think mods can just maintain that on their own. They often do with other mods, like LifeSupport, FAR, etc.

I don't think Part Search has enough traction to make modders support it.

Link to comment
Share on other sites

Nice compact little widget, if you want to make sure it works with other mods that work with the partlist you should use the ExcludeFilters provided by the EditorPartList, instead of messing with the PartList directly.


private bool MyFilterFunction(AvailablePart part)
{
return someCustomPartIsVisibleFunction(part)
}

EditorPartListFilter PartFilter = new EditorPartListFilter("MyPartFilter", MyFilterFunction);
EditorPartList.Instance.ExcludeFilters.AddFilter(PartFilter);

Link to comment
Share on other sites

Nice compact little widget, if you want to make sure it works with other mods that work with the partlist you should use the ExcludeFilters provided by the EditorPartList, instead of messing with the PartList directly.

Thanks for pointing that out. That's a good reason for another version.

I see, that PartCatalog has support for tags. Do mod authors use them?

Link to comment
Share on other sites

  • 2 weeks later...
I don't like the hardcoded keyboard shortcuts mods currently use. Too much risk for conflicts. I'm currently looking into a solution for key bindings for mods. I have made a good start, but it's a lot of work.

Yeah I'm not a fan of that either. A config file or something would be nice.

Link to comment
Share on other sites

  • 2 months later...

Doesn't appear so.

[LOG 21:23:57.219] Load(Assembly): PartSearch/PartSearch
[LOG 21:23:57.220] AssemblyLoader: Loading assembly at C:\Users\Borisbee\Desktop\Kerbal Space Program .90\GameData\PartSearch\PartSearch.dll
[LOG 21:23:57.224] AssemblyLoader: Loading assemblies
[ERR 21:23:57.279] AssemblyLoader: Exception loading 'PartSearch': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0

Additional information about this exception:

System.TypeLoadException: Could not load type 'PartSearch.PSBehaviour' from assembly 'PartSearch, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

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...