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

[FEATURE] AddOn abstract class that allows for between mod's communication #211

Open
LuxStice opened this issue Apr 16, 2023 · 2 comments
Open
Labels
abstraction api Issue related to internal API's

Comments

@LuxStice
Copy link
Contributor

Feature Information

Feature description

An abstract class that the mod developer can inherit from to create a public facing API to be used by other modders to communicate with his mod. He would redestribute that on his github (or wherever he likes) so that other modders could download that, add to their codes and use the methods without having to reference the original code.

Solution proposal

Something like what RemoteTech2 has with its abstract AddOn class

Additional context

This came from this chat in discord where the modder couldn't properly build an integration with ManeuverNodeController properly. He had to use reflection to achieve the desired behaviour.

@jan-bures
Copy link
Contributor

jan-bures commented Apr 16, 2023

For reference, here is such an abstract class in KSP 1:
https://github.com/RemoteTechnologiesGroup/RemoteTech/blob/develop/src/RemoteTech/SimpleTypes/AddOn.cs

And here is an example implementation in KSP 1: https://github.com/RemoteTechnologiesGroup/RemoteTech/blob/develop/src/RemoteTech/AddOns/KerbalAlarmClockAPI.cs

Both examples taken from the RemoteTech mod.

@EwyBoy EwyBoy added abstraction api Issue related to internal API's labels Apr 26, 2023
@cheese3660
Copy link
Member

#252 adds a message bus system, which when used with a parameter that can store state does much the same thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abstraction api Issue related to internal API's
Projects
Status: Planned for Production
Development

No branches or pull requests

4 participants