Exports
Server
get_aop()
Gets the AOP status text.
Returns
| Returns | Type | Description |
|---|---|---|
text | string | The AOP status text. |
Example
set_aop(text)
Sets the AOP status text.
Parameters
| Parameter | Type | Description |
|---|---|---|
text | string | The AOP status text. |
Example
clear_aop()
Clears the AOP status text.
Example
get_peacetime()
Gets whether PeaceTime is active.
Returns
| Returns | Type | Description |
|---|---|---|
active | boolean | Whether PeaceTime is active. |
Example
set_peacetime(active)
Sets whether PeaceTime is active.
Parameters
| Parameter | Type | Description |
|---|---|---|
active | boolean | Whether PeaceTime is active. |
Example
toggle_peacetime()
Toggles the PeaceTime status.
Example
get_priority()
Gets the current priority status.
Returns
| Returns | Type | Description |
|---|---|---|
status | "active" | "cooldown" | "inactive" | "onhold" | The priority status. |
Example
set_priority(status, text)
Sets the current priority status.
Parameters
| Parameter | Type | Description |
|---|---|---|
status | "active" | "cooldown" | "inactive" | "onhold" | The priority status. |
text | string? | The priority status text. Only used for "active" status. |
Examples
get_postal(pos)
Get the nearest postal code of the specified location.
Parameters
| Parameter | Type | Description |
|---|---|---|
pos | vector2 | The position to get the postal code for. |
Returns
| Returns | Type | Description |
|---|---|---|
postal | Postal | The nearest postal. |
Example
Footnotes
- Type definitions that can be used with the Lua extension in VSCode are available on the public GitHub repository.