Page 1 of 1

custom_type and event for alert

Posted: Tue Feb 08, 2022 7:59 am
by meifray
Alert now have member: custom_type::string
  • The custom type of alert,or nil if it is not specify
add_custom_alert now take optional field: custom_type::string
  • when not specify,default to nil.
Custom Alert with differnt custom_type will be sort into different group in gui.


new event:defines.events.on_player_clicked_alert
  • Called when a player clicked a alert group.
  • Fields:
    • player_index
      :: uint
      The player who clicked a alert.
    • alerts
      :: array[Alert]
      The Alert group player clicked
    • name
      :: defines.events
      Identifier of the event
    • tick
      :: uint