Network Lua API: Difference between revisions

From Off Grid Wiki
Jump to navigation Jump to search
(removing startDocs tag)
No edit summary
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<!-- This file is auto generated, please don't edit manually! -->
= Network =
= Network =
== Description ==
== Description ==
Allows modders to trigger network operations
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, dataPoint)</syntaxhighlight>
<syntaxhighlight source lang="lua">Network.CreateDataPoint(internalName, dataTable, locationObject, characterName, networkName)</syntaxhighlight>
'''Expected parameter types'''
'''Expected parameter types'''
{| class="wikitable"
{| class="wikitable"
|-
! Name !! Type
|-
| internalName || string
|-
| dataTable || Lua Table
|-
|-
| locationObject || string
| locationObject || string
Line 12: Line 19:
| characterName || string
| characterName || string
|-
|-
| dataPoint || Lua Type
| networkName || string
|}
|}
'''Description''': Create a DataPoint in a specific place, from a specific character, with pre filled in data.
'''Description''': Create a DataPoint in a specific place, from a specific character, with pre filled in data.


'''Returns''': Nothing
'''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''': 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




This file is auto generated, please don't edit manually!


'''Docs last hacked together on''': 02/06/2017 16:09
'''Docs last hacked together on''': 23/07/2020 11:58
[[Category:Modding]][[Category:LuaAPI]]

Revision as of 13:46, 23 July 2020

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: 23/07/2020 11:58