From 045d0cb36aad44c01599bec8bc0adba6d19e1df5 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Mon, 10 May 2021 21:34:25 +0300 Subject: [PATCH] Updated Resources: spread functions (markdown) --- Resources:-spread-functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources:-spread-functions.md b/Resources:-spread-functions.md index 5bbdb3b..6da134a 100644 --- a/Resources:-spread-functions.md +++ b/Resources:-spread-functions.md @@ -3,7 +3,7 @@ Resource **spread models** are applied to check whether resource can or cannot be placed in a cell. Fantasy Map Generator allows to create custom spread models, but it requires some understanding on how models work. # Technical info -Technically spread models are functional expressions evaluated for each cell to return `true` or `false`. If `true` is returned, the resource can be placed in the cell. The expressions are valid JS, you can use logical operators (`!` for not, `||` for OR, `&&` for and, etc.) and other features. +Technically spread models are expressions evaluated for each cell to return `true` or `false`. If `true` is returned, the resource can be placed in the cell. The expressions are valid JS functions, you can use logical operators (`!` for not, `||` for OR, `&&` for and, etc.) and other features. However the function is limited to a number of build-in functions. These functions make models syntax easier to read and write: * `random(number)`: percentage of true, e.g. `50` will return true in 50% of cases