Noiredd / PEGAS

Powered Explicit Guidance Ascent System - a KSP & RO autopilot using the Space Shuttle guidance algorithm, UPFG
http://forum.kerbalspaceprogram.com/index.php?/topic/142213-pegas-powered-explicit-guidance-ascent-system-devlog
MIT License
113 stars 31 forks source link

Add support for Kerbal Alarm Clock mod #32

Closed Patrykz94 closed 3 years ago

Patrykz94 commented 4 years ago

Adds feature from #21

Like I said in the comment, this only works if KAC is installed. If KAC is not installed and user want's to add an alarm, it will just push a UI message saying "Failed to add KAC alarm! KAC not installed.".

The nice thing is that it doesn't seem to be possible to warp past the alarm unless you are still mashing the time-warp button after the alarm has gone off.

Noiredd commented 4 years ago

I like this! I'll test it in a couple of days :)

Noiredd commented 3 years ago

@Patrykz94 What do you think about realizing this as an addon? I've just sketched my idea for an addon system in #33 - if this works as I hope it does, maybe your contribution could become the first PEGAS addon? Please read my proposal and see if it's sound. I'm thinking, if your code was refactored into a function, and then a separate module with register_hook on "init" case, this should work just as well, right?

Noiredd commented 3 years ago

Just to make it clear: if that addon idea proves reasonable, I would like to host a separate repository of PEGAS addons where people could contribute more freely. So you would still be able to share your work, with its own documentation and all :)

Patrykz94 commented 3 years ago

That looks like a good solution. I made a quick rework of the code, and I'll do some testing later on this evening but I don't really see any reason why it wouldn't work.

Patrykz94 commented 3 years ago

Ok @Noiredd I just tested it and it works exactly as intended (copied the pegas_addon.ks code from #33 and added the hooks, etc.).

It does make it very easy to implement addons this way which is really nice.

Noiredd commented 3 years ago

I like the idea of alarmsEnabled and I'm stealing it :P All addons will feature a (standardized) flag like this, to allow users quickly disable/enable them.

Noiredd commented 3 years ago

I've implemented addons today. I decided to open a separate repository for addons alone - I want this to be a separate, faster track for sharing extensions. Could you please submit a PR to that repo?

Patrykz94 commented 3 years ago

Sure, I'll do that tomorrow.

Noiredd commented 3 years ago

Awesome, you're a rockstar :D