mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
Reimplement core method for crafting_queue sync
* New method avoids all dataloss and prefectly replicates the queue * Made proper description in readme * Added packages to make lerna build happy * Added reference to main readme
This commit is contained in:
1 parent
87218e4803
commit
a4a667ef06
7 files changed
+91
-43
No files matched your search
@@ -34,7 +34,7 @@ inventory_sync.events[defines.events.on_player_joined_game] = function(event)
|
||||
end
|
||||
|
||||
-- Upload inventory when a player leaves the game. Triggers on restart after crash if player was online during crash.
|
||||
inventory_sync.events[defines.events.on_player_left_game] = function(event)
|
||||
inventory_sync.events[defines.events.on_pre_player_left_game] = function(event)
|
||||
local playerIndex = event.player_index
|
||||
inventory_sync.uploadInventory(playerIndex)
|
||||
global.download_cache[playerIndex] = "" -- Clear cache to avoid leaking memory to people quitting during download
|
||||
|
||||
Reference in new issue
Block a user