[Genhis] [1.1.68] noise.delimit_procedure doesn't overload operators for the return value

This subforum contains all the issues which we already resolved.
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

[Genhis] [1.1.68] noise.delimit_procedure doesn't overload operators for the return value

Post by mrvn »

In my code I define a noise function using:

Code: Select all

local tne = noise.to_noise_expression
local dist = noise.min(1.0, noise.max(0.0, noise.var("distance") - noise.var("starting_area_radius") / 4) / noise.var("starting_area_radius"))
local elevation = noise.delimit_procedure(name_expression)
...
expression = noise.clamp(elevation + tne(1), 0, 1) - dist - dist * elevation
Why do I get an error when I remove that "tne" in the code: "attempt to perform arithmetic on local 'elevation' (a table value)"?

Shouldn't noise overload the arithmetic operators for that?
Genhis
Factorio Staff
Factorio Staff
Posts: 709
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [Genhis] [1.1.68] noise.delimit_procedure doesn't overload operators for the return value

Post by Genhis »

Thanks, the issue should be fixed for the next release.

Some function return values, including delimit_procedure, didn't have the metatable set.
Post Reply

Return to “Resolved Problems and Bugs”