mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 07:24:52 +09:00
Fix two missed cases of get_main_inventory
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -116,9 +116,9 @@ function inventory_sync.deserialize_player(player, finished_record)
|
||||
|
||||
-- Transfer items from stashed inventory
|
||||
if stashed_corpse then
|
||||
local main = player.get_main_inventory()
|
||||
local stash = stashed_corpse.get_inventory(defines.inventory.character_corpse)
|
||||
if main then
|
||||
if player.character then
|
||||
local main = player.character.get_main_inventory()
|
||||
for i = 1, #stash do
|
||||
-- Try transferring a stack
|
||||
local source = stash[i]
|
||||
|
||||
@@ -317,7 +317,7 @@ function serialize.serialize_crafting_queue(player)
|
||||
end
|
||||
|
||||
function serialize.deserialize_crafting_queue(player, serialized)
|
||||
local inventory = player.get_main_inventory()
|
||||
local inventory = player.character.get_main_inventory()
|
||||
|
||||
-- Give player some more inventory space to avoid duplicating items
|
||||
player.character_inventory_slots_bonus = player.character_inventory_slots_bonus + 1000
|
||||
|
||||
Reference in new issue
Block a user