An event to detect the change to an inserter's pickup/drop position

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
curiosity
Filter Inserter
Filter Inserter
Posts: 322
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

An event to detect the change to an inserter's pickup/drop position

Post by curiosity »

Why:

Being able to detect an inserter's target position changing would allow mods to rely on said position instead of obtaining it live every time (possibly every tick if accuracy is needed, even if the mod otherwise doesn't need to run on tick). In the particular case that came up this would allow for optimizations and flexibility in detecting what inserters target a given entity.

What:

The event should contain the following information, either directly or indirectly (can be deduced from the event's other fields):
  • the inserter entity
  • old pickup and/or drop position
  • new pickup and/or drop position
  • what position has changed of the two

mrvn
Smart Inserter
Smart Inserter
Posts: 5699
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: An event to detect the change to an inserter's pickup/drop position

Post by mrvn »

By pickup/drop postion do you mean when an inserter is rotated or changing which side of a belt it places items?

Going by other events the new pickup/drop position wouldn't be in the event. You already have the inserter entity which has the new pickup/drop position. Similar why do you need to known which changed? event.pickup != entity.pickup seems simple enough.

curiosity
Filter Inserter
Filter Inserter
Posts: 322
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: An event to detect the change to an inserter's pickup/drop position

Post by curiosity »

mrvn wrote:
Tue Oct 12, 2021 3:43 pm
By pickup/drop postion do you mean when an inserter is rotated or changing which side of a belt it places items?
I mean exactly the properties of LuaEntity.
mrvn wrote:
Tue Oct 12, 2021 3:43 pm
Going by other events the new pickup/drop position wouldn't be in the event. You already have the inserter entity which has the new pickup/drop position. Similar why do you need to known which changed? event.pickup != entity.pickup seems simple enough.
Please read:
curiosity wrote:
Tue Oct 12, 2021 7:41 am
either directly or indirectly

Post Reply

Return to “Modding interface requests”