Factorio Prototype DocsVersion 1.1.107

NoiseLiteralNumber :: struct Example code

Evaluates to the same number every time, given by the literal_value property. All numbers are treated as float internally unless otherwise specified. May be used as a boolean value, evaluates to true for numbers bigger than zero, anything else evaluates to false.

Properties

type :: "literal-number"
literal_value :: float

Properties

type :: "literal-number"

literal_value :: float

Example

local ten =
{
  type = "literal-number",
  literal_value = 10
}

-- or with the noise lib
local noise = require("noise")
local twenty_point_five = noise.to_noise_expression(20.5)

Prototypes

Types