Hi,
it would nice if in the on_player_cursor_stack_changed event, we could know where this stack comes from.
If it comes from an inventory, a inventory_source (and entity_source) would be nice
ex : if I pick from player main inventory, it will return
entity = player.character
inventory = player inventory
if I pick from a chest, it will return
entity = chest
inventory = the concerned inventory
If I pick from a furnace, etc...
PS : to avoid returning the entity, but just the inventory, it would be nice that LuaInventory contains "entity" : the entity that ows the inventory.
on_player_cursor_stack_changed and inventory source ?
Re: on_player_cursor_stack_changed and inventory source ?
The way it works now there's no way to know who changed what when the event is fired. Even the game doesn't know who changed what.
The entire inventory system in Factorio doesn't know who changed what. All it knows is when something is changed.
So, this isn't likely to ever happen.
The entire inventory system in Factorio doesn't know who changed what. All it knows is when something is changed.
So, this isn't likely to ever happen.
If you want to get ahold of me I'm almost always on Discord.
Re: on_player_cursor_stack_changed and inventory source ?
As for "owner" of an inventory: an inventory can exist not owned by an entity. It could be owned by the god controller which isn't an entity or it could be owned by a blueprint book on the ground - the blueprint book isn't an entity but it owns the inventory.
If you want to get ahold of me I'm almost always on Discord.
Re: on_player_cursor_stack_changed and inventory source ?
Ok, then forget it. 

My mods on the Factorio Mod Portal 
