Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #12 from Crzyrndm/master
Browse files Browse the repository at this point in the history
Update from parent.
  • Loading branch information
Kerbas-ad-astra committed Nov 28, 2015
2 parents 88c23a2 + 39754db commit 8b9b27d
Show file tree
Hide file tree
Showing 49 changed files with 61 additions and 14 deletions.
14 changes: 4 additions & 10 deletions FilterExtension/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ private void checkAndMarkConflicts()
/// </summary>
public void namesAndIcons(PartCategorizer.Category category)
{
List<string> toRemove = new List<string>();
HashSet<string> toRemove = new HashSet<string>();
foreach (PartCategorizer.Category c in category.subcategories)
{
if (removeSubCategory.Contains(c.button.categoryName))
Expand Down Expand Up @@ -499,13 +499,9 @@ private static void loadIcons()
Log("Duplicated texture name \"" + t.name.Split(new char[] { '/', '\\' }).Last() + "\" at:\r\n" + t.name + "\r\n New reference is: " + name);
}

if (!Instance.iconDict.ContainsKey(name))
{
RUI.Icons.Selectable.Icon icon = new RUI.Icons.Selectable.Icon(name, t.texture, selectedTex, false);
Instance.iconDict.Add(icon.name, icon);
}
RUI.Icons.Selectable.Icon icon = new RUI.Icons.Selectable.Icon(name, t.texture, selectedTex, false);
Instance.iconDict.TryAdd(icon.name, icon);
}
Destroy(selectedTex);
}

/// <summary>
Expand All @@ -519,9 +515,7 @@ public static RUI.Icons.Selectable.Icon getIcon(string name)
return PartCategorizer.Instance.iconLoader.iconDictionary[fallbackIcon];

RUI.Icons.Selectable.Icon icon;
if (Instance.iconDict.TryGetValue(name, out icon))
return icon;
if (PartCategorizer.Instance.iconLoader.iconDictionary.TryGetValue(name, out icon))
if (Instance.iconDict.TryGetValue(name, out icon) || PartCategorizer.Instance.iconLoader.iconDictionary.TryGetValue(name, out icon))
return icon;
return PartCategorizer.Instance.iconLoader.iconDictionary[fallbackIcon];
}
Expand Down
7 changes: 5 additions & 2 deletions FilterExtension/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ IEnumerator editorInit()
yield return null;
if (Core.Instance.debug)
Core.Log("Starting on general categories");
// run everything

// all FE categories
foreach (customCategory c in Core.Instance.Categories)
{
if (c.behaviour == categoryTypeAndBehaviour.None || c.behaviour == categoryTypeAndBehaviour.Engines)
Expand All @@ -66,9 +67,10 @@ IEnumerator editorInit()
// wait again so icon edits don't occur immediately and cause breakages
for (int i = 0; i < 4; i++)
yield return null;
// edit names and icons of all subcategories
if (Core.Instance.debug)
Core.Log("Starting on late categories");

// generate the set of parts to block
if (blackListedParts == null)
{
#warning not known until now which parts are never visible so some completely empty subcategories may be present on the first VAB entry
Expand All @@ -82,6 +84,7 @@ IEnumerator editorInit()
c.initialise();
}

//
foreach (PartCategorizer.Category c in PartCategorizer.Instance.filters)
Core.Instance.namesAndIcons(c);

Expand Down
2 changes: 1 addition & 1 deletion FilterExtension/Utility/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace FilterExtensions.Utility
public static class Extensions
{
/// <summary>
/// adds the <key, value> set to the Dictionary if the key is unique
/// adds the (key, value) set to the Dictionary if the key is unique
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="U"></typeparam>
Expand Down
29 changes: 29 additions & 0 deletions GameData/000_FilterExtensions Configs/Default/Mod_KPBS.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
CATEGORY:NEEDS[PlanetarySurfaceStructures]
{
name = Planetary Base Systems
icon = PlanetaryBaseInc
colour = #FFF0F0F0
all = true

FILTER
{
CHECK
{
type = folder
value = PlanetaryBaseInc
}
}

SUBCATEGORIES
{
list = 0,Pods
list = 1,Fuel Tanks
list = 2,Engines
list = 3,Command and Control
list = 4,Structural
list = 5,Aerodynamics
list = 6,Utility
list = 7,Science
list = 8,Undefined
}
}
Binary file modified GameData/000_FilterExtensions/FilterExtensions.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion GameData/000_FilterExtensions/FilterExtensions.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"NAME":"Filter Extensions","URL":"https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions/FilterExtensions.version","DOWNLOAD":"https://github.com/Crzyrndm/FilterExtension/releases","VERSION":{"MAJOR":2,"MINOR":4,"PATCH":1,"BUILD":0},"KSP_VERSION":{"MAJOR":1,"MINOR":0,"PATCH":4}}
{"NAME":"Filter Extensions","URL":"https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions/FilterExtensions.version","DOWNLOAD":"https://github.com/Crzyrndm/FilterExtension/releases","VERSION":{"MAJOR":2,"MINOR":4,"PATCH":1,"BUILD":3},"KSP_VERSION":{"MAJOR":1,"MINOR":0,"PATCH":5}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Mod Name,Forum Page,Mod Author,Icon/Folder
Advanced Landing Capsule for Orbital Rendezvous,http://forum.kerbalspaceprogram.com/threads/54925,alexustas,ASET
Atomic Age,http://forum.kerbalspaceprogram.com/threads/104855,Porkjet,AtomicAge
Behemoth Aerospace Engineering Large Parts Pack,http://forum.kerbalspaceprogram.com/threads/124064,greystork,BAE
Corvus -1.25m Two Kerbal Pod,http://forum.kerbalspaceprogram.com/threads/121062,OrionKermin,Corvus
Corvus Extras,http://forum.kerbalspaceprogram.com/threads/121062,OrionKermin,Corvus Extras
Phoenix Industries Cargo Resupply System,http://forum.kerbalspaceprogram.com/threads/122510,MoviesColin,CTN
AstroGamer's EnginesPlus,http://forum.kerbalspaceprogram.com/threads/127424,AstroGamer,EnginesPlus
Electric Thrust Engine,http://forum.kerbalspaceprogram.com/threads/121645,JarDev,JarDev
K2 Command Pod,http://forum.kerbalspaceprogram.com/threads/104925,jfjohnny5,JFJohnny5
Kerbal Historical Institute,http://forum.kerbalspaceprogram.com/threads/99020, blspblackdeath / Fiddlestyx / TheMoonRover,KerbalHistoricalInstitute
MI - Fuel Tank Expansion,http://forum.kerbalspaceprogram.com/threads/109885,MunarIndustries,MunarIndustries
Taurus HCV - 3.75 m Stock-ish Crew Pod ,http://forum.kerbalspaceprogram.com/threads/75074,jnrobinson / bsquiklehausen,RSCapsuledyne
SETI-CommunityTechTree,http://forum.kerbalspaceprogram.com/threads/106130, Yemo,SETIctt
Sigma OPM Expansion,http://forum.kerbalspaceprogram.com/threads/112095,Sigma88,Sigma
SpaceY Heavy Lifters Parts Pack,http://forum.kerbalspaceprogram.com/threads/100408, NecroBones,SpaceY-Lifters
SXT - Stock eXTension,http://forum.kerbalspaceprogram.com/threads/24906, Lack,SXT
Mk. 1-1 A2 ,http://forum.kerbalspaceprogram.com/threads/98250,Yarbrough08,Yarbrough08
Vanguard Astrodynamics VX Series Stockalike Engine,http://forum.kerbalspaceprogram.com/threads/127803,Randazzo,VanguardAstrodynamics
Heat Management,http://forum.kerbalspaceprogram.com/threads/118189,Randazzo,HeatManagement
Stock Part Revamp,http://forum.kerbalspaceprogram.com/threads/92764,Ven,VenStockRevamp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8b9b27d

Please sign in to comment.