From 6b29c1c898f4e3eb261e260f779234a241f9e326 Mon Sep 17 00:00:00 2001 From: Thijs Wiefferink Date: Mon, 7 Aug 2017 11:44:32 +0200 Subject: [PATCH] Add price per square meter and cubic meter --- Frequently-Asked-Questions.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Frequently-Asked-Questions.md b/Frequently-Asked-Questions.md index c0aa06b..de00c7d 100644 --- a/Frequently-Asked-Questions.md +++ b/Frequently-Asked-Questions.md @@ -236,3 +236,18 @@ mallshops: - mall01 - mall02 ``` + +### How can I use a price per square meter (m2) or per block (m3)? +You can set a price using the region variables and complete JavaScript expressions (result of the last statement is used): + +Charge $5 per square meter: +```yaml +price: '5*%width%*%depth%' +``` + +Charge $5 per block: +```yaml +price: '5*%width%*%depth%*%height%' +``` + +You can put this in `default.yml`, a group in `groups.yml` or in a region file. You cannot set a price like this using `/as setprice` for security reasons. \ No newline at end of file