Open jingyuyao opened 4 years ago
On a second thought, maybe the job to group those logs should live in FE.
The api would be cleaner if it just provided a flat list of log entries.
However, the filter should be done server side so it doesn't send any extra logs.
Log example
Player 1
After some prototyping it seems it would make more sense to have a whitelist and have each whitelisted command format its own description (i.e. "adds 1 Power")
Segment logs into player sections. FE can query for logs starting with a certain section index. Server should return all logs from that point forward (inclusive). All logs within a section are returned.
e.g. Player 2 (index 1)
Each section should be self sufficient. It should contain the player name and id.
Each command is represented by a log entry. It should have a name, the origin entity name, list of targets and the int/bool value.