---@meta
---@diagnostic disable

--$Factorio 1.1.70
--$Overlay 5
--$Section events
-- This file is automatically generated. Edits will be overwritten.

---@alias CustomInputEvent EventData.CustomInputEvent
---Called when a [CustomInput](https://wiki.factorio.com/Prototype/CustomInput) is activated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent)
---@class EventData.CustomInputEvent : EventData
---The mouse cursor position when the custom input was activated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent)
---@field cursor_position MapPosition 
---The prototype name of the custom input that was activated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent)
---@field input_name string 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent)
---@field name defines.events 
---The player that activated the custom input.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent)
---@field player_index uint 
---Information about the prototype that is selected when the custom input is used. Needs to be enabled on the custom input's prototype. `nil` if none is selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent)
---@field selected_prototype? SelectedPrototypeData 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#CustomInputEvent)
---@field tick uint 

---@alias on_ai_command_completed EventData.on_ai_command_completed
---Called when a unit/group completes a command.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed)
---@class EventData.on_ai_command_completed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed)
---@field result defines.behavior_result 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed)
---@field tick uint 
---unit_number/group_number of the unit/group which just completed a command.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed)
---@field unit_number uint 
---Was this command generated by a distraction.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_ai_command_completed)
---@field was_distracted boolean 

---@alias on_area_cloned EventData.on_area_cloned
---Called when an area of the map is cloned.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@class EventData.on_area_cloned : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field clear_destination_decoratives boolean 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field clear_destination_entities boolean 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field clone_decoratives boolean 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field clone_entities boolean 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field clone_tiles boolean 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field destination_area BoundingBox 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field destination_force? LuaForce 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field destination_surface LuaSurface 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field source_area BoundingBox 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field source_surface LuaSurface 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_area_cloned)
---@field tick uint 

---@alias on_biter_base_built EventData.on_biter_base_built
---Called when a biter migration builds a base.
---
---**Note:** This will be called multiple times for each migration, once for every biter that is sacrificed to build part of the new base.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_biter_base_built)
---@class EventData.on_biter_base_built : EventData
---The entity that was built.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_biter_base_built)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_biter_base_built)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_biter_base_built)
---@field tick uint 

---@alias on_brush_cloned EventData.on_brush_cloned
---Called when a set of positions on the map is cloned.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@class EventData.on_brush_cloned : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field clear_destination_decoratives boolean 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field clear_destination_entities boolean 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field clone_decoratives boolean 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field clone_entities boolean 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field clone_tiles boolean 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field destination_force? LuaForce 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field destination_offset TilePosition 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field destination_surface LuaSurface 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field source_offset TilePosition 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field source_positions TilePosition[] 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field source_surface LuaSurface 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_brush_cloned)
---@field tick uint 

---@alias on_build_base_arrived EventData.on_build_base_arrived
---Called when a [defines.command.build_base](https://lua-api.factorio.com/latest/defines.html#defines.command.build_base) command reaches its destination, and before building starts.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_build_base_arrived)
---@class EventData.on_build_base_arrived : EventData
---The unit group the command was assigned to.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_build_base_arrived)
---@field group? LuaUnitGroup 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_build_base_arrived)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_build_base_arrived)
---@field tick uint 
---The unit the command was assigned to.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_build_base_arrived)
---@field unit? LuaEntity 

---@alias on_built_entity EventData.on_built_entity
---Called when player builds something. Can be filtered using [LuaPlayerBuiltEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerBuiltEntityEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity)
---@class EventData.on_built_entity : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity)
---@field created_entity LuaEntity 
---The item prototype used to build the entity. Note this won't exist in some situations (built from blueprint, undo, etc).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity)
---@field item? LuaItemPrototype 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity)
---@field player_index uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity)
---@field stack LuaItemStack 
---The tags associated with this entity if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity)
---@field tags? Tags 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_built_entity)
---@field tick uint 

---@alias on_cancelled_deconstruction EventData.on_cancelled_deconstruction
---Called when the deconstruction of an entity is canceled. Can be filtered using [LuaEntityDeconstructionCancelledEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDeconstructionCancelledEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction)
---@class EventData.on_cancelled_deconstruction : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction)
---@field player_index? uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_deconstruction)
---@field tick uint 

---@alias on_cancelled_upgrade EventData.on_cancelled_upgrade
---Called when the upgrade of an entity is canceled. Can be filtered using [LuaUpgradeCancelledEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaUpgradeCancelledEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade)
---@class EventData.on_cancelled_upgrade : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade)
---@field direction? defines.direction 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade)
---@field player_index? uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade)
---@field target LuaEntityPrototype 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cancelled_upgrade)
---@field tick uint 

---@alias on_character_corpse_expired EventData.on_character_corpse_expired
---Called when a character corpse expires due to timeout or all of the items being removed from it.
---
---**Note:** this is not called if the corpse is mined. See [defines.events.on_pre_player_mined_item](https://lua-api.factorio.com/latest/defines.html#defines.events.on_pre_player_mined_item) to detect that.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired)
---@class EventData.on_character_corpse_expired : EventData
---The corpse.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired)
---@field corpse LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_character_corpse_expired)
---@field tick uint 

---@alias on_chart_tag_added EventData.on_chart_tag_added
---Called when a chart tag is created.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added)
---@class EventData.on_chart_tag_added : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added)
---@field force LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added)
---@field player_index? uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added)
---@field tag LuaCustomChartTag 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_added)
---@field tick uint 

---@alias on_chart_tag_modified EventData.on_chart_tag_modified
---Called when a chart tag is modified by a player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified)
---@class EventData.on_chart_tag_modified : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified)
---@field force LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified)
---@field old_icon? SignalID 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified)
---@field old_player? uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified)
---@field old_text string 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified)
---@field player_index? uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified)
---@field tag LuaCustomChartTag 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_modified)
---@field tick uint 

---@alias on_chart_tag_removed EventData.on_chart_tag_removed
---Called just before a chart tag is deleted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed)
---@class EventData.on_chart_tag_removed : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed)
---@field force LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed)
---@field player_index? uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed)
---@field tag LuaCustomChartTag 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chart_tag_removed)
---@field tick uint 

---@alias on_chunk_charted EventData.on_chunk_charted
---Called when a chunk is charted or re-charted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted)
---@class EventData.on_chunk_charted : EventData
---Area of the chunk.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted)
---@field area BoundingBox 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted)
---@field force LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted)
---@field position ChunkPosition 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_charted)
---@field tick uint 

---@alias on_chunk_deleted EventData.on_chunk_deleted
---Called when one or more chunks are deleted using [LuaSurface::delete_chunk](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.delete_chunk).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_deleted)
---@class EventData.on_chunk_deleted : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_deleted)
---@field name defines.events 
---The chunks deleted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_deleted)
---@field positions ChunkPosition[] 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_deleted)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_deleted)
---@field tick uint 

---@alias on_chunk_generated EventData.on_chunk_generated
---Called when a chunk is generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated)
---@class EventData.on_chunk_generated : EventData
---Area of the chunk.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated)
---@field area BoundingBox 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated)
---@field name defines.events 
---Position of the chunk.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated)
---@field position ChunkPosition 
---The surface the chunk is on.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated)
---@field surface LuaSurface 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_chunk_generated)
---@field tick uint 

---@alias on_combat_robot_expired EventData.on_combat_robot_expired
---Called when a combat robot expires through a lack of energy, or timeout.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired)
---@class EventData.on_combat_robot_expired : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired)
---@field name defines.events 
---The entity that owns the robot if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired)
---@field owner? LuaEntity 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired)
---@field robot LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_combat_robot_expired)
---@field tick uint 

---@alias on_console_chat EventData.on_console_chat
---Called when a message is sent to the in-game console, either by a player or through the server interface.
---
---**Note:** This event only fires for plain messages, not for any commands (including `/shout` or `/whisper`).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_chat)
---@class EventData.on_console_chat : EventData
---The chat message that was sent.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_chat)
---@field message string 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_chat)
---@field name defines.events 
---The player doing the chatting, if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_chat)
---@field player_index? uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_chat)
---@field tick uint 

---@alias on_console_command EventData.on_console_command
---Called when someone enters a command-like message regardless of it being a valid command.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command)
---@class EventData.on_console_command : EventData
---The command as typed without the preceding forward slash ('/').
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command)
---@field command string 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command)
---@field name defines.events 
---The parameters provided if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command)
---@field parameters string 
---The player if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command)
---@field player_index? uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_console_command)
---@field tick uint 

---@alias on_cutscene_cancelled EventData.on_cutscene_cancelled
---Called when a cutscene is cancelled by the player or by script.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_cancelled)
---@class EventData.on_cutscene_cancelled : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_cancelled)
---@field name defines.events 
---The player the cutscene was shown to.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_cancelled)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_cancelled)
---@field tick uint 

---@alias on_cutscene_waypoint_reached EventData.on_cutscene_waypoint_reached
---Called when a cutscene is playing, each time it reaches a waypoint in that cutscene.
---
---This refers to an index in the table previously passed to set_controller which started the cutscene.
---
---**Note:** Due to implementation omission, waypoint_index is 0-based.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached)
---@class EventData.on_cutscene_waypoint_reached : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached)
---@field name defines.events 
---The player index of the player viewing the cutscene.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached)
---@field tick uint 
---The index of the waypoint we just completed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_cutscene_waypoint_reached)
---@field waypoint_index uint 

---@alias on_difficulty_settings_changed EventData.on_difficulty_settings_changed
---Called when the map difficulty settings are changed.
---
---**Note:** It's not guaranteed that both settings are changed - just that at least one has been changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed)
---@class EventData.on_difficulty_settings_changed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed)
---@field old_recipe_difficulty uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed)
---@field old_technology_difficulty uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_difficulty_settings_changed)
---@field tick uint 

---@alias on_entity_cloned EventData.on_entity_cloned
---Called when an entity is cloned. Can be filtered for the source entity using [LuaEntityClonedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityClonedEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_cloned)
---@class EventData.on_entity_cloned : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_cloned)
---@field destination LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_cloned)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_cloned)
---@field source LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_cloned)
---@field tick uint 

---@alias on_entity_damaged EventData.on_entity_damaged
---Called when an entity is damaged. Can be filtered using [LuaEntityDamagedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDamagedEventFilter).
---
---**Note:** This is not called when an entities health is set directly by another mod.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged)
---@class EventData.on_entity_damaged : EventData
---The entity that did the attacking if available.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged)
---@field cause? LuaEntity 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged)
---@field damage_type LuaDamagePrototype 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged)
---@field entity LuaEntity 
---The damage amount after resistances.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged)
---@field final_damage_amount float 
---The health of the entity after the damage was applied.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged)
---@field final_health float 
---The force that did the attacking if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged)
---@field force? LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged)
---@field name defines.events 
---The damage amount before resistances.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged)
---@field original_damage_amount float 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_damaged)
---@field tick uint 

---@alias on_entity_destroyed EventData.on_entity_destroyed
---Called after an entity is destroyed that has been registered with [LuaBootstrap::register_on_entity_destroyed](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.register_on_entity_destroyed).
---
---**Note:** Depending on when a given entity is destroyed, this event will be fired at the end of the current tick or at the end of the next tick.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed)
---@class EventData.on_entity_destroyed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed)
---@field name defines.events 
---The number returned by [register_on_entity_destroyed](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.register_on_entity_destroyed) to uniquely identify this entity during this event.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed)
---@field registration_number uint64 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed)
---@field tick uint 
---The [LuaEntity::unit_number](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.unit_number) of the destroyed entity, if it had one.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_destroyed)
---@field unit_number? uint 

---@alias on_entity_died EventData.on_entity_died
---Called when an entity dies. Can be filtered using [LuaEntityDiedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityDiedEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died)
---@class EventData.on_entity_died : EventData
---The entity that did the killing if available.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died)
---@field cause? LuaEntity 
---The damage type if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died)
---@field damage_type? LuaDamagePrototype 
---The entity that died.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died)
---@field entity LuaEntity 
---The force that did the killing if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died)
---@field force? LuaForce 
---The loot generated by this entity if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died)
---@field loot LuaInventory 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_died)
---@field tick uint 

---@alias on_entity_logistic_slot_changed EventData.on_entity_logistic_slot_changed
---Called when one of an entity's personal logistic slots changes.
---
---**Note:** "Personal logistic slot" refers to a character or vehicle's personal request / auto-trash slots, not the request slots on logistic chests.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed)
---@class EventData.on_entity_logistic_slot_changed : EventData
---The entity for whom a logistic slot was changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed)
---@field name defines.events 
---The player who changed the slot, or `nil` if changed by script.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed)
---@field player_index? uint 
---The slot index that was changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed)
---@field slot_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_logistic_slot_changed)
---@field tick uint 

---@alias on_entity_renamed EventData.on_entity_renamed
---Called after an entity has been renamed either by the player or through script.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed)
---@class EventData.on_entity_renamed : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed)
---@field by_script boolean 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed)
---@field old_name string 
---If by_script is true this will not be included.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed)
---@field player_index? uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_renamed)
---@field tick uint 

---@alias on_entity_settings_pasted EventData.on_entity_settings_pasted
---Called after entity copy-paste is done.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted)
---@class EventData.on_entity_settings_pasted : EventData
---The destination entity settings were copied to.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted)
---@field destination LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted)
---@field player_index uint 
---The source entity settings were copied from.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted)
---@field source LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_settings_pasted)
---@field tick uint 

---@alias on_entity_spawned EventData.on_entity_spawned
---Called when an entity is spawned by a EnemySpawner
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_spawned)
---@class EventData.on_entity_spawned : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_spawned)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_spawned)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_spawned)
---@field spawner LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_entity_spawned)
---@field tick uint 

---@alias on_equipment_inserted EventData.on_equipment_inserted
---Called after equipment is inserted into an equipment grid.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_inserted)
---@class EventData.on_equipment_inserted : EventData
---The equipment inserted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_inserted)
---@field equipment LuaEquipment 
---The equipment grid inserted into.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_inserted)
---@field grid LuaEquipmentGrid 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_inserted)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_inserted)
---@field tick uint 

---@alias on_equipment_removed EventData.on_equipment_removed
---Called after equipment is removed from an equipment grid.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed)
---@class EventData.on_equipment_removed : EventData
---The count of equipment removed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed)
---@field count uint 
---The equipment removed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed)
---@field equipment string 
---The equipment grid removed from.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed)
---@field grid LuaEquipmentGrid 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_equipment_removed)
---@field tick uint 

---@alias on_force_cease_fire_changed EventData.on_force_cease_fire_changed
---Called when the a forces cease fire values change.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed)
---@class EventData.on_force_cease_fire_changed : EventData
---If the other force was added or removed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed)
---@field added boolean 
---The force who's cease fire changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed)
---@field force LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed)
---@field name defines.events 
---Which force was added or removed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed)
---@field other_force LuaForce 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_cease_fire_changed)
---@field tick uint 

---@alias on_force_created EventData.on_force_created
---Called when a new force is created using `game.create_force()`
---
---**Note:** This is not called when the default forces (`'player'`, `'enemy'`, `'neutral'`) are created as they will always exist.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_created)
---@class EventData.on_force_created : EventData
---The newly created force.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_created)
---@field force LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_created)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_created)
---@field tick uint 

---@alias on_force_friends_changed EventData.on_force_friends_changed
---Called when the a forces friends change.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed)
---@class EventData.on_force_friends_changed : EventData
---If the other force was added or removed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed)
---@field added boolean 
---The force who's friends changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed)
---@field force LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed)
---@field name defines.events 
---Which force was added or removed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed)
---@field other_force LuaForce 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_friends_changed)
---@field tick uint 

---@alias on_force_reset EventData.on_force_reset
---Called when [LuaForce::reset](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset) is finished.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_reset)
---@class EventData.on_force_reset : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_reset)
---@field force LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_reset)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_force_reset)
---@field tick uint 

---@alias on_forces_merged EventData.on_forces_merged
---Called after two forces have been merged using `game.merge_forces()`.
---
---**Note:** The source force is invalidated before this event is called and the name can be re-used in this event if desired.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged)
---@class EventData.on_forces_merged : EventData
---The force entities where reassigned to.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged)
---@field destination LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged)
---@field name defines.events 
---The index of the destroyed force.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged)
---@field source_index uint 
---The force destroyed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged)
---@field source_name string 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merged)
---@field tick uint 

---@alias on_forces_merging EventData.on_forces_merging
---Called when two forces are about to be merged using `game.merge_forces()`.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merging)
---@class EventData.on_forces_merging : EventData
---The force to reassign entities to.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merging)
---@field destination LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merging)
---@field name defines.events 
---The force to be destroyed
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merging)
---@field source LuaForce 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_forces_merging)
---@field tick uint 

---@alias on_game_created_from_scenario EventData.on_game_created_from_scenario
---Called when a game is created from a scenario. This is fired for every mod, even when the scenario's save data already includes it. In those cases however, [LuaBootstrap::on_init](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_init) is not fired.
---
---**Note:** This event is not fired when the scenario is loaded via the map editor.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_game_created_from_scenario)
---@class EventData.on_game_created_from_scenario : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_game_created_from_scenario)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_game_created_from_scenario)
---@field tick uint 

---@alias on_gui_checked_state_changed EventData.on_gui_checked_state_changed
---Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) checked state is changed (related to checkboxes and radio buttons).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed)
---@class EventData.on_gui_checked_state_changed : EventData
---The element whose checked state changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed)
---@field element LuaGuiElement 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed)
---@field name defines.events 
---The player who did the change.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed)
---@field tick uint 

---@alias on_gui_click EventData.on_gui_click
---Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) is clicked.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click)
---@class EventData.on_gui_click : EventData
---If alt was pressed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click)
---@field alt boolean 
---The mouse button used if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click)
---@field button defines.mouse_button_type 
---If control was pressed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click)
---@field control boolean 
---The clicked element.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click)
---@field element LuaGuiElement 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click)
---@field name defines.events 
---The player who did the clicking.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click)
---@field player_index uint 
---If shift was pressed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click)
---@field shift boolean 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_click)
---@field tick uint 

---@alias on_gui_closed EventData.on_gui_closed
---Called when the player closes the GUI they have open.
---
---This can only be raised when the GUI's player controller is still valid. If a GUI is thus closed due to the player disconnecting, dying, or becoming a spectator in other ways, it won't cause this event to be raised.
---
---**Note:** It's not advised to open any other GUI during this event because if this is run as a request to open a different GUI the game will force close the new opened GUI without notice to ensure the original requested GUI is opened.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@class EventData.on_gui_closed : EventData
---The custom GUI element that was open
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field element? LuaGuiElement 
---The entity that was open
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field entity? LuaEntity 
---The equipment that was open
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field equipment? LuaEquipment 
---The GUI type that was open.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field gui_type defines.gui_type 
---The script inventory that was open
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field inventory? LuaInventory 
---The item that was open
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field item? LuaItemStack 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field name defines.events 
---The other player that was open
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field other_player? LuaPlayer 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field player_index uint 
---The technology that was automatically selected when opening the research GUI
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field technology? LuaTechnology 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field tick uint 
---The tile position that was open
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_closed)
---@field tile_position? TilePosition 

---@alias on_gui_confirmed EventData.on_gui_confirmed
---Called when a [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) is confirmed, for example by pressing Enter in a textfield.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed)
---@class EventData.on_gui_confirmed : EventData
---If alt was pressed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed)
---@field alt boolean 
---If control was pressed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed)
---@field control boolean 
---The confirmed element.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed)
---@field element LuaGuiElement 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed)
---@field name defines.events 
---The player who did the confirming.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed)
---@field player_index uint 
---If shift was pressed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed)
---@field shift boolean 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed)
---@field tick uint 

---@alias on_gui_elem_changed EventData.on_gui_elem_changed
---Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) element value is changed (related to choose element buttons).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed)
---@class EventData.on_gui_elem_changed : EventData
---The element whose element value changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed)
---@field element LuaGuiElement 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed)
---@field name defines.events 
---The player who did the change.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed)
---@field tick uint 

---@alias on_gui_location_changed EventData.on_gui_location_changed
---Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) element location is changed (related to frames in `player.gui.screen`).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed)
---@class EventData.on_gui_location_changed : EventData
---The element whose location changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed)
---@field element LuaGuiElement 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed)
---@field name defines.events 
---The player who did the change.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed)
---@field tick uint 

---@alias on_gui_opened EventData.on_gui_opened
---Called when the player opens a GUI.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened)
---@class EventData.on_gui_opened : EventData
---The custom GUI element that was opened
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened)
---@field element? LuaGuiElement 
---The entity that was opened
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened)
---@field entity? LuaEntity 
---The equipment that was opened
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened)
---@field equipment? LuaEquipment 
---The GUI type that was opened.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened)
---@field gui_type defines.gui_type 
---The script inventory that was opened
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened)
---@field inventory? LuaInventory 
---The item that was opened
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened)
---@field item? LuaItemStack 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened)
---@field name defines.events 
---The other player that was opened
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened)
---@field other_player? LuaPlayer 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_opened)
---@field tick uint 

---@alias on_gui_selected_tab_changed EventData.on_gui_selected_tab_changed
---Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) selected tab is changed (related to tabbed-panes).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed)
---@class EventData.on_gui_selected_tab_changed : EventData
---The tabbed pane whose selected tab changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed)
---@field element LuaGuiElement 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed)
---@field name defines.events 
---The player who did the change.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed)
---@field tick uint 

---@alias on_gui_selection_state_changed EventData.on_gui_selection_state_changed
---Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) selection state is changed (related to drop-downs and listboxes).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed)
---@class EventData.on_gui_selection_state_changed : EventData
---The element whose selection state changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed)
---@field element LuaGuiElement 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed)
---@field name defines.events 
---The player who did the change.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed)
---@field tick uint 

---@alias on_gui_switch_state_changed EventData.on_gui_switch_state_changed
---Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) switch state is changed (related to switches).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed)
---@class EventData.on_gui_switch_state_changed : EventData
---The switch whose switch state changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed)
---@field element LuaGuiElement 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed)
---@field name defines.events 
---The player who did the change.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed)
---@field tick uint 

---@alias on_gui_text_changed EventData.on_gui_text_changed
---Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) text is changed by the player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed)
---@class EventData.on_gui_text_changed : EventData
---The edited element.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed)
---@field element LuaGuiElement 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed)
---@field name defines.events 
---The player who did the edit.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed)
---@field player_index uint 
---The new text in the element.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed)
---@field text string 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed)
---@field tick uint 

---@alias on_gui_value_changed EventData.on_gui_value_changed
---Called when [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) slider value is changed (related to the slider element).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed)
---@class EventData.on_gui_value_changed : EventData
---The element whose value changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed)
---@field element LuaGuiElement 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed)
---@field name defines.events 
---The player who did the change.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed)
---@field tick uint 

---@alias on_land_mine_armed EventData.on_land_mine_armed
---Called when a land mine is armed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_land_mine_armed)
---@class EventData.on_land_mine_armed : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_land_mine_armed)
---@field mine LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_land_mine_armed)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_land_mine_armed)
---@field tick uint 

---@alias on_lua_shortcut EventData.on_lua_shortcut
---Called when a custom Lua shortcut is pressed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_lua_shortcut)
---@class EventData.on_lua_shortcut : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_lua_shortcut)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_lua_shortcut)
---@field player_index uint 
---Shortcut prototype name of the shortcut that was clicked.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_lua_shortcut)
---@field prototype_name string 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_lua_shortcut)
---@field tick uint 

---@alias on_marked_for_deconstruction EventData.on_marked_for_deconstruction
---Called when an entity is marked for deconstruction with the Deconstruction planner or via script. Can be filtered using [LuaEntityMarkedForDeconstructionEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForDeconstructionEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction)
---@class EventData.on_marked_for_deconstruction : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction)
---@field player_index? uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction)
---@field tick uint 

---@alias on_marked_for_upgrade EventData.on_marked_for_upgrade
---Called when an entity is marked for upgrade with the Upgrade planner or via script. Can be filtered using [LuaEntityMarkedForUpgradeEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaEntityMarkedForUpgradeEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade)
---@class EventData.on_marked_for_upgrade : EventData
---The new direction (if any)
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade)
---@field direction? defines.direction 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade)
---@field player_index? uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade)
---@field target LuaEntityPrototype 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_marked_for_upgrade)
---@field tick uint 

---@alias on_market_item_purchased EventData.on_market_item_purchased
---Called after a player purchases some offer from a `market` entity.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased)
---@class EventData.on_market_item_purchased : EventData
---The amount of offers purchased.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased)
---@field count uint 
---The market entity.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased)
---@field market LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased)
---@field name defines.events 
---The index of the offer purchased.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased)
---@field offer_index uint 
---The player who did the purchasing.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased)
---@field tick uint 

---@alias on_mod_item_opened EventData.on_mod_item_opened
---Called when the player uses the 'Open item GUI' control on an item defined with the 'mod-openable' flag
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_mod_item_opened)
---@class EventData.on_mod_item_opened : EventData
---The item clicked on.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_mod_item_opened)
---@field item LuaItemPrototype 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_mod_item_opened)
---@field name defines.events 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_mod_item_opened)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_mod_item_opened)
---@field tick uint 

---@alias on_permission_group_added EventData.on_permission_group_added
---Called directly after a permission group is added.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_added)
---@class EventData.on_permission_group_added : EventData
---The group added.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_added)
---@field group LuaPermissionGroup 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_added)
---@field name defines.events 
---The player that added the group.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_added)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_added)
---@field tick uint 

---@alias on_permission_group_deleted EventData.on_permission_group_deleted
---Called directly after a permission group is deleted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted)
---@class EventData.on_permission_group_deleted : EventData
---The group that was deleted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted)
---@field group_name string 
---The group id that was deleted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted)
---@field id uint 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted)
---@field name defines.events 
---The player doing the deletion.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_deleted)
---@field tick uint 

---@alias on_permission_group_edited EventData.on_permission_group_edited
---Called directly after a permission group is edited in some way.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited)
---@class EventData.on_permission_group_edited : EventData
---The action when the `type` is "add-permission" or "remove-permission".
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited)
---@field action defines.input_action 
---The group being edited.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited)
---@field group LuaPermissionGroup 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited)
---@field name defines.events 
---The new group name when the `type` is "rename".
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited)
---@field new_name string 
---The old group name when the `type` is "rename".
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited)
---@field old_name string 
---The other player when the `type` is "add-player" or "remove-player".
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited)
---@field other_player_index uint 
---The player that did the editing.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited)
---@field tick uint 
---The edit type: "add-permission", "remove-permission", "enable-all", "disable-all", "add-player", "remove-player", "rename".
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_group_edited)
---@field type string 

---@alias on_permission_string_imported EventData.on_permission_string_imported
---Called directly after a permission string is imported.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_string_imported)
---@class EventData.on_permission_string_imported : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_string_imported)
---@field name defines.events 
---The player that imported the string.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_string_imported)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_permission_string_imported)
---@field tick uint 

---@alias on_picked_up_item EventData.on_picked_up_item
---Called when a player picks up an item.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_picked_up_item)
---@class EventData.on_picked_up_item : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_picked_up_item)
---@field item_stack SimpleItemStack 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_picked_up_item)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_picked_up_item)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_picked_up_item)
---@field tick uint 

---@alias on_player_alt_selected_area EventData.on_player_alt_selected_area
---Called after a player alt-selects an area with a selection-tool item.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area)
---@class EventData.on_player_alt_selected_area : EventData
---The area selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area)
---@field area BoundingBox 
---The entities selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area)
---@field entities LuaEntity[] 
---The item used to select the area.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area)
---@field item string 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area)
---@field name defines.events 
---The player doing the selection.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area)
---@field player_index uint 
---The surface selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area)
---@field surface LuaSurface 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area)
---@field tick uint 
---The tiles selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_alt_selected_area)
---@field tiles LuaTile[] 

---@alias on_player_ammo_inventory_changed EventData.on_player_ammo_inventory_changed
---Called after a players ammo inventory changed in some way.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_ammo_inventory_changed)
---@class EventData.on_player_ammo_inventory_changed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_ammo_inventory_changed)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_ammo_inventory_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_ammo_inventory_changed)
---@field tick uint 

---@alias on_player_armor_inventory_changed EventData.on_player_armor_inventory_changed
---Called after a players armor inventory changed in some way.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_armor_inventory_changed)
---@class EventData.on_player_armor_inventory_changed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_armor_inventory_changed)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_armor_inventory_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_armor_inventory_changed)
---@field tick uint 

---@alias on_player_banned EventData.on_player_banned
---Called when a player is banned.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned)
---@class EventData.on_player_banned : EventData
---The player that did the banning if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned)
---@field by_player? uint 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned)
---@field name defines.events 
---The player banned.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned)
---@field player_index? uint 
---The banned player name.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned)
---@field player_name string 
---The reason given if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned)
---@field reason? string 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_banned)
---@field tick uint 

---@alias on_player_built_tile EventData.on_player_built_tile
---Called after a player builds tiles.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile)
---@class EventData.on_player_built_tile : EventData
---The item type used to build the tiles
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile)
---@field item? LuaItemPrototype 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile)
---@field player_index uint 
---The stack used to build the tiles (may be empty if all of the items where used to build the tiles).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile)
---@field stack? LuaItemStack 
---The surface the tile(s) were built on.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile)
---@field tick uint 
---The tile prototype that was placed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile)
---@field tile LuaTilePrototype 
---The position data.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_built_tile)
---@field tiles OldTileAndPosition[] 

---@alias on_player_cancelled_crafting EventData.on_player_cancelled_crafting
---Called when a player cancels crafting.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting)
---@class EventData.on_player_cancelled_crafting : EventData
---The number of crafts that have been cancelled.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting)
---@field cancel_count uint 
---The crafting items returned to the player's inventory.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting)
---@field items LuaInventory 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting)
---@field name defines.events 
---The player that did the crafting.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting)
---@field player_index uint 
---The recipe that has been cancelled.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting)
---@field recipe LuaRecipe 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cancelled_crafting)
---@field tick uint 

---@alias on_player_changed_force EventData.on_player_changed_force
---Called after a player changes forces.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_force)
---@class EventData.on_player_changed_force : EventData
---The old force.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_force)
---@field force LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_force)
---@field name defines.events 
---The player who changed forces.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_force)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_force)
---@field tick uint 

---@alias on_player_changed_position EventData.on_player_changed_position
---Called when the tile position a player is located at changes.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_position)
---@class EventData.on_player_changed_position : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_position)
---@field name defines.events 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_position)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_position)
---@field tick uint 

---@alias on_player_changed_surface EventData.on_player_changed_surface
---Called after a player changes surfaces.
---
---**Note:** In the instance a player is moved off a surface due to it being deleted this is not called.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_surface)
---@class EventData.on_player_changed_surface : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_surface)
---@field name defines.events 
---The player who changed surfaces.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_surface)
---@field player_index uint 
---The surface index the player was on.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_surface)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_changed_surface)
---@field tick uint 

---@alias on_player_cheat_mode_disabled EventData.on_player_cheat_mode_disabled
---Called when cheat mode is disabled on a player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_disabled)
---@class EventData.on_player_cheat_mode_disabled : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_disabled)
---@field name defines.events 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_disabled)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_disabled)
---@field tick uint 

---@alias on_player_cheat_mode_enabled EventData.on_player_cheat_mode_enabled
---Called when cheat mode is enabled on a player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled)
---@class EventData.on_player_cheat_mode_enabled : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled)
---@field name defines.events 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled)
---@field tick uint 

---@alias on_player_clicked_gps_tag EventData.on_player_clicked_gps_tag
---Called when a player clicks a gps tag
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag)
---@class EventData.on_player_clicked_gps_tag : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag)
---@field name defines.events 
---Index of the player
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag)
---@field player_index uint 
---Map position contained in gps tag
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag)
---@field position MapPosition 
---Surface name contained in gps tag, even when such surface does not exists
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag)
---@field surface string 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_clicked_gps_tag)
---@field tick uint 

---@alias on_player_configured_blueprint EventData.on_player_configured_blueprint
---Called when a player clicks the "confirm" button in the configure Blueprint GUI.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_blueprint)
---@class EventData.on_player_configured_blueprint : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_blueprint)
---@field name defines.events 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_blueprint)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_blueprint)
---@field tick uint 

---@alias on_player_configured_spider_remote EventData.on_player_configured_spider_remote
---Called when a player configures spidertron remote to be connected with a given spidertron
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote)
---@class EventData.on_player_configured_spider_remote : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote)
---@field name defines.events 
---The player that configured the remote.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote)
---@field tick uint 
---Spider vehicle to which remote was connected to.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_configured_spider_remote)
---@field vehicle LuaEntity 

---@alias on_player_crafted_item EventData.on_player_crafted_item
---Called when the player finishes crafting an item. This event fires just before the results are inserted into the player's inventory, not when the crafting is queued (see [on_pre_player_crafted_item](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item)).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item)
---@class EventData.on_player_crafted_item : EventData
---The item that has been crafted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item)
---@field item_stack LuaItemStack 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item)
---@field name defines.events 
---The player doing the crafting.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item)
---@field player_index uint 
---The recipe used to craft this item.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item)
---@field recipe LuaRecipe 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item)
---@field tick uint 

---@alias on_player_created EventData.on_player_created
---Called after the player was created.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_created)
---@class EventData.on_player_created : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_created)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_created)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_created)
---@field tick uint 

---@alias on_player_cursor_stack_changed EventData.on_player_cursor_stack_changed
---Called after a players cursorstack changed in some way.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed)
---@class EventData.on_player_cursor_stack_changed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_cursor_stack_changed)
---@field tick uint 

---@alias on_player_deconstructed_area EventData.on_player_deconstructed_area
---Called when a player selects an area with a deconstruction planner.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area)
---@class EventData.on_player_deconstructed_area : EventData
---If normal selection or alt selection was used.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area)
---@field alt boolean 
---The area selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area)
---@field area BoundingBox 
---The item used to select the area.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area)
---@field item string 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area)
---@field name defines.events 
---The player doing the selection.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area)
---@field player_index uint 
---The surface selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area)
---@field surface LuaSurface 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_deconstructed_area)
---@field tick uint 

---@alias on_player_demoted EventData.on_player_demoted
---Called when a player is demoted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_demoted)
---@class EventData.on_player_demoted : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_demoted)
---@field name defines.events 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_demoted)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_demoted)
---@field tick uint 

---@alias on_player_died EventData.on_player_died
---Called after a player dies.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_died)
---@class EventData.on_player_died : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_died)
---@field cause? LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_died)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_died)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_died)
---@field tick uint 

---@alias on_player_display_resolution_changed EventData.on_player_display_resolution_changed
---Called when the display resolution changes for a given player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed)
---@class EventData.on_player_display_resolution_changed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed)
---@field name defines.events 
---The old display resolution
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed)
---@field old_resolution DisplayResolution 
---The player
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_resolution_changed)
---@field tick uint 

---@alias on_player_display_scale_changed EventData.on_player_display_scale_changed
---Called when the display scale changes for a given player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed)
---@class EventData.on_player_display_scale_changed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed)
---@field name defines.events 
---The old display scale
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed)
---@field old_scale double 
---The player
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_display_scale_changed)
---@field tick uint 

---@alias on_player_driving_changed_state EventData.on_player_driving_changed_state
---Called when the player's driving state has changed, meaning a player has either entered or left a vehicle.
---
---**Note:** This event is not raised when the player is ejected from a vehicle due to it being destroyed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state)
---@class EventData.on_player_driving_changed_state : EventData
---The vehicle if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state)
---@field entity? LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_driving_changed_state)
---@field tick uint 

---@alias on_player_dropped_item EventData.on_player_dropped_item
---Called when a player drops an item on the ground.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_dropped_item)
---@class EventData.on_player_dropped_item : EventData
---The item-on-ground entity.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_dropped_item)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_dropped_item)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_dropped_item)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_dropped_item)
---@field tick uint 

---@alias on_player_fast_transferred EventData.on_player_fast_transferred
---Called when a player fast-transfers something to or from an entity.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred)
---@class EventData.on_player_fast_transferred : EventData
---The entity transferred from or to.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred)
---@field entity LuaEntity 
---Whether the transfer was from player to entity. If `false`, the transfer was from entity to player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred)
---@field from_player boolean 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred)
---@field name defines.events 
---The player transferred from or to.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred)
---@field tick uint 

---@alias on_player_flushed_fluid EventData.on_player_flushed_fluid
---Called after player flushed fluid
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid)
---@class EventData.on_player_flushed_fluid : EventData
---Amount of fluid that was removed
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid)
---@field amount double 
---Entity from which flush was performed
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid)
---@field entity LuaEntity 
---Name of a fluid that was flushed
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid)
---@field fluid string 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid)
---@field name defines.events 
---True if flush was requested only on this entity
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid)
---@field only_this_entity boolean 
---Index of the player
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_flushed_fluid)
---@field tick uint 

---@alias on_player_gun_inventory_changed EventData.on_player_gun_inventory_changed
---Called after a players gun inventory changed in some way.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_gun_inventory_changed)
---@class EventData.on_player_gun_inventory_changed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_gun_inventory_changed)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_gun_inventory_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_gun_inventory_changed)
---@field tick uint 

---@alias on_player_joined_game EventData.on_player_joined_game
---Called after a player joins the game. This is not called when loading a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_joined_game)
---@class EventData.on_player_joined_game : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_joined_game)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_joined_game)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_joined_game)
---@field tick uint 

---@alias on_player_kicked EventData.on_player_kicked
---Called when a player is kicked.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked)
---@class EventData.on_player_kicked : EventData
---The player that did the kicking if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked)
---@field by_player? uint 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked)
---@field name defines.events 
---The player kicked.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked)
---@field player_index uint 
---The reason given if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked)
---@field reason? string 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_kicked)
---@field tick uint 

---@alias on_player_left_game EventData.on_player_left_game
---Called after a player leaves the game. This is not called when closing a save file in singleplayer, as the player doesn't actually leave the game, and the save is just on pause until they rejoin.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_left_game)
---@class EventData.on_player_left_game : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_left_game)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_left_game)
---@field player_index uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_left_game)
---@field reason defines.disconnect_reason 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_left_game)
---@field tick uint 

---@alias on_player_main_inventory_changed EventData.on_player_main_inventory_changed
---Called after a players main inventory changed in some way.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed)
---@class EventData.on_player_main_inventory_changed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_main_inventory_changed)
---@field tick uint 

---@alias on_player_mined_entity EventData.on_player_mined_entity
---Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the player as if they came from mining the entity. Can be filtered using [LuaPlayerMinedEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerMinedEntityEventFilter).
---
---**Note:** The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity)
---@class EventData.on_player_mined_entity : EventData
---The temporary inventory that holds the result of mining the entity.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity)
---@field buffer LuaInventory 
---The entity that has been mined.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity)
---@field name defines.events 
---The index of the player doing the mining.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_entity)
---@field tick uint 

---@alias on_player_mined_item EventData.on_player_mined_item
---Called when the player mines something.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_item)
---@class EventData.on_player_mined_item : EventData
---The item given to the player
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_item)
---@field item_stack SimpleItemStack 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_item)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_item)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_item)
---@field tick uint 

---@alias on_player_mined_tile EventData.on_player_mined_tile
---Called after a player mines tiles.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile)
---@class EventData.on_player_mined_tile : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile)
---@field player_index uint 
---The surface the tile(s) were mined from.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile)
---@field tick uint 
---The position data.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_mined_tile)
---@field tiles OldTileAndPosition[] 

---@alias on_player_muted EventData.on_player_muted
---Called when a player is muted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_muted)
---@class EventData.on_player_muted : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_muted)
---@field name defines.events 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_muted)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_muted)
---@field tick uint 

---@alias on_player_pipette EventData.on_player_pipette
---Called when a player invokes the "smart pipette" over an entity.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette)
---@class EventData.on_player_pipette : EventData
---The item put in the cursor
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette)
---@field item LuaItemPrototype 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette)
---@field name defines.events 
---The player
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette)
---@field tick uint 
---If cheat mode was used to give a free stack of the item.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_pipette)
---@field used_cheat_mode boolean 

---@alias on_player_placed_equipment EventData.on_player_placed_equipment
---Called after the player puts equipment in an equipment grid
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment)
---@class EventData.on_player_placed_equipment : EventData
---The equipment put in the equipment grid.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment)
---@field equipment LuaEquipment 
---The equipment grid the equipment was put in.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment)
---@field grid LuaEquipmentGrid 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_placed_equipment)
---@field tick uint 

---@alias on_player_promoted EventData.on_player_promoted
---Called when a player is promoted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_promoted)
---@class EventData.on_player_promoted : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_promoted)
---@field name defines.events 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_promoted)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_promoted)
---@field tick uint 

---@alias on_player_removed EventData.on_player_removed
---Called when a player is removed (deleted) from the game. Not to be confused with the player logging of this is different in that the player is deleted as if he never existed in the save file.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed)
---@class EventData.on_player_removed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed)
---@field name defines.events 
---The player index that was removed
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed)
---@field tick uint 

---@alias on_player_removed_equipment EventData.on_player_removed_equipment
---Called after the player removes equipment from an equipment grid
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment)
---@class EventData.on_player_removed_equipment : EventData
---The count of equipment removed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment)
---@field count uint 
---The equipment removed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment)
---@field equipment string 
---The equipment grid removed from.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment)
---@field grid LuaEquipmentGrid 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_removed_equipment)
---@field tick uint 

---@alias on_player_repaired_entity EventData.on_player_repaired_entity
---Called when a player repairs an entity. Can be filtered using [LuaPlayerRepairedEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPlayerRepairedEntityEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity)
---@class EventData.on_player_repaired_entity : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_repaired_entity)
---@field tick uint 

---@alias on_player_respawned EventData.on_player_respawned
---Called after a player respawns.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_respawned)
---@class EventData.on_player_respawned : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_respawned)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_respawned)
---@field player_index uint 
---The player port used to respawn if one was used.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_respawned)
---@field player_port? LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_respawned)
---@field tick uint 

---@alias on_player_reverse_selected_area EventData.on_player_reverse_selected_area
---Called after a player reverse-selects an area with a selection-tool item.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area)
---@class EventData.on_player_reverse_selected_area : EventData
---The area selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area)
---@field area BoundingBox 
---The entities selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area)
---@field entities LuaEntity[] 
---The item used to select the area.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area)
---@field item string 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area)
---@field name defines.events 
---The player doing the selection.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area)
---@field player_index uint 
---The surface selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area)
---@field surface LuaSurface 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area)
---@field tick uint 
---The tiles selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_reverse_selected_area)
---@field tiles LuaTile[] 

---@alias on_player_rotated_entity EventData.on_player_rotated_entity
---Called when the player rotates an entity. This event is only fired when the entity actually changes its orientation -- pressing the rotate key on an entity that can't be rotated won't fire this event.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity)
---@class EventData.on_player_rotated_entity : EventData
---The rotated entity.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity)
---@field player_index uint 
---The previous direction
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity)
---@field previous_direction defines.direction 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_rotated_entity)
---@field tick uint 

---@alias on_player_selected_area EventData.on_player_selected_area
---Called after a player selects an area with a selection-tool item.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area)
---@class EventData.on_player_selected_area : EventData
---The area selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area)
---@field area BoundingBox 
---The entities selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area)
---@field entities LuaEntity[] 
---The item used to select the area.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area)
---@field item string 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area)
---@field name defines.events 
---The player doing the selection.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area)
---@field player_index uint 
---The surface selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area)
---@field surface LuaSurface 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area)
---@field tick uint 
---The tiles selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_selected_area)
---@field tiles LuaTile[] 

---@alias on_player_set_quick_bar_slot EventData.on_player_set_quick_bar_slot
---Called when a player sets a quickbar slot to anything (new value, or set to empty).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_set_quick_bar_slot)
---@class EventData.on_player_set_quick_bar_slot : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_set_quick_bar_slot)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_set_quick_bar_slot)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_set_quick_bar_slot)
---@field tick uint 

---@alias on_player_setup_blueprint EventData.on_player_setup_blueprint
---Called when a player selects an area with a blueprint.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint)
---@class EventData.on_player_setup_blueprint : EventData
---If normal selection or alt selection was used.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint)
---@field alt boolean 
---The area selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint)
---@field area BoundingBox 
---The item used to select the area.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint)
---@field item string 
---The blueprint entity index to source entity mapping. Note: if any mod changes the blueprint this will be incorrect.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint)
---@field mapping LuaLazyLoadedValue<{[uint]: LuaEntity}> 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint)
---@field name defines.events 
---The player doing the selection.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint)
---@field player_index uint 
---The surface selected.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint)
---@field surface LuaSurface 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_setup_blueprint)
---@field tick uint 

---@alias on_player_toggled_alt_mode EventData.on_player_toggled_alt_mode
---Called when a player toggles alt mode, also known as "show entity info".
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode)
---@class EventData.on_player_toggled_alt_mode : EventData
---The new alt mode value. This value is a shortcut for accessing [GameViewSettings::show_entity_info](https://lua-api.factorio.com/latest/Concepts.html#GameViewSettings.show_entity_info) on the player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode)
---@field alt_mode boolean 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_alt_mode)
---@field tick uint 

---@alias on_player_toggled_map_editor EventData.on_player_toggled_map_editor
---Called when a player toggles the map editor on or off.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor)
---@class EventData.on_player_toggled_map_editor : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_toggled_map_editor)
---@field tick uint 

---@alias on_player_trash_inventory_changed EventData.on_player_trash_inventory_changed
---Called after a players trash inventory changed in some way.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_trash_inventory_changed)
---@class EventData.on_player_trash_inventory_changed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_trash_inventory_changed)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_trash_inventory_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_trash_inventory_changed)
---@field tick uint 

---@alias on_player_unbanned EventData.on_player_unbanned
---Called when a player is un-banned.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned)
---@class EventData.on_player_unbanned : EventData
---The player that did the un-banning if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned)
---@field by_player? uint 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned)
---@field name defines.events 
---The player un-banned.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned)
---@field player_index? uint 
---The player name un-banned.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned)
---@field player_name string 
---The reason the player was banned if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned)
---@field reason? string 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unbanned)
---@field tick uint 

---@alias on_player_unmuted EventData.on_player_unmuted
---Called when a player is unmuted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unmuted)
---@class EventData.on_player_unmuted : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unmuted)
---@field name defines.events 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unmuted)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_unmuted)
---@field tick uint 

---@alias on_player_used_capsule EventData.on_player_used_capsule
---Called when a player uses a capsule that results in some game action.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule)
---@class EventData.on_player_used_capsule : EventData
---The capsule item used.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule)
---@field item LuaItemPrototype 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule)
---@field name defines.events 
---The player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule)
---@field player_index uint 
---The position the capsule was used.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule)
---@field position MapPosition 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_capsule)
---@field tick uint 

---@alias on_player_used_spider_remote EventData.on_player_used_spider_remote
---Called when a player uses spidertron remote to send a spidertron to a given position
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote)
---@class EventData.on_player_used_spider_remote : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote)
---@field name defines.events 
---The player that used the remote.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote)
---@field player_index uint 
---Goal position to which spidertron was sent to.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote)
---@field position MapPosition 
---If the use was successful. It may fail when spidertron has different driver or when player is on different surface.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote)
---@field success boolean 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote)
---@field tick uint 
---Spider vehicle which was requested to move.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_player_used_spider_remote)
---@field vehicle LuaEntity 

---@alias on_post_entity_died EventData.on_post_entity_died
---Called after an entity dies. Can be filtered using [LuaPostEntityDiedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPostEntityDiedEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died)
---@class EventData.on_post_entity_died : EventData
---The corpses created by the entity dying if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died)
---@field corpses LuaEntity[] 
---The damage type if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died)
---@field damage_type? LuaDamagePrototype 
---The force that did the killing if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died)
---@field force? LuaForce 
---The ghost created by the entity dying if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died)
---@field ghost? LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died)
---@field name defines.events 
---Position where the entity died.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died)
---@field position MapPosition 
---The entity prototype of the entity that died.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died)
---@field prototype LuaEntityPrototype 
---The surface the entity was on.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died)
---@field tick uint 
---The unit number the entity had if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_post_entity_died)
---@field unit_number? uint 

---@alias on_pre_build EventData.on_pre_build
---Called when players uses an item to build something. Called before [on_built_entity](https://lua-api.factorio.com/latest/events.html#on_built_entity).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build)
---@class EventData.on_pre_build : EventData
---Item was placed while moving.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build)
---@field created_by_moving boolean 
---The direction the item was facing when placed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build)
---@field direction defines.direction 
---If building this blueprint was flipped horizontally.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build)
---@field flip_horizontal boolean 
---If building this blueprint was flipped vertically.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build)
---@field flip_vertical boolean 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build)
---@field name defines.events 
---The player who did the placing.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build)
---@field player_index uint 
---Where the item was placed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build)
---@field position MapPosition 
---Item was placed using shift building.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build)
---@field shift_build boolean 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_build)
---@field tick uint 

---@alias on_pre_chunk_deleted EventData.on_pre_chunk_deleted
---Called before one or more chunks are deleted using [LuaSurface::delete_chunk](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.delete_chunk).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted)
---@class EventData.on_pre_chunk_deleted : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted)
---@field name defines.events 
---The chunks to be deleted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted)
---@field positions ChunkPosition[] 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_chunk_deleted)
---@field tick uint 

---@alias on_pre_entity_settings_pasted EventData.on_pre_entity_settings_pasted
---Called before entity copy-paste is done.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted)
---@class EventData.on_pre_entity_settings_pasted : EventData
---The destination entity settings will be copied to.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted)
---@field destination LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted)
---@field player_index uint 
---The source entity settings will be copied from.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted)
---@field source LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_entity_settings_pasted)
---@field tick uint 

---@alias on_pre_ghost_deconstructed EventData.on_pre_ghost_deconstructed
---Called before a ghost entity is destroyed as a result of being marked for deconstruction. Can be filtered using [LuaPreGhostDeconstructedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostDeconstructedEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed)
---@class EventData.on_pre_ghost_deconstructed : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed)
---@field ghost LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed)
---@field name defines.events 
---The player that did the deconstruction if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed)
---@field player_index? uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_deconstructed)
---@field tick uint 

---@alias on_pre_ghost_upgraded EventData.on_pre_ghost_upgraded
---Called before a ghost entity is upgraded. Can be filtered using [LuaPreGhostUpgradedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPreGhostUpgradedEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded)
---@class EventData.on_pre_ghost_upgraded : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded)
---@field ghost LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded)
---@field name defines.events 
---The player that did the upgrade if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded)
---@field player_index? uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded)
---@field target LuaEntityPrototype 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_ghost_upgraded)
---@field tick uint 

---@alias on_pre_permission_group_deleted EventData.on_pre_permission_group_deleted
---Called directly before a permission group is deleted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted)
---@class EventData.on_pre_permission_group_deleted : EventData
---The group to be deleted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted)
---@field group LuaPermissionGroup 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted)
---@field name defines.events 
---The player doing the deletion.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_group_deleted)
---@field tick uint 

---@alias on_pre_permission_string_imported EventData.on_pre_permission_string_imported
---Called directly before a permission string is imported.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_string_imported)
---@class EventData.on_pre_permission_string_imported : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_string_imported)
---@field name defines.events 
---The player importing the string.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_string_imported)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_permission_string_imported)
---@field tick uint 

---@alias on_pre_player_crafted_item EventData.on_pre_player_crafted_item
---Called when a player queues something to be crafted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item)
---@class EventData.on_pre_player_crafted_item : EventData
---The items removed from the players inventory to do the crafting.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item)
---@field items LuaInventory 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item)
---@field name defines.events 
---The player doing the crafting.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item)
---@field player_index uint 
---The number of times the recipe is being queued.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item)
---@field queued_count uint 
---The recipe being queued.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item)
---@field recipe LuaRecipe 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_crafted_item)
---@field tick uint 

---@alias on_pre_player_died EventData.on_pre_player_died
---Called before a players dies.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_died)
---@class EventData.on_pre_player_died : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_died)
---@field cause? LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_died)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_died)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_died)
---@field tick uint 

---@alias on_pre_player_left_game EventData.on_pre_player_left_game
---Called before a player leaves the game.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game)
---@class EventData.on_pre_player_left_game : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game)
---@field player_index uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game)
---@field reason defines.disconnect_reason 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_left_game)
---@field tick uint 

---@alias on_pre_player_mined_item EventData.on_pre_player_mined_item
---Called when the player completes a mining action, but before the entity is potentially removed from the map. This is called even if the entity does not end up being removed. Can be filtered using [LuaPrePlayerMinedEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPrePlayerMinedEntityEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item)
---@class EventData.on_pre_player_mined_item : EventData
---The entity being mined
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_mined_item)
---@field tick uint 

---@alias on_pre_player_removed EventData.on_pre_player_removed
---Called before a player is removed (deleted) from the game. Not to be confused with the player logging of this is different in that the player is deleted as if he never existed in the save file.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_removed)
---@class EventData.on_pre_player_removed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_removed)
---@field name defines.events 
---The player index that will be removed
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_removed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_removed)
---@field tick uint 

---@alias on_pre_player_toggled_map_editor EventData.on_pre_player_toggled_map_editor
---Called before a player toggles the map editor on or off.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor)
---@class EventData.on_pre_player_toggled_map_editor : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_player_toggled_map_editor)
---@field tick uint 

---@alias on_pre_robot_exploded_cliff EventData.on_pre_robot_exploded_cliff
---Called directly before a robot explodes cliffs.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff)
---@class EventData.on_pre_robot_exploded_cliff : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff)
---@field cliff LuaEntity 
---The cliff explosive used.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff)
---@field item LuaItemPrototype 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff)
---@field robot LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_robot_exploded_cliff)
---@field tick uint 

---@alias on_pre_script_inventory_resized EventData.on_pre_script_inventory_resized
---Called just before a script inventory is resized.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized)
---@class EventData.on_pre_script_inventory_resized : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized)
---@field inventory LuaInventory 
---The mod that did the resizing. This will be `"core"` if done by console command or scenario script.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized)
---@field mod string 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized)
---@field name defines.events 
---The new inventory size.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized)
---@field new_size uint 
---The old inventory size.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized)
---@field old_size uint 
---If done by console command; the player who ran the command.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized)
---@field player_index? uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_script_inventory_resized)
---@field tick uint 

---@alias on_pre_surface_cleared EventData.on_pre_surface_cleared
---Called just before a surface is cleared (all entities removed and all chunks deleted).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared)
---@class EventData.on_pre_surface_cleared : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_cleared)
---@field tick uint 

---@alias on_pre_surface_deleted EventData.on_pre_surface_deleted
---Called just before a surface is deleted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted)
---@class EventData.on_pre_surface_deleted : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_pre_surface_deleted)
---@field tick uint 

---@alias on_research_cancelled EventData.on_research_cancelled
---Called when research is cancelled.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_cancelled)
---@class EventData.on_research_cancelled : EventData
---The force whose research was cancelled.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_cancelled)
---@field force LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_cancelled)
---@field name defines.events 
---A mapping of technology name to how many times it was cancelled.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_cancelled)
---@field research {[string]: uint} 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_cancelled)
---@field tick uint 

---@alias on_research_finished EventData.on_research_finished
---Called when a research finishes.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_finished)
---@class EventData.on_research_finished : EventData
---If the technology was researched by script.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_finished)
---@field by_script boolean 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_finished)
---@field name defines.events 
---The researched technology
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_finished)
---@field research LuaTechnology 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_finished)
---@field tick uint 

---@alias on_research_reversed EventData.on_research_reversed
---Called when a research is reversed (unresearched).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_reversed)
---@class EventData.on_research_reversed : EventData
---If the technology was un-researched by script.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_reversed)
---@field by_script boolean 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_reversed)
---@field name defines.events 
---The technology un-researched
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_reversed)
---@field research LuaTechnology 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_reversed)
---@field tick uint 

---@alias on_research_started EventData.on_research_started
---Called when a technology research starts.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_started)
---@class EventData.on_research_started : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_started)
---@field last_research? LuaTechnology 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_started)
---@field name defines.events 
---The technology being researched
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_started)
---@field research LuaTechnology 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_research_started)
---@field tick uint 

---@alias on_resource_depleted EventData.on_resource_depleted
---Called when a resource entity reaches 0 or its minimum yield for infinite resources.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_resource_depleted)
---@class EventData.on_resource_depleted : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_resource_depleted)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_resource_depleted)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_resource_depleted)
---@field tick uint 

---@alias on_robot_built_entity EventData.on_robot_built_entity
---Called when a construction robot builds an entity. Can be filtered using [LuaRobotBuiltEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotBuiltEntityEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity)
---@class EventData.on_robot_built_entity : EventData
---The entity built.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity)
---@field created_entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity)
---@field name defines.events 
---The robot that did the building.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity)
---@field robot LuaEntity 
---The item used to do the building.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity)
---@field stack LuaItemStack 
---The tags associated with this entity if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity)
---@field tags? Tags 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_entity)
---@field tick uint 

---@alias on_robot_built_tile EventData.on_robot_built_tile
---Called after a robot builds tiles.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile)
---@class EventData.on_robot_built_tile : EventData
---The item type used to build the tiles.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile)
---@field item LuaItemPrototype 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile)
---@field name defines.events 
---The robot.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile)
---@field robot LuaEntity 
---The stack used to build the tiles (may be empty if all of the items where used to build the tiles).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile)
---@field stack LuaItemStack 
---The surface the tile(s) are build on.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile)
---@field tick uint 
---The tile prototype that was placed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile)
---@field tile LuaTilePrototype 
---The position data.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_built_tile)
---@field tiles OldTileAndPosition[] 

---@alias on_robot_exploded_cliff EventData.on_robot_exploded_cliff
---Called directly after a robot explodes cliffs.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff)
---@class EventData.on_robot_exploded_cliff : EventData
---The cliff explosive used.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff)
---@field item LuaItemPrototype 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff)
---@field robot LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_exploded_cliff)
---@field tick uint 

---@alias on_robot_mined EventData.on_robot_mined
---Called when a robot mines an entity.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined)
---@class EventData.on_robot_mined : EventData
---The entity the robot just picked up.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined)
---@field item_stack SimpleItemStack 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined)
---@field name defines.events 
---The robot that did the mining.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined)
---@field robot LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined)
---@field tick uint 

---@alias on_robot_mined_entity EventData.on_robot_mined_entity
---Called after the results of an entity being mined are collected just before the entity is destroyed. After this event any items in the buffer will be transferred into the robot as if they came from mining the entity. Can be filtered using [LuaRobotMinedEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaRobotMinedEntityEventFilter).
---
---**Note:** The buffer inventory is special in that it's only valid during this event and has a dynamic size expanding as more items are transferred into it.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity)
---@class EventData.on_robot_mined_entity : EventData
---The temporary inventory that holds the result of mining the entity.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity)
---@field buffer LuaInventory 
---The entity that has been mined.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity)
---@field name defines.events 
---The robot doing the mining.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity)
---@field robot LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_entity)
---@field tick uint 

---@alias on_robot_mined_tile EventData.on_robot_mined_tile
---Called after a robot mines tiles.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile)
---@class EventData.on_robot_mined_tile : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile)
---@field name defines.events 
---The robot.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile)
---@field robot LuaEntity 
---The surface the tile(s) were mined on.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile)
---@field tick uint 
---The position data.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_mined_tile)
---@field tiles OldTileAndPosition[] 

---@alias on_robot_pre_mined EventData.on_robot_pre_mined
---Called before a robot mines an entity. Can be filtered using [LuaPreRobotMinedEntityEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaPreRobotMinedEntityEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined)
---@class EventData.on_robot_pre_mined : EventData
---The entity which is about to be mined.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined)
---@field name defines.events 
---The robot that's about to do the mining.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined)
---@field robot LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_robot_pre_mined)
---@field tick uint 

---@alias on_rocket_launch_ordered EventData.on_rocket_launch_ordered
---Called when a rocket silo is ordered to be launched.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered)
---@class EventData.on_rocket_launch_ordered : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered)
---@field name defines.events 
---The player that is riding the rocket, if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered)
---@field player_index? uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered)
---@field rocket LuaEntity 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered)
---@field rocket_silo LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launch_ordered)
---@field tick uint 

---@alias on_rocket_launched EventData.on_rocket_launched
---Called when the rocket is launched.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched)
---@class EventData.on_rocket_launched : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched)
---@field name defines.events 
---The player that is riding the rocket, if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched)
---@field player_index? uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched)
---@field rocket LuaEntity 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched)
---@field rocket_silo? LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_rocket_launched)
---@field tick uint 

---@alias on_runtime_mod_setting_changed EventData.on_runtime_mod_setting_changed
---Called when a runtime mod setting is changed by a player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed)
---@class EventData.on_runtime_mod_setting_changed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed)
---@field name defines.events 
---If the `setting_type` is `"global"` and it was changed through the mod settings GUI, this is the index of the player that changed the global setting. If the `setting_type` is `"runtime-per-user"` and it changed a current setting of the player, this is the index of the player whose setting was changed. In all other cases, this is `nil`.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed)
---@field player_index? uint 
---The prototype name of the setting that was changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed)
---@field setting string 
---Either "runtime-per-user" or "runtime-global".
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed)
---@field setting_type string 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_runtime_mod_setting_changed)
---@field tick uint 

---@alias on_script_inventory_resized EventData.on_script_inventory_resized
---Called just after a script inventory is resized.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized)
---@class EventData.on_script_inventory_resized : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized)
---@field inventory LuaInventory 
---The mod that did the resizing. This will be `"core"` if done by console command or scenario script.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized)
---@field mod string 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized)
---@field name defines.events 
---The new inventory size.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized)
---@field new_size uint 
---The old inventory size.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized)
---@field old_size uint 
---Any items which didn't fit into the new inventory size.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized)
---@field overflow_inventory LuaInventory 
---If done by console command; the player who ran the command.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized)
---@field player_index? uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_inventory_resized)
---@field tick uint 

---@alias on_script_path_request_finished EventData.on_script_path_request_finished
---Called when a [LuaSurface::request_path](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path) call completes.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished)
---@class EventData.on_script_path_request_finished : EventData
---Handle to associate the callback with a particular call to [LuaSurface::request_path](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.request_path).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished)
---@field id uint 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished)
---@field name defines.events 
---The actual path that the pathfinder has determined. `nil` if pathfinding failed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished)
---@field path? PathfinderWaypoint[] 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished)
---@field tick uint 
---Indicates that the pathfinder failed because it is too busy, and that you can retry later.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_path_request_finished)
---@field try_again_later boolean 

---@alias on_script_trigger_effect EventData.on_script_trigger_effect
---Called when a script trigger effect is triggered.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect)
---@class EventData.on_script_trigger_effect : EventData
---The effect_id specified in the trigger effect.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect)
---@field effect_id string 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect)
---@field source_entity? LuaEntity 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect)
---@field source_position? MapPosition 
---The surface the effect happened on.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect)
---@field surface_index uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect)
---@field target_entity? LuaEntity 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect)
---@field target_position? MapPosition 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_script_trigger_effect)
---@field tick uint 

---@alias on_sector_scanned EventData.on_sector_scanned
---Called when an entity of type `radar` finishes scanning a sector. Can be filtered for the radar using [LuaSectorScannedEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaSectorScannedEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned)
---@class EventData.on_sector_scanned : EventData
---Area of the scanned chunk.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned)
---@field area BoundingBox 
---The chunk scanned.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned)
---@field chunk_position ChunkPosition 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned)
---@field name defines.events 
---The radar that did the scanning.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned)
---@field radar LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_sector_scanned)
---@field tick uint 

---@alias on_selected_entity_changed EventData.on_selected_entity_changed
---Called after the selected entity changes for a given player.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed)
---@class EventData.on_selected_entity_changed : EventData
---The last selected entity if it still exists and there was one.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed)
---@field last_entity? LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed)
---@field name defines.events 
---The player whose selected entity changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed)
---@field player_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_selected_entity_changed)
---@field tick uint 

---@alias on_spider_command_completed EventData.on_spider_command_completed
---Called when a spider finishes moving to its autopilot position.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_spider_command_completed)
---@class EventData.on_spider_command_completed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_spider_command_completed)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_spider_command_completed)
---@field tick uint 
---Spider vehicle which was requested to move.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_spider_command_completed)
---@field vehicle LuaEntity 

---@alias on_string_translated EventData.on_string_translated
---Called when a translation request generated through [LuaPlayer::request_translation](https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.request_translation) is translated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated)
---@class EventData.on_string_translated : EventData
---The localised string being translated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated)
---@field localised_string LocalisedString 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated)
---@field name defines.events 
---The player whose locale was used for the translation.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated)
---@field player_index uint 
---The translated `localised_string`.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated)
---@field result string 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated)
---@field tick uint 
---Whether the requested localised string was valid and could be translated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_string_translated)
---@field translated boolean 

---@alias on_surface_cleared EventData.on_surface_cleared
---Called just after a surface is cleared (all entities removed and all chunks deleted).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_cleared)
---@class EventData.on_surface_cleared : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_cleared)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_cleared)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_cleared)
---@field tick uint 

---@alias on_surface_created EventData.on_surface_created
---Called when a surface is created.
---
---**Note:** This is not called when the default surface is created as it will always exist.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_created)
---@class EventData.on_surface_created : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_created)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_created)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_created)
---@field tick uint 

---@alias on_surface_deleted EventData.on_surface_deleted
---Called after a surface is deleted.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_deleted)
---@class EventData.on_surface_deleted : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_deleted)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_deleted)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_deleted)
---@field tick uint 

---@alias on_surface_imported EventData.on_surface_imported
---Called after a surface is imported.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_imported)
---@class EventData.on_surface_imported : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_imported)
---@field name defines.events 
---The original surface name.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_imported)
---@field original_name string 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_imported)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_imported)
---@field tick uint 

---@alias on_surface_renamed EventData.on_surface_renamed
---Called when a surface is renamed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed)
---@class EventData.on_surface_renamed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed)
---@field new_name string 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed)
---@field old_name string 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_surface_renamed)
---@field tick uint 

---@alias on_technology_effects_reset EventData.on_technology_effects_reset
---Called when [LuaForce::reset_technology_effects](https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset_technology_effects) is finished.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset)
---@class EventData.on_technology_effects_reset : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset)
---@field force LuaForce 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_technology_effects_reset)
---@field tick uint 

---@alias on_tick EventData.on_tick
---It is fired once every tick. Since this event is fired every tick, its handler shouldn't include performance heavy code.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_tick)
---@class EventData.on_tick : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_tick)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_tick)
---@field tick uint 

---@alias on_train_changed_state EventData.on_train_changed_state
---Called when a train changes state (started to stopped and vice versa)
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_changed_state)
---@class EventData.on_train_changed_state : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_changed_state)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_changed_state)
---@field old_state defines.train_state 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_changed_state)
---@field tick uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_changed_state)
---@field train LuaTrain 

---@alias on_train_created EventData.on_train_created
---Called when a new train is created either through disconnecting/connecting an existing one or building a new one.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created)
---@class EventData.on_train_created : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created)
---@field name defines.events 
---The first old train id when splitting/merging trains.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created)
---@field old_train_id_1? uint 
---The second old train id when splitting/merging trains.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created)
---@field old_train_id_2? uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created)
---@field tick uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_created)
---@field train LuaTrain 

---@alias on_train_schedule_changed EventData.on_train_schedule_changed
---Called when a trains schedule is changed either by the player or through script.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed)
---@class EventData.on_train_schedule_changed : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed)
---@field name defines.events 
---The player who made the change if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed)
---@field player_index? uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed)
---@field tick uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_train_schedule_changed)
---@field train LuaTrain 

---@alias on_trigger_created_entity EventData.on_trigger_created_entity
---Called when an entity with a trigger prototype (such as capsules) create an entity AND that trigger prototype defined `trigger_created_entity="true"`.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity)
---@class EventData.on_trigger_created_entity : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity)
---@field source? LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_created_entity)
---@field tick uint 

---@alias on_trigger_fired_artillery EventData.on_trigger_fired_artillery
---Called when an entity with a trigger prototype (such as capsules) fire an artillery projectile AND that trigger prototype defined `trigger_fired_artillery="true"`.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery)
---@class EventData.on_trigger_fired_artillery : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery)
---@field source? LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_trigger_fired_artillery)
---@field tick uint 

---@alias on_unit_added_to_group EventData.on_unit_added_to_group
---Called when a unit is added to a unit group.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group)
---@class EventData.on_unit_added_to_group : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group)
---@field group LuaUnitGroup 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group)
---@field tick uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_added_to_group)
---@field unit LuaEntity 

---@alias on_unit_group_created EventData.on_unit_group_created
---Called when a new unit group is created, before any members are added to it.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_created)
---@class EventData.on_unit_group_created : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_created)
---@field group LuaUnitGroup 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_created)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_created)
---@field tick uint 

---@alias on_unit_group_finished_gathering EventData.on_unit_group_finished_gathering
---Called when a unit group finishes gathering and starts executing its command.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_finished_gathering)
---@class EventData.on_unit_group_finished_gathering : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_finished_gathering)
---@field group LuaUnitGroup 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_finished_gathering)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_group_finished_gathering)
---@field tick uint 

---@alias on_unit_removed_from_group EventData.on_unit_removed_from_group
---Called when a unit is removed from a unit group.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group)
---@class EventData.on_unit_removed_from_group : EventData
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group)
---@field group LuaUnitGroup 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group)
---@field tick uint 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_unit_removed_from_group)
---@field unit LuaEntity 

---@alias on_worker_robot_expired EventData.on_worker_robot_expired
---Called when a worker (construction or logistic) robot expires through a lack of energy.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_worker_robot_expired)
---@class EventData.on_worker_robot_expired : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_worker_robot_expired)
---@field name defines.events 
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_worker_robot_expired)
---@field robot LuaEntity 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#on_worker_robot_expired)
---@field tick uint 

---@alias script_raised_built EventData.script_raised_built
---A static event mods can use to tell other mods they built something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event) or [LuaBootstrap::raise_script_built](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_built), or when `raise_built` is passed to [LuaSurface::create_entity](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.create_entity). Can be filtered using [LuaScriptRaisedBuiltEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedBuiltEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_built)
---@class EventData.script_raised_built : EventData
---The entity that has been built.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_built)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_built)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_built)
---@field tick uint 

---@alias script_raised_destroy EventData.script_raised_destroy
---A static event mods can use to tell other mods they destroyed something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event) or [LuaBootstrap::raise_script_destroy](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_destroy), or when `raise_destroy` is passed to [LuaEntity::destroy](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.destroy). Can be filtered using [LuaScriptRaisedDestroyEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedDestroyEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_destroy)
---@class EventData.script_raised_destroy : EventData
---The entity that was destroyed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_destroy)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_destroy)
---@field name defines.events 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_destroy)
---@field tick uint 

---@alias script_raised_revive EventData.script_raised_revive
---A static event mods can use to tell other mods they revived something by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event) or [LuaBootstrap::raise_script_revive](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_revive), or when `raise_revive` is passed to [LuaEntity::revive](https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.revive). Can be filtered using [LuaScriptRaisedReviveEventFilter](https://lua-api.factorio.com/latest/Concepts.html#LuaScriptRaisedReviveEventFilter).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_revive)
---@class EventData.script_raised_revive : EventData
---The entity that was revived.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_revive)
---@field entity LuaEntity 
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_revive)
---@field name defines.events 
---The tags associated with this entity, if any.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_revive)
---@field tags? Tags 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_revive)
---@field tick uint 

---@alias script_raised_set_tiles EventData.script_raised_set_tiles
---A static event mods can use to tell other mods they changed tiles on a surface by script. This event is only raised if a mod does so with [LuaBootstrap::raise_event](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_event) or [LuaBootstrap::raise_script_set_tiles](https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.raise_script_set_tiles), or when `raise_event` is passed to [LuaSurface::set_tiles](https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.set_tiles).
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles)
---@class EventData.script_raised_set_tiles : EventData
---Identifier of the event
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles)
---@field name defines.events 
---The surface whose tiles were changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles)
---@field surface_index uint 
---Tick the event was generated.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles)
---@field tick uint 
---The tiles that were changed.
---
---[View documentation](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles)
---@field tiles Tile[] 


