Make LuaPlayer.get_main_inventory() and LuaPlayer.get_inventory() work with remote controller

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 260
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Make LuaPlayer.get_main_inventory() and LuaPlayer.get_inventory() work with remote controller

Post by theRustyKnife »

As far as i can tell, there is currently no way to get a player's inventory while in the remote controller view. This can be worked around using the player's character if there is one, but the god mode inventory seems to be completely inaccessible.

This is an issue in general, though there is a particularly annoying case with locomotives - opening one changes the controller to remote, but the inventory is still there in the fuel tab, with no way to interact with it via script. A concrete example of how this is problematic is in my mod, which adds a hotkey to sort the player inventory, but with no way to access the inventory in these situations it cannot do that - again, this is especially an issue with the locomotives since it's actually visible there.
Post Reply

Return to “Modding interface requests”