Page 1 of 1

LuaPlayer.clear_recipe_notification()

Posted: Tue Jun 04, 2024 3:08 am
by micromario
We already have LuaPlayer.clear_recipe_notifications() and LuaPlayer.add_recipe_notification() for managing those yellow boxes when you research a new technology. However it is impossible to clear a notification for a specific recipe. I propose adding LuaPlayer.clear_recipe_notification() to solve this issue.

This API feature would help us at pY solve the following bug report: https://github.com/pyanodon/pybugreports/issues/510

For certain recipes, we use a scripted recipe system that is separate from the research tree. However every time on_configuration_changed is ran we have to re-unlock the recipes which causes the boxes to appear. We are running LuaForce.reset_technology_effects() on every configuration change event. So the custom recipes have to be re-unlocked on top.

I believe this would be a helpful feature to anyone wanting to make a script-unlocked recipe system.