-
Notifications
You must be signed in to change notification settings - Fork 13
ProgressiveCelestialBodies Wrapper API
This reflection wrapper API is used by ResearchBodies but can be used by other mods like SCANSat to set the visibility attributes of CelestialBodies.
If you intend to integrate with ResearchBodies in relation to what bodies have been discovered, etc do NOT use this API, use the RBWrapper API instead.
The Progressive CelestialBody Maps DLL can be used stand-alone from ResearchBodies.
Before you re-distribute or wish to integrate to this DLL please drop me a PM on the KSP forums, Thanks!
Class here:-
https://github.com/JPLRepo/ResearchBodies/blob/master/API/PCBMWrapper.cs
First change the Namespace to your project Namespace.
You must initialise the Wrapper before trying to access it by calling:
PCBMWrapper.InitPCBMWrapper();
this method will return a bool indicating success. You can check that the Wrapper has been initialised and is ready by checking the bool:
PCBMWrapper.APIPCBMReady
You access the fields and methods of the API by accessing the object eg:
PCBMWrapper.actualPCBMAPI.CBVisualMapsInfo
Dictionary<CelestialBody, PCBMCelestialBodyInfo> CBVisualMapsInfo - Returns a Dictionary keyed by CelestialBody of
PCBMCelestialBodyInfo Class.
int currentDetailLevel - The current detail level set for the Celestial Body.
bool setVisualLevel(int level) - Call this method to set the visual level for the Celestial Body. The returned bool indicates if the call was successful or not.
Level 0 = Not visible at all.
Level 1 = lowest level. Greyscale on. Heightmap 32 lowest setting. Shinyness = 0 and Bump map off.
Level 2 = Greyscale On. Heightmap 64. Shinyness = 0 and Bump map off.
Level 3 = Greyscale On. Heightmap 128 , original shinyness / 2 and bump map off.
Level 4 = Greyscale Off. Quarter original detail or 128, original shinyness and bump map off.
Level 5 = Greyscale off. Half original detail, original shinyness and bump map off.
Level 6 = Maximum and bump map on.