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

Random votes #41

Open
RZarifov opened this issue Jan 30, 2023 · 2 comments
Open

Random votes #41

RZarifov opened this issue Jan 30, 2023 · 2 comments

Comments

@RZarifov
Copy link

I bet it was asked a godzillion times but still.

Even tried to implement one myself via tampermonkey, but I guess it would be wiser to implement one via pull req to this repo.
Therefore I ask - how are things in that regard currently? Maybe devs already implementing them? If not, if I implement such a feature, will the pull request be applied?

@InfinitySamurai
Copy link
Collaborator

Hey Xeizzeth,

Yeah if you put together a PR that can create a poll from the mod then I'd be happy to merge it. Main things I'd be thinking about are

  • How do they get triggered, is it in the mod config window or on an automatic timer
  • How do you configure things like poll length in the mod, is it a defined number or can streamers change it and where is that config stored
  • How do you balance what is being put up for vote. The polls are based on what the trigger is (is it a toxic fallout or is it a bed) and how many of them (5 beds or 1000 chickens?!). These are vastly different in value and affect on a colony

It sounds like you've already had a peak at our API requests, but seeing as the server code isn't open source I'll lay out what you need.

  • You'll want to be sending requests to the /poll/create endpoint (connection and base url should already be defined in the mod)
  • The body of the request needs an expiry key which is the datetime of when it will expire (It shouldn't be like this, but alas)
  • the body also needs a key voteOptions which is an array of objects in the shape {validCommand: ObjectId, amount: number}

If you want to work with me to answer those questions then I'd be happy for you craft a PR.

@RZarifov
Copy link
Author

RZarifov commented Feb 5, 2023

So I assume noone even tried to implement such functionality?
If so, then I will be able to tackle on adding said functionality only after I will be done with my current "Endless Story" mod.

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

2 participants