-
Notifications
You must be signed in to change notification settings - Fork 126
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
Plugins v3 #472
Plugins v3 #472
Conversation
Small wish I have: Right now, plugins need to maintain the same data structure in their own codebase, making it rather tedious to maintain. |
plugins that can be used to test plugins v3 :) they don't work after b292371 commit |
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.
As much as some changes I like, my main problem with our current plugin system is that increasing the version breaks all existing plugins.
Ill probably draft up an issue of how i think we could do better as increasing version on every minor change doesnt sound feasible at all
In the case of v3 here, it's more than just a minor change, right? ^^ |
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 testing with the given plugin but it just panics and gets the game stuck after the company logos
[2023-10-21] [08:35:45] [PLUGINSYS] [info] Succesfully loaded R2Northstar\plugins\r2rcon_rs.dll
[2023-10-21] [08:35:45] [PLUGINSYS] [info] Loading plugin r2rcon-rs version 1.0
[2023-10-21] [08:35:45] [r2rcon-rs] [info] plugin logging initialized
[2023-10-21] [08:35:45] [r2rcon-rs] [info] plugin static initialized : true
[2023-10-21] [08:35:45] [r2rcon-rs] [error]
[2023-10-21] [08:35:45] [r2rcon-rs] [error] plugin panicked at src\lib.rs:50:18
[2023-10-21] [08:35:45] [r2rcon-rs] [error] full message:
[2023-10-21] [08:35:45] [r2rcon-rs] [error] panicked at 'a rcon cmd wasn't present', src\lib.rs:50:18
[2023-10-21] [08:35:45] [r2rcon-rs] [error]
I updated SouthRPC to Plugins v3 but calling Cbuf_Execute
causes a crash.
Had no luck debugging it thus far.
EDIT: Is a bug in wine caused by a debug trap. Hiding in x64dbg or not calling Execute fixes it. Uploaded a new version with it removed, tested on x64 Windows and Fedora 38.
SouthRPC V3 Source Code
SouthRPC V3 Plugin Zip
You can test SouthRPC is working by sending a request to
http://localhost:26503
with the body
{
"jsonrpc": "2.0",
"method": "execute_squirrel",
"params": {
"code": "printt(\"Hello World!\")"
}
}
Here is a short form curl command:
curl --request POST --url http://localhost:26503/ --header 'Content-Type: application/json' --data '{"jsonrpc": "2.0", "method": "execute_squirrel", "params": {"code": "printt(\"Hello World!\")"}}'
panicking is intended behavior since it didn't find the correct command line args and it's in a thread so it's fine. |
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.
Tested already with SouthRPC.
Code is good.
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.
Confirmed working in testing together with R2Northstar/NorthstarMods#652 and R2Northstar/NorthstarDiscordRPC#10
Joined a bunch of servers and watched Discord activity status update
(No code review done in this review)
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.
Looked over the code again and it still looks good to me.
merged based on reviews ig |
Script component of plugins v3. See launcher PR for more info. R2Northstar/NorthstarLauncher#472
Updates DiscordRPC plugin for v3. See launcher PR for more info: R2Northstar/NorthstarLauncher#472
yes
what changed
g_pCVar
is exposedRelated