Ezriilc / HyperEdit

A plugin for Kerbal Space Program.
http://www.Kerbaltek.com/hyperedit
GNU General Public License v3.0
41 stars 30 forks source link

This pull contains changes to Hyperedit to support a fairly simple API, as well as a bug fix #5

Closed linuxgurugamer closed 8 years ago

linuxgurugamer commented 8 years ago

The bug fix is that currently, if Hyperedit is open in a flight scene and you revert to the VAB, it continues to display. The fix prevents that from happening by closing HyperEdit when that happens.

The API is merely two functions, one to display Hyperedit, and one to close it. The first one allows the mod to specify which hyperedit sections to be displayed.

This is needed for my new mod, which is a simulation mod, based on the old unreleased HoloDeck mod (with the author's permission). I tried to keep the changes as minimal and uninvasive as possible, and verified that the normal functionality still works

khyperia commented 8 years ago

Please fix your editor's whitespace and reformat, as hyperedit uses spaces, not tabs. Feel free to rebase/overwrite your existing commits in this pull.

From a higher-up viewpoint, as the maintainer, I can't provide any guarantees about API stability and I don't see how this is sustainable going forward. What are you trying to accomplish here? It sounds like you're trying to embed HyperEdit into your own mod and restrict some of it's functionality.

Neither of these are things I intended when creating it - again, API stability should not be a thing to depend on. If you only need, for example, orbit manipulation, copying code may be better than an API. Our license is GPL, all the code for orbit manipulation is in Model/OrbitEditor.cs (or redistribute your fork - however, make sure to follow GPL). Also, restricting functionality is something that goes against the core idea of HyperEdit, which is to expose as much of KSP's internals as possible and allowing them to be manipulated.

Also, I've made a point to not special-case other mods in hyperedit, for various reasons (for example, Blizzy's Toolbar). This pull is similar.

That said, thank you for your interest in the project and the effort you've put into modifying it! If you'd like to spin it a different way, I'd be happy to consider it again.

linuxgurugamer commented 8 years ago

HyperEdit has lots of features, but sometimes, when another mod would want to call it, for that specific situation all the features may not be desirable. In my case, for a simulation mod, I want to have both the orbit and landing functionality, but nothing else. I can certainly fork it, and will do so (keeping the fork in the GPL) if necessary. But then there will be multiple copies of the same thing, and anytime HyperEdit gets updated, all the associated forks will also need to be updated by those maintainers. In my mind, I feel that having a single copy of the code, which can be called in different ways, is preferable to having multiple, specific forks.

The tabs to spaces is (I hope) easy to do, if nothing else I can do it manually. If there is a different way you'd like this to be done, let me know and I'll see what I can do.

linuxgurugamer commented 8 years ago

Which version of the GPL do you use, I don't see it in the repo. I'm including some functions from this, and would like to put the license at the top, since the rest of the mod will be the mit license Thanks

linuxgurugamer commented 8 years ago

Also, can you give me text to put at the top to provide the proper attribution? Thanks

Ezriilc commented 8 years ago

HyperEdit is released under the GPL3, or most current version. As you may know, the GPL requires that you also license any and all derivative works under the GPL. We feel this is important to maintain the open spirit of KSP mods, as does Squad.

The only attributions required would be for khyperia as the inventor and author.

Thanks for asking about this, and good luck with your project! Please let us know how it goes.

linuxgurugamer commented 8 years ago

Well, I'm using some of your functions, have isolated them in their own files. The sim mod is under the MIT license, so what I'm doing is stating at the top of the files from Hyperedit the credits and the license covering it.

The rest of the mod will be the MIT license. Not sure what else to do.

The mod has been released to a tester, waiting for feedback.

Ezriilc commented 8 years ago

Fair enough.

linuxgurugamer commented 8 years ago

If you'd like to try it out, let me know

linuxgurugamer commented 8 years ago

Do you know how to tell how tall a ship is? I want to prevent sims starting at landing from being just below the surface.

linuxgurugamer commented 8 years ago

I figured out how to get the size of the ship On Feb 21, 2016 2:16 PM, "Ezriilc" notifications@github.com wrote:

Fair enough.

— Reply to this email directly or view it on GitHub https://github.com/Ezriilc/HyperEdit/pull/5#issuecomment-186893866.