mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 23:24:52 +09:00
Support for transferring crafting queues
This commit is contained in:
1 parent
40301f59b7
commit
87218e4803
8 files changed
+339
-182
No files matched your search
@@ -0,0 +1,17 @@
|
||||
local save_crafts = require("modules/inventory_sync/save_crafts")
|
||||
local restore_crafts = require("modules/inventory_sync/restore_crafts")
|
||||
|
||||
function add_commands()
|
||||
--[[
|
||||
Command to serialize crafting queue for transport.
|
||||
When serialized, the crafting queue is cleared and stored in global. The items received are cleared as well.
|
||||
Upon leaving, the value in global is cleared and sent with the inventory to the master.
|
||||
Upon joining a game the crafting queue is added to the end of the existing crafting queue.
|
||||
]]
|
||||
commands.add_command("save-crafts", "Save crafting queue for transport to a different server", save_crafts)
|
||||
commands.add_command("csc", "Shorthand for /save-crafts", save_crafts)
|
||||
commands.add_command("restore-crafts", "Load crafting queue from global", restore_crafts)
|
||||
commands.add_command("crc", "Shorthand for /restore-crafts", restore_crafts)
|
||||
end
|
||||
|
||||
return add_commands
|
||||
Reference in new issue
Block a user