Closed dmlary closed 4 years ago
There's a concern here with save/load of player files and entity ids.
Currently when we create an entity, if no id is provided, we take the last base id, and add an incrementing digit to it. That entity id is unique for the run of the server, but NOT guaranteed to be unique across multiple runs. The problem is that the player saves, server reboots, we attempt to load the save, and entity id's collide.
Workarounds:
DuplicateId
, and generate a UUID entity id at collision time
World::Helpers.save_player(player: entity, dest: path)
LoadedComponent
to track output filesNeed to be able to save by world, area, file, and single player.