-
Notifications
You must be signed in to change notification settings - Fork 180
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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}'}) |
There was a problem hiding this comment.
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"
No description provided.