Request: Event that fires when a robot inserts/extracts from a player's inventory

Things that we aren't going to implement
KingIonTrueLove
Inserter
Inserter
Posts: 24
Joined: Sun Jun 04, 2017 1:38 am
Contact:

Request: Event that fires when a robot inserts/extracts from a player's inventory

Post by KingIonTrueLove »

I would like an event to fire when a robot interacts with a player's inventory, hopefully including the following information:

-Player Index
-The itemStack that the robot takes/gives
-Some indicator if a robot is giving items or taking items (maybe one event for giving and one for taking?)
-I'm hoping this event will fire if a robot deposits directly into a player's hand as well

-Also, even though I don't personally require this, It may be useful for other modders if the robots name/type or something is also listed.

Robots interacting with a player's inventory is one of the few/only ways the player's inventory can change that doesn't have a dedicated event other than on_player_main_inventory_changed.

This isn't something that's critical for me to have or anything, but it would provide a performance boost whenever a robot interacts with a player's inventory as my mod would not need to loop through the entire inventory to update the information my mod displays.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Request: Event that fires when a robot inserts/extracts from a player's inventory

Post by Rseding91 »

That's not going to happen; sorry.

Item transfer events aren't likely to ever be a thing - mods can't be trusted to not break things when events fire and item transfer happens way too frequently to send Lua events for it.

Additionally what you ask for simply isn't known by the game and likely never will be. The game has no idea what specific stacks have been modified by what when they are modified. For all the game knows the player could have clicked to transfer or it could be a inserter doing it. All of that information just isn't required and isn't going to be added and tracked, bug fixed, and maintained by the base game for something it doesn't need.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Won't implement”