forked from FractalUK/KSPInterstellar
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from DMagic1/development
ORS Resource Fixes
- Loading branch information
Showing
2 changed files
with
38 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3722464
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why I shouldn't enter changes manually...
https://github.com/WaveFunctionP/KSPInterstellar/blob/development/OpenResourceSystem/ORSPlanetaryResourceMapData.cs#L9
needs to be made internal or public, otherwise it will default to private and won't be readable by the scanner module.
3722464
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very experienced, but wouldn't it be a good idea to leave it private and instead provide a public function to return the data? one that can be overridden?
edit: I'm an idiot. static removes the possibility of conflicting data right?
3722464
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a bad idea. Something like
it eliminates the possibility of anyone breaking something from outside. You might also want a function for returning the ORSPlanetaryResourceInfo value too.
3722464
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I may try something like that. I have a hard time wrapping my head around instancing and access stuff.
3722464
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they should probably be static methods, too. So it's just: