Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORS Resource Fixes #23

Merged
merged 4 commits into from
Aug 23, 2014
Merged

Conversation

DMagic1
Copy link

@DMagic1 DMagic1 commented Aug 21, 2014

This fixes three of the dumb, obvious issues that ORS has.

  • The first one, a minor issue, is fixing the way it displays resource concentrations in the scanner context menu.
  • The next, a major one, is preventing duplicate resource info keys from being added to the map dictionary. This solves, or at least reduces the effect of the duplicate resource problem. It will only load the first config that it comes across, but at least it won't implode if people put two resources with the same name in.
    • I also made sure that loading only takes place once per planet; if something goes wrong, repeatedly loading info from the configs is unlikely to fix it.
  • The third issue, another major one, but somewhat harder to come across, is the problem of texture managing mods making the map textures unreadable. This isn't a great solution, it just tests the texture to make sure it can be accessed using the same method that other ORS functions use. If it doesn't work it just skips the rest of that resource config and moves on to the next.

This prevents duplicate entries from being added to the resource_info
dictionary with the same key
This is an admittedly questionable way of going about it;  this
basically tests the offending texture to make sure that it be accessed
properly, if not then it skips this entry and continues to the next.
@confusingbits
Copy link
Owner

Looks good, thank you. :)

confusingbits pushed a commit that referenced this pull request Aug 23, 2014
@confusingbits confusingbits merged commit 3722464 into confusingbits:development Aug 23, 2014
confusingbits added a commit that referenced this pull request Aug 23, 2014
DMagic1 pushed a commit to DMagic1/KSPInterstellar that referenced this pull request Sep 8, 2014
DMagic1 pushed a commit to DMagic1/KSPInterstellar that referenced this pull request Sep 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants