Event.on_alert_click
Posted: Tue Jan 09, 2018 1:10 am
What?
An event that triggers when a player clicks an alert icon (i.e. missing robots, damaged entities etc). That contains the entity, icon, (unlocalized) message, and ideally a custom alert name.
Why?
While LuaPlayer.add_custom_alert() allows to add an alarm there is no callback if the player actually notices/reacts to the alarm. I'd like to show some additional GUI elements when the player clicks an alarm. For easier management it would be nice if LuaPlayer.add_custom_alert() was extended to include as additional parameter (or return value on call) a custom alert name/unique ID. A good example for this would be a classical "you have a new message" that opens the message. But existing mods would also benefit from this. For example ore-monitoring mods would being able to not only show a map position but for example also show the status display of a nearly depleted ore field and the estimated remaining usage time.
An event that triggers when a player clicks an alert icon (i.e. missing robots, damaged entities etc). That contains the entity, icon, (unlocalized) message, and ideally a custom alert name.
Why?
While LuaPlayer.add_custom_alert() allows to add an alarm there is no callback if the player actually notices/reacts to the alarm. I'd like to show some additional GUI elements when the player clicks an alarm. For easier management it would be nice if LuaPlayer.add_custom_alert() was extended to include as additional parameter (or return value on call) a custom alert name/unique ID. A good example for this would be a classical "you have a new message" that opens the message. But existing mods would also benefit from this. For example ore-monitoring mods would being able to not only show a map position but for example also show the status display of a nearly depleted ore field and the estimated remaining usage time.