![]() ![]() ![]() This allows the user to chose from a range of options. If you add and remove resources, you will need to force a refresh of the part tweaker window like this: UIPartActionWindow window = part.FindActionWindow() The amount and max amount are displayed with four significant figures of accuracy. You can change the amount and maxAmount variables in your PartResource object in the editor, and they will be updated in the tweaker. SI Formatting and dynamic updating for resources in the editor įor this example, the tankVolume variable is in kL, and will be displayed with 3 sig figs of accuracy. Just use an 'S' type format code and SI prefixes will be handled. If backwards compatibility breaks, I will ensure that the user is warned to upgrade plugins. ![]() To use these you must include the KSIAPIUtils.dll in your project rather than just copying the code as there's an election process to ensure the latest version is being run. ![]() Improvements to tweakablesĪvailable is two extra tweakable controls, plus improvements to the stock tweakers. Utility methods to determine relationships between parts, plus some debugging code. The main feature of this is formatting of floats and doubles with SI prefixes.ġ254.ToStringExt("S3") -> "1250" (4 digit numbers do not use k as a special case)ġ2540.ToStringExt("S3") -> "1.25 k" (using SI prefixes)ġ2540.ToStringExt("S4") -> "1.254 k" (more significant figures) If you don't want to distribute the whole DLL with your plugin, you can just copy the appropriate source file into your project. There are a number of utility classes available that do different functions. This add in is useful for providing some functions that make interacting with the KSP API functionally nicer and with an improved interface. New extensions and utilities for Kerbal Space Program by Lisias. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |