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

LambdaMUD-Project - Jonathan Laluces #136

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jlaluces123
Copy link

No description provided.

Copy link

@TheDeterminator TheDeterminator left a comment

Choose a reason for hiding this comment

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

Jonathan, you have a lot of good work here! Try to go continue pushing yourself with stretch goals and extra features if you find time to look more at this project. Great job!

@@ -64,4 +64,13 @@ def move(request):
@api_view(["POST"])
def say(request):
# IMPLEMENT
return JsonResponse({'error':"Not yet implemented"}, safe=True, status=500)
player = request.user.player # --> Grab player

Choose a reason for hiding this comment

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

Good comment here, would be nice to have a few more throughout your code.

room = player.room() # --> Grab room
currentPlayerUUIDs = room.playerUUIDs(player_id)
for uuid in currentPlayerUUIDs:
pusher.trigger(f'p-channel-{uuid}', u'broadcast', {'say': f'{player.user.username} says {response}'})

Choose a reason for hiding this comment

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

I think this broadcasts an alert to the player who said the message too, but ideally you would want to exclude the player who performed say from the list of who receives the alert. This differentiates "say" from "shout"

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