mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
Close the remaining ways an accepted import fails to restore
Imports no longer accept the cutscene controller, which needs waypoints to restore. Logistic filters and the basic item stack fields now have the types and limits Factorio enforces, and the inventory summary skips malformed items and counts repeated exported items once instead of expanding them. Lua's JSON loses precision past 2^50, so a generation there could no longer be counted up and uploads were discarded. Imports now start over from generation 1 when the stored or imported generation is at that limit. Instances holding a copy from another epoch take the stored generation instead of keeping their own higher one when there is no data to download. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9ecd497f1e
commit
39df22be65
6 files changed
+167
-20
No files matched your search
@@ -373,7 +373,12 @@ function player_sync.sync_player(acquire_response)
|
||||
player_record.sync_in_progress = false
|
||||
-- Deleted data keeps its generation and epoch so the next upload is accepted as the new baseline
|
||||
player_record.epoch = epoch
|
||||
player_record.generation = math.max(player_record.generation, acquire_response.generation)
|
||||
-- A copy from another epoch has nothing to do with the stored generation
|
||||
if stale then
|
||||
player_record.generation = acquire_response.generation
|
||||
else
|
||||
player_record.generation = math.max(player_record.generation, acquire_response.generation)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user