Network Lua API: Difference between revisions
No edit summary |
No edit summary |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
= Network = | = Network = | ||
== Description == | == Description == | ||
Network API handles netwroks, connecting and disconnecting devices, and sending data between characters and devices. | |||
== Functions == | == Functions == | ||
=== CreateDataPoint === | === CreateDataPoint === | ||
<syntaxhighlight source lang="lua">Network.CreateDataPoint(locationObject, characterName, | <syntaxhighlight source lang="lua">Network.CreateDataPoint(internalName, dataTable, locationObject, characterName, networkName)</syntaxhighlight> | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Name !! Type | ! Name !! Type | ||
|- | |||
| internalName || string | |||
|- | |||
| dataTable || Lua Table | |||
|- | |- | ||
| locationObject || string | | locationObject || string | ||
Line 15: | Line 19: | ||
| characterName || string | | characterName || string | ||
|- | |- | ||
| | | networkName || string | ||
|} | |||
'''Description''': Create a DataPoint in a specific place, from a specific character, with pre filled in data. | |||
'''Returns''': Nothing | |||
=== ConnectToNetwork === | |||
<syntaxhighlight source lang="lua">Network.ConnectToNetwork(connector, targetNetwork, accessKey)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| connector || Lua Type | |||
|- | |||
| targetNetwork || string | |||
|- | |- | ||
| | | accessKey || string | ||
|} | |} | ||
'''Description''': | '''Description''': Connect a device (or a table of devices) to a specified network | ||
'''Returns''': Nothing | |||
=== SendData === | |||
<syntaxhighlight source lang="lua">Network.SendData(internalName, dataTable, sender, receiver)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| internalName || string | |||
|- | |||
| dataTable || Lua Table | |||
|- | |||
| sender || Lua Type | |||
|- | |||
| receiver || Lua Type | |||
|} | |||
'''Description''': Send a data file from one device to another | |||
'''Returns''': Nothing | |||
'''Notes''': Much like _ConnectToNetwork_ both _senderName_ and _receiverName_ can be character names (assuming those characters have net devices) | |||
=== SetNetDeviceNFCData === | |||
<syntaxhighlight source lang="lua">Network.SetNetDeviceNFCData(internalName, dataTable, deviceTable)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| internalName || string | |||
|- | |||
| dataTable || Lua Table | |||
|- | |||
| deviceTable || Lua Table | |||
|} | |||
'''Description''': Sets NFC data on a mission object | |||
'''Returns''': Nothing | |||
=== SetNetDeviceNFC === | |||
<syntaxhighlight source lang="lua">Network.SetNetDeviceNFC(deviceName, enabled)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| deviceName || string | |||
|- | |||
| enabled || bool | |||
|} | |||
'''Description''': Set if a mission object supports NFCAddNetDevice | |||
'''Returns''': Nothing | '''Returns''': Nothing | ||
Line 27: | Line 98: | ||
This file is auto generated, please don't edit manually! | This file is auto generated, please don't edit manually! | ||
'''Docs last hacked together on''': 10/ | '''Docs last hacked together on''': 13/10/2021 15:55 | ||
[[ | [[Category:Modding]][[Category:LuaAPI]] |
Revision as of 08:56, 14 October 2021
Network
Description
Network API handles netwroks, connecting and disconnecting devices, and sending data between characters and devices.
Functions
CreateDataPoint
Network.CreateDataPoint(internalName, dataTable, locationObject, characterName, networkName)
Expected parameter types
Name | Type |
---|---|
internalName | string |
dataTable | Lua Table |
locationObject | string |
characterName | string |
networkName | string |
Description: Create a DataPoint in a specific place, from a specific character, with pre filled in data.
Returns: Nothing
ConnectToNetwork
Network.ConnectToNetwork(connector, targetNetwork, accessKey)
Expected parameter types
Name | Type |
---|---|
connector | Lua Type |
targetNetwork | string |
accessKey | string |
Description: Connect a device (or a table of devices) to a specified network
Returns: Nothing
SendData
Network.SendData(internalName, dataTable, sender, receiver)
Expected parameter types
Name | Type |
---|---|
internalName | string |
dataTable | Lua Table |
sender | Lua Type |
receiver | Lua Type |
Description: Send a data file from one device to another
Returns: Nothing
Notes: Much like _ConnectToNetwork_ both _senderName_ and _receiverName_ can be character names (assuming those characters have net devices)
SetNetDeviceNFCData
Network.SetNetDeviceNFCData(internalName, dataTable, deviceTable)
Expected parameter types
Name | Type |
---|---|
internalName | string |
dataTable | Lua Table |
deviceTable | Lua Table |
Description: Sets NFC data on a mission object
Returns: Nothing
SetNetDeviceNFC
Network.SetNetDeviceNFC(deviceName, enabled)
Expected parameter types
Name | Type |
---|---|
deviceName | string |
enabled | bool |
Description: Set if a mission object supports NFCAddNetDevice
Returns: Nothing
This file is auto generated, please don't edit manually!
Docs last hacked together on: 13/10/2021 15:55