Jump to content

Adding Biome Detection to Plugin


toadicus

Recommended Posts

I'm looking into adding biome detection to an informational addon. Looking through the API, the most straightforward method seems to be:

Vessel V = Vessel();
CBAttributeMap.MapAttribute TheAttribute = V.mainBody.BiomeMap.GetAtt(V.latitude * Math.PI / 180d, V.longitude * Math.PI / 180d);

The problem with that is that CBAttributeMap.GetAtt posts a debug message to ScreenMessageStyle.UPPER_RIGHT, which is ugly the first time and a huge nuisance when the UI is running at high frame rates.

So, I took it upon myself to rewrite CBAttributeMap.GetAtt. I can't find what I missed... anyone else care to put eyes on this?

Here's my code: http://pastebin.com/XWtLnnS9

TIA

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