mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-08 10:08:08 -06:00
api update
This commit is contained in:
14
.vscode/factorio/runtime-api-LuaRemote.lua
vendored
14
.vscode/factorio/runtime-api-LuaRemote.lua
vendored
@@ -1,7 +1,7 @@
|
||||
---@meta
|
||||
---@diagnostic disable
|
||||
|
||||
--$Factorio 1.1.69
|
||||
--$Factorio 1.1.70
|
||||
--$Overlay 5
|
||||
--$Section LuaRemote
|
||||
-- This file is automatically generated. Edits will be overwritten.
|
||||
@@ -26,7 +26,7 @@
|
||||
---```
|
||||
---@class LuaRemote:LuaObject
|
||||
---[R]
|
||||
---List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to the value `true`.
|
||||
---List of all registered interfaces. For each interface name, `remote.interfaces[name]` is a dictionary mapping the interface's registered functions to `true`.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.interfaces)
|
||||
---
|
||||
@@ -36,7 +36,7 @@
|
||||
---game.player.print(tostring(remote.interfaces["human interactor"]["hello"])) -- prints true
|
||||
---game.player.print(tostring(remote.interfaces["human interactor"]["nonexistent"])) -- prints nil
|
||||
---```
|
||||
---@field interfaces {[string]: {[string]: boolean}}
|
||||
---@field interfaces {[string]: {[string]: true}}
|
||||
---[R]
|
||||
---This object's name.
|
||||
---
|
||||
@@ -45,20 +45,18 @@
|
||||
remote={
|
||||
---Add a remote interface.
|
||||
---
|
||||
---**Note:** It is an error if the given interface `name` is already registered.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.add_interface)
|
||||
---@param name string@Name of the interface.
|
||||
---@param name string@Name of the interface. If the name matches any existing interface, an error is thrown.
|
||||
---@param functions {[string]: fun()}@List of functions that are members of the new interface.
|
||||
add_interface=function(name,functions)end,
|
||||
---Call a function of an interface.
|
||||
---
|
||||
---[View documentation](https://lua-api.factorio.com/latest/LuaRemote.html#LuaRemote.call)
|
||||
---@param interface string@Interface to look up `function` in.
|
||||
---@param function_ string@Function name that belongs to `interface`.
|
||||
---@param function_ string@Function name that belongs to the `interface`.
|
||||
---@vararg Any
|
||||
---
|
||||
---**vararg**: Arguments to pass to the called function.
|
||||
---**vararg**: Arguments to pass to the called function. Note that any arguments passed through the interface are a copy of the original, not a reference. Metatables are not retained, while references to LuaObjects stay intact.
|
||||
---@return Any?
|
||||
call=function(interface,function_,...)end,
|
||||
---Removes an interface with the given name.
|
||||
|
||||
Reference in New Issue
Block a user