mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Add type patch meta file
This commit is contained in:
35
type.patch.lua
Normal file
35
type.patch.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
---@meta
|
||||
|
||||
---@class script
|
||||
script = {
|
||||
---Raise an event. Only events generated with [LuaBootstrap::generate\_event\_name](https://lua-api.factorio.com/latest/classes/LuaBootstrap.html#generate_event_name) and the following can be raised:
|
||||
---
|
||||
---Events that can be raised manually:
|
||||
---
|
||||
---* [on\_console\_chat](https://lua-api.factorio.com/latest/events.html#on_console_chat)
|
||||
---* [on\_player\_crafted\_item](https://lua-api.factorio.com/latest/events.html#on_player_crafted_item)
|
||||
---* [on\_player\_fast\_transferred](https://lua-api.factorio.com/latest/events.html#on_player_fast_transferred)
|
||||
---* [on\_biter\_base\_built](https://lua-api.factorio.com/latest/events.html#on_biter_base_built)
|
||||
---* [on\_market\_item\_purchased](https://lua-api.factorio.com/latest/events.html#on_market_item_purchased)
|
||||
---* [script\_raised\_built](https://lua-api.factorio.com/latest/events.html#script_raised_built)
|
||||
---* [script\_raised\_destroy](https://lua-api.factorio.com/latest/events.html#script_raised_destroy)
|
||||
---* [script\_raised\_revive](https://lua-api.factorio.com/latest/events.html#script_raised_revive)
|
||||
---* [script\_raised\_teleported](https://lua-api.factorio.com/latest/events.html#script_raised_teleported)
|
||||
---* [script\_raised\_set\_tiles](https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles)
|
||||
---
|
||||
---### Example
|
||||
---
|
||||
---```
|
||||
----- Raise the on_console_chat event with the desired message 'from' the first player
|
||||
---local data = {player_index = 1, message = "Hello friends!"}
|
||||
---script.raise_event(defines.events.on_console_chat, data)
|
||||
---```
|
||||
---
|
||||
---[View Documentation](https://lua-api.factorio.com/latest/classes/LuaBootstrap.html#raise_event)
|
||||
---
|
||||
--- Type patched in 2.0.28: [Bug Report](https://forums.factorio.com/viewtopic.php?f=233&t=125062)
|
||||
--- Changed "event" from "string | integer" to "LuaEventType"
|
||||
---@param event LuaEventType ID or name of the event to raise.
|
||||
---@param data table Table with extra data that will be passed to the event handler. Any invalid LuaObjects will silently stop the event from being raised.
|
||||
raise_event = function(event, data) end;
|
||||
}
|
||||
Reference in New Issue
Block a user