Code: Select all
script.on_event(defines.events.on_gui_opened, function(event)
game.print("called on_gui_opened")
game.print(event.item)
game.print(event.gui_type)
end)
What I don't understand is where the armor is placed seems to make a difference to the event.item value. Isn't a chest just a LuaInventory (and the power armor a LuaItemStack), in the same way the player main inventory is?
This has come about as I would like to know which armor an equipment grid has been opened for.
Thanks in advance!