Factorio Prototype DocsVersion 2.0.24

NoiseFunction :: struct

The advantage of noise functions over noise expressions is that they have parameters.

Properties

parameters :: array[string]

The order of the parameters matters because functions can also be called with positional arguments. [...]

The order of the parameters matters because functions can also be called with positional arguments. [...]

expression :: NoiseExpression
local_expressions optional :: dictionary[string → NoiseExpression]

A map of expression name to expression. [...]

A map of expression name to expression. [...]

local_functions optional :: dictionary[string → NoiseFunction]

A map of function name to function. [...]

A map of function name to function. [...]

Properties

parameters :: array[string]

The order of the parameters matters because functions can also be called with positional arguments.

A function can't have more than 255 parameters.

expression :: NoiseExpression

local_expressions :: dictionary[string → NoiseExpression] optional

A map of expression name to expression.

Local expressions are meant to store data locally similar to local variables in Lua. Their purpose is to hold noise expressions used multiple times in the named noise expression, or just to tell the reader that the local expression has a specific purpose. Local expressions can access other local definitions and also function parameters, but recursive definitions aren't supported.

local_functions :: dictionary[string → NoiseFunction] optional

A map of function name to function.

Local functions serve the same purpose as local expressions - they aren't visible outside of the specific prototype and they have access to other local definitions.

Prototypes

Types

Defines