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
Implement plugin system #11320
Implement plugin system #11320
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Things" need to be renamed to "Entities"
17ae39a
to
0651c20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the (now addressed) compilation error, I didn't notice any problems from just running it without any plug-ins.
I think we should just merge it and have people work with it. After all, it's just after the 0.2.6 release, so plenty of time to iron out the creases.
5c05ed4
to
4299de8
Compare
3135a52
to
5803cc0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking my issues into consideration, I'll assume you went over them all, as they're resolved (except the one to create the issue for mingw
, which I'm guessing you'll file after merging)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have yet little knowledge on the code base so I just passed my eyes fishing for C++ patterns I can recognize.
One of the things I didn't mark but I would review is the passing of std::shared_ptr
by copy on parameters. They are cheap but involve incrementing/decrementing reference counters which can be a paper cut :)
6c21ced
to
4ad4caa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried reading the code, at least openrct2 part of it, but i'm certain there were spots i missed and I can't claim I understand all of it. The gist of it looks good, though I have some requests.
|
||
> Is there a good place to distribute my script to other players? | ||
|
||
There is currently no official database for this. For now the recommendation is to upload releases of your script on GitHub alongside your source code (if public). Some people like to make a GitHub repository that just consists of a list of content (scripts in this case) which anyone can add to via pull requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is nothing about versioning of the plugin wrt OpenRCT2 itself. While we can recommend people implement checks for OpenRCT2 tagged version, perhaps we can enforce it in the plugin manifest? OpenRCT2 version would be a rather coarse-grained check, and I'm not fond of adding another one next to network version, so we could use that instead? For networkless builds this is currently set to something like "no multiplayer", but could be easily exposed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a minimum API version you can specify on the plugin which corresponds to another number we can change in the code base. Is this what you meant?
|
||
DukObject(const DukObject&) = delete; | ||
|
||
DukObject(DukObject&& m) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that imply presence of operator=(DukObject&& other)
?
public: | ||
DukContext(); | ||
DukContext(DukContext&) = delete; | ||
DukContext(DukContext&& src) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move assignment too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean. This is a move assignment constructor?
I suppose I should've been more specific: does any of the getters mutate its object? |
@janisozaur A lot of them won't but can't say for certain. |
Err on the const side then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dukglue and duktape need to be properly documented in file with the licenses of used projects.
Also dukglue needs documentation on where it was obtained and in which version
411d5ce
to
fa32ca3
Compare
Co-Authored-By: Breno Rodrigues Guimarães <brenorg@gmail.com>
This is really unfortunate, but appears to be unavoidable.
Co-Authored-By: Michał Janiszewski <janisozaur@users.noreply.github.com> Co-Authored-By: Aaron van Geffen <aaron@aaronweb.net> Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
Co-Authored-By: Breno Rodrigues Guimarães <brenorg@gmail.com>
Co-Authored-By: Breno Rodrigues Guimarães <brenorg@gmail.com>
5e190d5
to
51ed760
Compare
We should probably create the 'plugin' folder in the config folder if it doesn't exist yet. At least I had to manually create one (and initially used 'plugins' rather than 'plugin'…) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still have some requests:
- Tests
- Uploading plugins tobacktrace
- Replay+plugin
and while I'd love to have this issues addressed in the pull request introducing those features, I realise how much effort must've went into preparing current state and fixing those means another(?) indefinite postponing of long awaited feature that seems to work. Let's not forget to file issues for the topics mentioned to be fixed later on.
ping @pkubaj @PureTryOut @joepie91 @geistesk @ibara this adds new dependency: |
Closes #3166: Plugins Support For Server