Could the devs implement this "hook"?

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Could the devs implement this "hook"?

Post by nuhll » Thu Jun 06, 2019 9:47 pm

So its basically about this question in the LTN forum:

viewtopic.php?p=433638

I dont know the technically correct words... but i try to explain.

I want a way to let inserters swing back if they have something in hand (or if that is not possible, teleport, put into internal inventory or just destroy - what ever is possibel idk)

But at the current state of the game this doenst seem possible.

Is it possible to make a "hook"? inside the game where you could listen for "if filter in filter inserter changes"? - and then read inventory of inserter?

"So basically a hook (?) when a filter in a inserter gets changed (after train leaves, the filter inserters should get their filter settings removed, right?)

So on on_filterinserter_change_filter

1.) If it gets changed from SOMETHING to NOTHING
- If nothing "in hand", do NOTHING
-> check if something "in hand", if so, "swing back" (or if that is not possible, teleport, put into internal inventory or just destroy - what ever is possibel idk)
- That there is space in the inventory is super easy to archive in using wires to only allow something in if its less then X..

2.) If it gets changed from NOTHING to Something
-> do nothing

So it should only be called when filter inserters get filters changed (usually shouldnt hapen often and nroamly only on train stops, right?)"

Koub
Global Moderator
Global Moderator
Posts: 5098
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Could the devs implement this "hook"?

Post by Koub » Fri Jun 07, 2019 5:25 am

[Koub] Moved to modding interface requests.
Koub - Please consider English is not my native language.

Post Reply

Return to “Modding interface requests”

Who is online

Users browsing this forum: No registered users