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

Allow plugins to send game state changes #103

Closed
danbudworthmead opened this issue Oct 30, 2020 · 7 comments
Closed

Allow plugins to send game state changes #103

danbudworthmead opened this issue Oct 30, 2020 · 7 comments
Labels
api Stuff about the plugin api stale

Comments

@danbudworthmead
Copy link
Contributor

Api Suggestion

Suggestion

Plugins should be able to send a packet changing all of the clients game states.

Use case

Having a custom victory / loss scenario. I currently achieve this but setting all clients to Impostor to end the round.

Expected result

Plugins able to set the game state and the clients act accordingly.

@danbudworthmead danbudworthmead added the api Stuff about the plugin api label Oct 30, 2020
@AeonLucid
Copy link
Collaborator

This is kind of a global request. There are a lot of packets that modify game state.

@danbudworthmead
Copy link
Contributor Author

danbudworthmead commented Oct 31, 2020

This is kind of a global request. There are a lot of packets that modify game state.

I meant more like having a Game.SetGamrState(GameStates.Fimished) function.

"Finished" being when the victory screen comes up. I'm probably not using the correct terminology.

@AeonLucid
Copy link
Collaborator

But how do you propose the finished screen to show? There's not really a packet for it so we need to use hacky methods.

@danbudworthmead
Copy link
Contributor Author

But how do you propose the finished screen to show? There's not really a packet for it so we need to use hacky methods.

Does MessageFlags.EndGame not put all the clients into an end of game state?

@Alexejhero
Copy link
Contributor

Does MessageFlags.EndGame not put all the clients into an end of game state?

Nope, as I described in my comment on #108:

This causes everyone but the host to stop receiving packets, and does not end the game as intended.

I do not think there is a way to achieve this without client-side mods, unless what you said actually works:

I currently achieve this by setting all clients to Impostor to end the round.

@Alexejhero
Copy link
Contributor

Update: Sending an EndGame message could potentially work.

@stale
Copy link

stale bot commented Jan 29, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 29, 2021
@stale stale bot closed this as completed Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Stuff about the plugin api stale
Projects
None yet
Development

No branches or pull requests

3 participants