1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-18 03:21:47 +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] local toggle_status = toggle_chest_status[player.index]
if if
(abs(player.position.x) <= 4 and abs(player.position.y) <= 4) or (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.character_main).is_empty() and
player.get_inventory(defines.inventory.player_trash).is_empty()) or 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 ((abs(player.position.x) >= 23 and (abs(player.position.y) >= 23)) and toggle_status and
Item_to_chest.transfer_inventory( Item_to_chest.transfer_inventory(
player.index, player.index,
{defines.inventory.player_main, defines.inventory.player_trash} {defines.inventory.character_main, defines.inventory.character_trash}
)) ))
then then
local pos = local pos =

View File

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