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

Plugin System #13

Open
rgbkrk opened this issue Dec 8, 2015 · 5 comments
Open

Plugin System #13

rgbkrk opened this issue Dec 8, 2015 · 5 comments

Comments

@rgbkrk
Copy link
Member

rgbkrk commented Dec 8, 2015

It would be really great if people could register plugins that create their own view or just run some helper utilities. I'm imagining we would hand them either a reference to the subject or some Object that had subject and database.

@luckydonald
Copy link
Member

Should this include adding own tabs?

@rgbkrk
Copy link
Member Author

rgbkrk commented Dec 14, 2015

Yeah, I'm kind of thinking that we assume a plugin author will provide us a React.Component and that the name we display is some class property (e.g. using displayName).

@kitten
Copy link
Contributor

kitten commented Dec 14, 2015

@rgbkrk I think that's a good idea. A system that allows the author to tap into the connection all the time is probably a lot more powerful though. We have to come up with something different for that I guess.

@luckydonald
Copy link
Member

Maybe we should think about what plugins use, what are they supposed to do.
Do they enhance the UI by something clickable?
Do they just talk with the game?
Do the need settings?

Example ideas:
Some non-gui mod could be an autoinject steampak mod.
(I saw this somewhere here)

Some gui thing: an radar for your quests.
radar.png

@kitten
Copy link
Contributor

kitten commented Dec 14, 2015

@luckydonald Yea, definitely make sense to list these requirements. Imho, plugins should be able to:

  • Access the connection subject (receive and send payloads)
  • Add one or more new panes
  • Add settings to a kind of plugin page

I think all of these requirements can be easily fulfilled. I think an easy solution would be:

A plugin is an npm (like) package. The package's main file is imported inside the pipboy app. Now either the pipboy app injects a module / dependency that exposes our plugin API (quite complex) or it just imports a function that each plugin exports.

The API might expose certain methods that can add components as panes, or add settings. All background logic then actually doesn't have to be implemented explicitly, but would be just a side effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants