mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-25 08:23:13 +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
|
-- Transfer items from stashed inventory
|
||||||
if stashed_corpse then
|
if stashed_corpse then
|
||||||
local main = player.get_main_inventory()
|
|
||||||
local stash = stashed_corpse.get_inventory(defines.inventory.character_corpse)
|
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
|
for i = 1, #stash do
|
||||||
-- Try transferring a stack
|
-- Try transferring a stack
|
||||||
local source = stash[i]
|
local source = stash[i]
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ function serialize.serialize_crafting_queue(player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function serialize.deserialize_crafting_queue(player, serialized)
|
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
|
-- Give player some more inventory space to avoid duplicating items
|
||||||
player.character_inventory_slots_bonus = player.character_inventory_slots_bonus + 1000
|
player.character_inventory_slots_bonus = player.character_inventory_slots_bonus + 1000
|
||||||
|
|||||||
Reference in new issue
Block a user