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

Transitions requiring multiple actors #263

Merged
merged 13 commits into from
Sep 25, 2023

Conversation

silviot
Copy link

@silviot silviot commented Aug 15, 2023

See #239, #238 and #235

This PR defines a new transition that requires at least two players to be activated. It changes the message displayed to the user to mention whether the transition is currently available, and if it isn't it shows how many more players are needed.

The transition that tests rely on has been included in test code, so that it doesn't need to live in the actual game config.

A transition has been added to turn consume a stag and turn it into a fallen stag (I used a leather purse emoji since I could not find anything more fitting). It's not currently working (I probably introduced a bug), but I'll probably need to work on it a bit more anyway.

requirements.txt has been updated to not include dallinger, and constraints.txt has been added to support development and deployment using docker.

@silviot silviot changed the title Show players needed for transition Transitions requiring multiple actors Aug 16, 2023
target_end: fallen_stag
visible: always
last_use: false
calories: 20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea here is that consuming the stag provides a total of 20 calories, split evenly among the participants (with the initiator getting any remainder), and what's left is a fallen stag which may have separate uses?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should have another example multi-actor transition with no calories, but results in an object with multiple available uses?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alecpm You're correct about what the idea is.

Items added to this file are effective in the game. I can add one more example, but it should probably be a "real" one. Or maybe I misunderstood your suggestion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it would be good to have a "real" example of such a transition, but such transitions are the second checkbox on #235. So I think we'd ideally have such an example available. Maybe best to ask Natalia for one?

Copy link
Contributor

@alecpm alecpm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few comments with trivial matters, but this looks great!

Copy link
Contributor

@alecpm alecpm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this and most of it is working well, but somehow the "fallen stag" doesn't end up in the grid as expected. It's not clear what's going on to me. What's especially weird is that the handbag emoji seems to randomly appear and disappear from the slot where it should be, though I never see indication in the UI that the "fallen stag" is at the location. Maybe @jessesnyder will have some insight.

Copy link
Contributor

@jessesnyder jessesnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked well for me. I did track down the bug @alecpm had found with the re-appearing handbag 👜, and made a commit for that.

Up to you on what to do or not do about my JS idea.

dlgr/griduniverse/game_config.yml Show resolved Hide resolved
dlgr/griduniverse/static/scripts/demo.js Outdated Show resolved Hide resolved
@silviot silviot requested a review from alecpm September 8, 2023 13:13
item_id: fallen_stag
n_uses: 1
sprite: "emoji:👜"
interactive: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't really matter now that @jessesnyder has fixed the client side bug in handling zero-calorie non-interactive items, but I think this should probably be interactive: true, since the fallen stag is likely to be a useful item and is not immediately edible. I believe that interactive: false is primarily intended for Pac Man™ style legacy food-type items.

@silviot silviot requested a review from alecpm September 22, 2023 10:15
@silviot silviot merged commit 65252c2 into one-hour-one-life Sep 25, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants