Romfarer

Members
  • Content count

    523
  • Joined

  • Last visited

Community Reputation

107 Excellent

2 Followers

About Romfarer

  • Rank
    Developer
  1. You still get an option to launch anyway.
  2. The AppLauncher or Application Launcher is a gui toolbar we use to display the MessageSystem, Resource system, currency widgets, contracts app etc. It is also used by mods. The note i had about it this week only concerns the mods and won't have any effect on the stock apps i mentioned. The main part of the update was to make it launch correctly wherever the modders choose to launch the game, for testing purposes mainly in order to speed things up a bit. Before it was rigged to the spacecenter and wouldn't display if a modder used the "launch directly to a scene" method. Making the applauncher active like this had a natural side effect (we can make it display in the mainmenu), so i enabled it because modders have requested this functionality in the past. Again, if you are not a modder these changes won't have any effect on your game experience.
  3. Editor Toolbar Modding Guide: The editor toolbar runs of the class PartCategorizer. Each button on the toolbar is handled by the class PartCategorizer.Category and the actual button is a PartCategorizerButton. There are a myriad of ways to customize your custom filters using these classes but for simplicity i have added two static methods to PartCategorizer which simplifies the process of adding custom filters. How to add a simple custom filter: The following code example explains how to add a simple custom filter. //instantiate the icon Icon myIcon = new PartCategorizer.Icon("my icon", iconTexture_normal, iconTexture_selected); //add a custom filter to the toolbar Category myFilter = PartCategorizer.AddCustomFilter("my filter", myIcon, Color.yellow); //add subcategories to the filter you just added PartCategorizer.AddCustomSubcategoryFilter(myFilter, "filter 1", myIcon, p => p.name.Contains("engine")); PartCategorizer.AddCustomSubcategoryFilter(myFilter, "filter 2", myIcon, p => p.name.Contains("fuel")); PartCategorizer.AddCustomSubcategoryFilter(myFilter, "filter 3", myIcon, p => p.name.Contains("wing")); Lets break it down "line by line" Icon myIcon = new PartCategorizer.Icon("my icon", iconTexture_normal, iconTexture_selected); and the signature... /// <summary> /// Constructor for Icon /// </summary> /// <param name="name">The identifier of the icon</param> /// <param name="iconNormal">The "normal" state of the icon</param> /// <param name="iconSelected">The "selected" state of the icon</param> /// <param name="simple">If true you only have to specify the selected state of the icon. A black "normal" state will be generated automatically.</param> public Icon(string name, Texture iconNormal, Texture iconSelected, bool simple = false) Icons are instantiated using the PartCategorizer.Icon class. It's signature is Icon(string name, Texture iconNormal, Texture iconSelected, bool simple = false). "name" is not really important when instantiating the icons via code like this. But if you had loaded the icon by placing it in GameData\Squad\PartList\SimpleIcons or Icons this would be the identifier used to retrieve the icon with PartCategorizer.Instance.GetIcon("myIcon"); That said you can choose wether to instantiate the icon by code (leaving it for your button only) or put it in those folders and make it available for everyone to use on their custom categories. static public Category AddCustomFilter(string filterName, Icon icon, Color colorButton) and the signature... /// <summary> /// Adds a filter to the "right side" toolbar list. /// </summary> /// <param name="filterName">The name of the filter which will appear on the tooltip</param> /// <param name="icon">The icon for the button</param> /// <param name="colorButton">The color of the button</param> /// <returns>A reference to the Category wrapper</returns> static public Category AddCustomFilter(string filterName, Icon icon, Color colorButton) The signature is pretty much self explanatory. PartCategorizer.AddCustomSubcategoryFilter(myFilter, "filter 1", myIcon, p => p.name.Contains("engine")); and the signature... /// <summary> /// Adds a filter subcategory to the given filter which will appear on the right side of the toolbar /// </summary> /// <param name="mainFilter">The filter (Category) you are adding this filter to</param> /// <param name="subFilterName">The name of the filter which will appear on the tooltip</param> /// <param name="icon">The icon for the button</param> /// <param name="exclusionFilter">Lambda expression which specifies which parts to show when this filter is active</param> /// <returns>A reference to the Category wrapper</returns> static public Category AddCustomSubcategoryFilter(Category mainFilter, string subFilterName, Icon icon, Func<AvailablePart, bool> exclusionFilter) This is almost the same as the method to add a main filter. Except the exclusionFilter which is the whole point of the filter. In this simple example i have specified the expression p => p.name.Contains("engine"). All this does is filter out all parts where "engine" appears in the part name. "p" is a reference to AvailablePart and you can use any of it's fields to filter parts. Some additional examples: p => p.moduleInfos.Exists(q => q.moduleName == "Parachute") This will filter out all parts that has a partModule called "Parachute". p => p.resourceInfos.Exists(q => q.resourceName == "Liquid Fuel") This will filter out all parts containing "Liquid Fuel". p => p.manufacturer == "Probodobodyne Inc" This will filter out all parts made by Probodobodyne Inc. When to add custom filters: The editor toolbar is ready to receive custom filters when this GameEvent is fired. GameEvents.onGUIEditorToolbarReady How to add auto generated filters: You may also want to make filters in a more automated way. //instantiate the icon Icon myIcon = new PartCategorizer.Icon("my icon", PartCategorizer.Instance.fallbackIcon.iconNormal, PartCategorizer.Instance.fallbackIcon.iconSelected); //add a custom filter to the toolbar Category myFilter = PartCategorizer.AddCustomFilter("my resource filter", myIcon, Color.yellow); //Get a unique list of available resources List<String> resources = new List<string>(); foreach (AvailablePart ap in PartLoader.LoadedPartsList) foreach (AvailablePart.ResourceInfo apr in ap.resourceInfos) if (!resources.Contains(apr.resourceName)) resources.Add(apr.resourceName); foreach (string str in resources) { string myResourceName = str; //It is imperitive to declare this //add subcategories to the filter you just added PartCategorizer.AddCustomSubcategoryFilter(myFilter, "filter by " + myResourceName, myIcon, p => p.resourceInfos.Exists(q => q.resourceName == myResourceName)); } This is basically the same code we use to generate the stock resource filter and it filters parts by the resource it holds. Keep in mind, when you generate filters like this, it is important to declare the myResourceName string within the for loop.
  4. All plugins updated for 0.90 compatibility enjoy
  5. Ok the issue here is that the Application Launcher hides itself in GameEvents.onGameSceneLoadRequested as well. In 0.25 i'm therefore adding a second level event which will fire just before the Application Launcher is about to become !Ready. The event looks like it will be called GameEvents.onGUIApplicationLauncherUnreadifying and it will send with it the GameScene it is about to enter just like onGameSceneLoadRequested.
  6. Never seen that bug before. How does it affect the lazor gui?
  7. Whatever gui framework we go with, we will always have to extend it with our own implementations for non-standard stuff. Currently there are 3 gui frameworks in action in ksp. The only point atm where EzGUI comes short is in the way it handles text and especially text input. We have overcome the biggest hurdles with text display though. If the Unity GUI overhaul delivers better way of handling text input we will probably start using it as well. That said, just because unity comes out with a new way to handle GUI programming doesn't mean we will re-write the whole GUI code of ksp to match it as it would be an extremely time consuming task.
  8. This would mean that the slider moves with 0 increments and then only snaps to an increment once you release the knob. It's easier to implement though and might actually work better for setups with large increments.
  9. Please send me a persistence or save file with a little description of what exactly you have to do to reproduce this bug.
  10. If you can't see the texture you have to send me your log so i can figure out why it's not loading properly...
  11. Should work fine afaik, been playing around with it a bit myself lately testing some experimental planes. I flew around kerbin in this plane http://i.imgur.com/5Rk0BrP.png
  12. Not anytime soon.
  13. I see your point and it is a fair one. But i can't just revert it back to allowing timewarp at extended loading distances cause in my opinion that creates move havoc. So i guess the only option is to run a check for vessels that would be destroyed by activating timewarp and alerting the player about it.
  14. @montyben101 I'm having problems seeing what exactly causes the bug you are experiencing. From what you have said it involves the robotic arms, grabbing a kerbal on eva and not being able to recover. It's not much to go on.
  15. I'm confused. The extended loading range of my plugin sure adds stress on the engine and it is to be expected, after all there is a good reason why the loading range was set the way it is within the game. It was never the goal of my plugin to destroy any crafts or kerbals automatically, but sure, careless use of it will in some cases bring havoc where you don't expext it.