This commit improves the handling of moon phase messages in the game's WebSocket consumer. It corrects the data structure received by the moon_phase method to align with the frontend's expected format, ensuring proper synchronization of moon phase data between the server and client.
Key Changes:
game/consumers.py now correctly unpacks message and moon_data from the incoming data dictionary.
Adjusted the moon_phase method to accept a single data parameter, which contains both the message and moon data, instead of two separate parameters.
This update ensures the moon phase feature's reliability and readability of the related code sections.
This commit improves the handling of moon phase messages in the game's WebSocket consumer. It corrects the data structure received by the
moon_phase
method to align with the frontend's expected format, ensuring proper synchronization of moon phase data between the server and client.Key Changes:
game/consumers.py
now correctly unpacksmessage
andmoon_data
from the incoming data dictionary.moon_phase
method to accept a singledata
parameter, which contains both the message and moon data, instead of two separate parameters.This update ensures the moon phase feature's reliability and readability of the related code sections.