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

Ability to add multiple default decks. #120

Closed
lhvy opened this issue Apr 5, 2020 · 8 comments
Closed

Ability to add multiple default decks. #120

lhvy opened this issue Apr 5, 2020 · 8 comments
Labels
client Issues that touch the client side of the game. enhancement A suggestion for a new feature or expansion of an existing feature. server Issues that touch the server side of the game.

Comments

@lhvy
Copy link
Contributor

lhvy commented Apr 5, 2020

Bit of a niche feature but I am privately hosting an instance of massive decks with some changes and I have a nice list of decks my friends all want as default but my many attempts to get multiple decks added automatically failed as I don't understand Elm.

It would be cool if I was able to put a list of codes somewhere in config and they would automatically be added to all new games.

@Lattyware Lattyware added client Issues that touch the client side of the game. enhancement A suggestion for a new feature or expansion of an existing feature. server Issues that touch the server side of the game. labels Apr 6, 2020
@Lattyware
Copy link
Owner

Just to note up front: if you are hosting an instance of Massive Decks, the licence (AGPL-3) does require you to distribute your changes as the AGPL treats network use as equivalent to distribution of a binary.

Of course, this doesn't apply to configuration, and I see the value in this kind of feature, although it is a bit of a niche use-case, a few people want to use MD like this.

It would be a nice feature to have, but probably not something I'm going to be able to jump on at the moment. If someone wanted to implement this, I would of course accept pull requests.

@lhvy
Copy link
Contributor Author

lhvy commented Apr 6, 2020

Apologies about my changes not being public, I have made a fork and I will be moving my changes across to that.

In terms of the feature request, I fully understand that this is not a priority. I will have another try at it myself when I get some free time.

@Lattyware
Copy link
Owner

No need to apologise (it is very easy to just assume no one is going to care about the changes you are making, I know from experience), and glad to hear: it really helps to get upstream contributions back where possible. If you do get a chance, I'll look forward to the pull request.

Lattyware added a commit that referenced this issue May 1, 2020
This does a lot of the work needed for #120.
@Lattyware
Copy link
Owner

This is now implemented. You can change the default configuration in config.json5, including specifying multiple decks.

@lhvy
Copy link
Contributor Author

lhvy commented May 28, 2020

My config.json5 file looks like this with the lines uncommented but the decks are still not being applied by default?

decks: [
   {
      source: "BuiltIn",
      id: "cah-base-en",
   },
],

@Lattyware Lattyware reopened this May 30, 2020
@Lattyware
Copy link
Owner

Lattyware commented May 30, 2020

Confirmed, there is a bug that means this doesn't actually work (right now it preloads the decks but doesn't actually add them). Should be an easy fix.

@lhvy
Copy link
Contributor Author

lhvy commented May 31, 2020

Is it possible for you to add comments in the config on how to add decks from different sources as default? I am not sure what the IDs are for JSON Against Humanity.

@Lattyware
Copy link
Owner

That should fix the issue where the default wasn't being honoured, and I also added examples of other sources.

For JSON Against Humanity, the IDs are based on the keys in the JSON. Probably the easiest way to find them (rather than scouring through the huge amount of JSON) is to look at the directory names in the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Issues that touch the client side of the game. enhancement A suggestion for a new feature or expansion of an existing feature. server Issues that touch the server side of the game.
Projects
None yet
Development

No branches or pull requests

2 participants