When player is in remote view, calling function LuaControl::get_inventory(defines.inventory.character_main) for LuaPlayer will return nil. This is the issue, because a lot of GUI functionality implemented in our scenario assumes inventory is always available as long as there is 'character' assigned to player. So right now, if player clicks some button that will interact with his inventory to take some stuff, his controller needs to be switched to defines.controllers.character, abruptly closing his view. The situation gets more complicated if one player wants to interact with inventory of other player.
I'd expect all these defines to return LuaInventory even in remote view, as long as player has a character.
defines.inventory.character_main
defines.inventory.character_guns
defines.inventory.character_ammo
defines.inventory.character_armor
defines.inventory.character_vehicle
defines.inventory.character_trash
[2.0.17] cannot access character inventory of a player that is in remote view
Re: [2.0.17] cannot access character inventory of a player that is in remote view
I found that you can just do instead: game.player.character.get_inventory(...) while in remote view.
So this isn't a bug to me anymore.
So this isn't a bug to me anymore.