mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 15:33:12 +09:00
Changed usage of globals, worked around edge cases
This commit is contained in:
1 parent
f9ef2ebbe1
commit
98f801e244
11 files changed
+124
-62
No files matched your search
@@ -4,7 +4,7 @@ function save_crafts(event)
|
||||
local crafting_queue = {}
|
||||
|
||||
-- Avoid overwriting old save
|
||||
if global["saved_crafting_queue_"..player.name] ~= nil then
|
||||
if global.inventory_sync.saved_crafting_queue[player.name] ~= nil then
|
||||
player.print("You already have a saved crafting queue, restore it with /restore-crafts")
|
||||
return
|
||||
end
|
||||
@@ -86,7 +86,7 @@ function save_crafts(event)
|
||||
-- Remove extra inventory slots
|
||||
player.character_inventory_slots_bonus = player.character_inventory_slots_bonus - 1000
|
||||
|
||||
global["saved_crafting_queue_"..player.name] = {
|
||||
global.inventory_sync.saved_crafting_queue[player.name] = {
|
||||
crafting_queue = crafting_queue,
|
||||
ingredients = difference,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user