On_recipe_change event

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Avacado
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Fri Jul 22, 2016 3:17 pm
Contact:

On_recipe_change event

Post by Avacado »

I've added a feature in my mod which creates a map tag over each machine for its current recipe. Currently I have a nth_tick event that scans all the machines against a list of their previous recipes to see if any have changed. It would be more convenient and hopefully computationally cheaper if there was just an on_recipe_change event.

Thanks!

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: On_recipe_change event

Post by eradicator »

That's a really neat idea with the tags. If chart tags had scale it would be even better (and also useful for other things like marking big ore fields with big icons).
+1
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: On_recipe_change event

Post by Rseding91 »

This is the same as viewtopic.php?f=28&t=61339 and my last reply to that one is still the answer here.
If you want to get ahold of me I'm almost always on Discord.

Avacado
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Fri Jul 22, 2016 3:17 pm
Contact:

Re: On_recipe_change event

Post by Avacado »

Thanks for getting back to me. Maybe I'll try the copy/paste and GUI close events as an alternative. Currently I'm using nth tick, but that is inefficient and at the time I didn't think about being able to use GUI close.

Though, I'm not really sure what the other requestor meant by:
I can't look on_gui_closed becose the gui doesn't have to be explicitly closed by the player, when keeping track of the open gui of the player is very inefficient.
Wouldn't bot placement, copy/paste and GUI cover everything apart from another mod setting the recipe or another mod closing the GUI without the player?

Post Reply

Return to “Modding interface requests”