Add price per square meter and cubic meter

Thijs Wiefferink 2017-08-07 11:44:32 +02:00
parent 0382a6d592
commit 6b29c1c898

@ -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.