1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

inventory.player -> inventory.character

This commit is contained in:
grilledham 2019-05-02 17:46:28 +01:00
parent 1fa07225dd
commit 7516c2f8bc
2 changed files with 7 additions and 7 deletions

View File

@ -52,12 +52,12 @@ local function teleport(event, quadrant)
local toggle_status = toggle_chest_status[player.index]
if
(abs(player.position.x) <= 4 and abs(player.position.y) <= 4) or
(player.get_inventory(defines.inventory.player_main).is_empty() and
player.get_inventory(defines.inventory.player_trash).is_empty()) or
(player.get_inventory(defines.inventory.character_main).is_empty() and
player.get_inventory(defines.inventory.character_trash).is_empty()) or
((abs(player.position.x) >= 23 and (abs(player.position.y) >= 23)) and toggle_status and
Item_to_chest.transfer_inventory(
player.index,
{defines.inventory.player_main, defines.inventory.player_trash}
{defines.inventory.character_main, defines.inventory.character_trash}
))
then
local pos =

View File

@ -48,8 +48,8 @@ local function clear_inventory_train(event)
end
player.clean_cursor()
if
player.get_inventory(defines.inventory.player_main).is_empty() and
player.get_inventory(defines.inventory.player_trash).is_empty()
player.get_inventory(defines.inventory.character_main).is_empty() and
player.get_inventory(defines.inventory.character_trash).is_empty()
then
return true
end
@ -59,13 +59,13 @@ local function clear_inventory_train(event)
if distance1 <= distance2 then
Item_to_chest.transfer_inventory(
event.player_index,
{defines.inventory.player_main, defines.inventory.player_trash},
{defines.inventory.character_main, defines.inventory.character_trash},
rail_location[1]
)
else
Item_to_chest.transfer_inventory(
event.player_index,
{defines.inventory.player_main, defines.inventory.player_trash},
{defines.inventory.character_main, defines.inventory.character_trash},
rail_location[2]
)
end