Jump to content

Morse

Members
  • Posts

    247
  • Joined

  • Last visited

Everything posted by Morse

  1. I don't. I use icon for identification as an emergency measure, when there are no distinguishable features otherwise, like when a mod uses a home-made wrapper for several buttons, like the "Science!" mod do. If the mod uses a wrapper AND changes icons, then my mod will probably just fail. It was compiled against 1.3.1. It might work with 1.2.2, since the panel functionality wasn't changed, but no guarantees.
  2. I probably won't support this one enough to warrant CKAN listing. Same for docking/undocking. This is mod is very simple, and I intend to leave it this way. For docking/undocking you probably should find something else.
  3. A static list of all the mods that could be accessed using the reflection. Yep, that should solve the task. The whole list would probably be redundant, but a method that would return the name of the button (or of a mod, or... anything, to just show the user where this button came from) and some unique id based on the ApplicationLauncherButton object - that would be nice. Something like /// <summary> /// Checks whether the given button was created by this mod. /// </summary> /// <param name="button">the button to check</param> /// <param name="name">the human-readable description of the button</param> /// <param name="id">the unique ID of the button</param> /// <returns>true, if the button was created by the mod, false otherwise</returns> public static bool IsButtonManaged (ApplicationLauncherButton button, out string name, out string id)
  4. "it's" methods? You don't access methods of the "mod", you access methods of the object. And with your design, every mod that uses your controller will have it's own instance of that object. Of course I could do a global lookup over all the objects in the game every time a new button is added to the stock panel, but that would be so wrong on so many levels...
  5. The hiding of the button I'll manage myself . But when I get a list of buttons from the application panel I need to know which button is which, so that to hide the ones that user chose. I use the combination of "module name" + "callback name", but it won't work for a wrapper. I also use the icon hashcode as an additional identificator, but this is more of an emergency measure, and I don't want to rely on it too much. A "public API" is a vague term. Just adding the methods into the class would be pointless, because I don't even have an access to the object in the first place. Also, I'd rather avoid a hard dependency on your mod, since the user might not even have a single mod that uses it, but will have to install it anyway. ok, let's maybe put it on hold for some time. I have an idea how to store the needed information, but let's wait until your code more or less stabilizes. A method I'm thinking about involves a fair share of black magic, so we'll have to wait for a full moon first
  6. A method where? Your class is supposed to be a component somewhere in the depth of other mods' internals. Also just id would not be enough, since if the button's callback is implemented inside your dll, there won't be even a way to find out what is the name of the mod this button belongs to.
  7. I can already see that this is gonna break my "Adjustable Mod Panel" since all the mods will have exactly the same looking button (same module, same callback). Can you maybe come up with some way of distinguishing one mod from another on the gameobject level?
  8. First of all, what you are calling "KSP's relative inclination" is not form KSP, it's from KER. Second of all, KSP doesn't calculate "relative inclination" at all, it only calculates absolute inclination of an orbit. And finally, third of all, PM doesn't show you relative inclination, it shows your the absolute one, directly from KSP. You can also notice that KER also shows you the absolute orbit inclination in the "orbital" section. KER shows you the current inclination, while PM shows you the planed one. In the second screenshot, where the maneuver doesn't change the orbit, you can notice that they are equal.
  9. Well, it's an iterative process . Also, I didn't know about quickhide, now I see that the mods indeed are very similar. My UI is prettier though .
  10. Ok, done! Now it allows to disable itself, it's only unswitchable in KSC.
  11. Hm, point taken The problem is, if I include the mod into the list, and user accidentally witches it off, there'll be no way to put it back. I need to find some solution to that.
  12. Adjustable Mod Panel This mod allows you to pick which buttons on the mod panel you want to see. You can disable mods on different screens separately. It requires no additional support from the mods themselves, and will work with whichever mods it encounters. That being said, I should issue an additional warning: since mods can behave unpredictably, and since this mod meddles with the internals of ApplicationLauncher (i.e. stock mod panel), all kinds of weird stuff might happen when you start forcefully disabling the mod buttons. I tried to fail-safe it as much as possible, but since there are literally more than 9000 mods, I can't prepare for everything. But even in the worst-case scenario, it shouldn't affect gameplay, savefiles, and everything else that matters. Using this mod is easy: Install the mode Choose which mod buttons in which screens you want to see (KSC, Editors, Flight, Map View, and Tracking Station) That's it! Version 1.5.3 KSP 1.8 Version 1.5.2 KSP 1.7 Ignore buttons with no texture Version 1.5.1 KSP 1.6 Small fix Version 1.5 Fixed to work with the latest ToolbarControl 0.1.6.6 (older versions won't work). Implemented "pin mod" functionality. There is no guarantee of the exact mods order, but all the pinned mods will be shown before all the others. Adjustable Mod Panel will always remain in the first place, though. Version 1.4 KSP 1.4 Version 1.3 Added support for ToolbarControl. No other changes. If you do not use ToolbarControl, you can ignore this update. Version 1.2 Mod icon is now also taken into account when trying to distinguish one mod from another. That should fix the issue with the "Science!" mod. Version 1.1 Now the mod can disable itself. It can't be disabled in KSC, so you'll never lose access to the mod. Code: https://github.com/radistmorse/KSPAdjustableModPanel Download: https://github.com/radistmorse/KSPAdjustableModPanel/releases/latest
  13. Мне прям интересно стало: чья это была светлая идея? Зачем? Кого когда и где останавливали вордфильтры? Да и вообще кому какое дело как я кого называю в своей игре?
  14. First of all, why? And second of all, I hope you do understand that it's A) absolutely useless, as no-one invented yet an even remotely working profanity filter for russian language, and B) will only heat people up for the challenge. Do you know nothing about russian culture? Saying that something is "forbidden" is like saying "I dare you".
  15. AFAIR, KSP requires all the mods to be open-sourced and non-commercial, so no need to be afraid of any legal concequences. That being said, I still highly recommend you to just tell us your genius idea. Chances are, there is something like what you want, so you'll be at least able to start from something already working, instead of from scratch, which will be very helpful for your first mod.
  16. TextMeshPro is not bundled with unity, it's a separate package that you need to install by yourself. You can do it using the asset store in unity.
  17. I noticed that the shielded docking ports do not have attachment points. Is this intended?
  18. I don't know about "gradual kick-in", but I wrote this just now, for 1.3, because my 150-parts plane couldn't make it past 3 seconds of flight 9 times out of 10. Now it starts OK every time. Now to make it airborne... well, that's a totally different story
  19. I can't believe nobody has done such a mod before. I can't believe it so hard, that I'm actually sure someone did, and it just that my google-fu wasn't strong enough. Anyway, So, imagine the situation: you constructed an enormous behemoth of a plane consisting of 200 parts. You try to launch it, but it explodes the very moment it touches the runway. If only you could disable the crash damage for 5 seconds, until the wobbling is calmed, and the plane settles on the runway... And that is precisely what this mod does. It is trivial: it enables "no crash damage" and "unbreakable joints" through cheat menu for 5 seconds on flight scene load. That's it! Download Code (the whole 20 lines of it)
  20. @rmaine, @Argonicus: your bugs were fixed in 2.3.1. Hopefully...
  21. Yes, it is. I was sure I fixed it long ago. Now I'll do it again.
  22. I want to take a dev-build for a spin. Is there some issues I should be aware of? Some particular use-cases where I should look for some weird behavior?
  23. You need to enable the "orbit info" module using the button on the right.
  24. Yep, that's a hint . Indeed, the scale parameter acts weird when you have both local and global scales. The global scale overwrites the local the moment you assign a parent. Long story short, it's fixable . I'll do it on a weekend.
  25. Originally, I started from blizzy's code. I didn't fork it on github, because it wasn't my intention to change a lot of stuff. It kinda happened by itself . And by the time I decided to publish my version there were so little original code left, that there was no point in forking the repo. I just started a new one. So it's a fork more spiritually than in an actual codebase. Especially since the version 2.0, where all the imgui was replaced with ugui, and now you'll need to look really hard to find even the traces of the original code. The note about it being a fork is there to stop confusion. It's not the same mod under a different name, like "precise node continued", it's a different thing.
×
×
  • Create New...