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

Issues/270 show consume #278

Open
wants to merge 2 commits into
base: one-hour-one-life
Choose a base branch
from

Conversation

cguardia
Copy link
Contributor

No description provided.

@cguardia cguardia changed the base branch from master to one-hour-one-life October 13, 2023 09:41
@cguardia
Copy link
Contributor Author

This works, with one issue: the border doesn't return to the normal color until the player moves. If the player stays at one location, the border will not change.

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.

@cguardia Storing a just_consumed property on the player seems strange to me, and it's not surprising that it results in some weird timing issues.

I think this would be better accomplished with a call to e.g. self.publish({"type": "consume", "msg": '{"player_id": "1", "item": ..., "location": [5,6]}') inside of self.handle_item_consume. All clients would get this message over the websocket channel, for the simple implementation we could ignore all the data except the message type and perform a simple animation or notification when the message is received.

@cguardia
Copy link
Contributor Author

@alecpm You were right, this works much better.

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.

2 participants