Page 1 of 1

Modding: on_recipe_change / on_entity_settings_changed

Posted: Sun Jul 02, 2017 4:51 pm
by Zomis
For Scripting and Modding it would be helpful if there would be an on_recipe_change event so that mods can easier keep track of which machines are producing what. (It's difficult to keep track of this now as it can change at any time for any machine that has at some point been selected)

Cost to implement: Low, I believe it should be very quick and simple to implement.

Effect of having implemented this: More interesting mods.

Edit: Realized that `on_recipe_change` is a more specific version of the more generic possible `on_entity_settings_changed`

Re: Scripting/Modding: on_recipe_change event

Posted: Sun Jul 02, 2017 11:32 pm
by Tekky
You may want to ask a moderator to move this thread to the Modding interface requests sub-forum.

EDIT: Meanwhile, it seems that the thread has been moved by a moderator. Thanks.

Re: Scripting/Modding: on_recipe_change event

Posted: Thu Jul 20, 2017 8:02 pm
by Zomis
I wanted this addition for my What is missing mod, but as it was not available I had to write code to loop over all interesting entities and check their recipes, so one entity is checked each tick and when it runs out of them it starts over.

All this for a simple "on_recipe_change" event.

Re: Scripting/Modding: on_recipe_change event

Posted: Sat Aug 05, 2017 8:24 pm
by Zomis
A more generic version would be "on_entity_settings_changed` which could be called also for combinators changing settings and other things. This would be even more helpful.