Keep accepting uploads from instances without epochs

A host running the plugin from before epochs never sends one, so after
an import or delete every upload it made was discarded while the
instance believed it succeeded. The Lua now always sends its epoch, and
an upload without one is compared by generation against the stored
data the way it was before, taking over the stored epoch. Those hosts
can still overwrite an import with a copy they failed to upload, which
the README now says.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-10-17 19:12:46 +00:00
1 parent 2529683c2b
commit 5634651de1
5 files changed
+48 -5

No files matched your search

+2 -1
View File
@@ -99,7 +99,8 @@ function player_sync.serialize_player(player, player_record)
local failed_deserialization = get_script_data().failed_deserialization[player.name] or {}
local serialized_player = serialize.serialize_player(player, failed_deserialization, player_record.components)
serialized_player.generation = player_record.generation
serialized_player.epoch = player_record.epoch
-- Always sent so the controller can tell this instance supports epochs
serialized_player.epoch = player_record.epoch or 0
return serialized_player
end