Created
July 6, 2019 14:45
-
-
Save Plaudenslager/e1075858d71a90ad9edcbd36a21b6059 to your computer and use it in GitHub Desktop.
MapScript/NB example: Tea shop with multi-color costs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cost0 = default 0 usd | |
cost = cost0 + sum(needs.cost) | |
fill = cost > .3 usd ? 'red' : cost > .1 usd ? 'yellow' : 'white' | |
tea: | |
-> hot-water | |
-> leaves | |
stage = 3 | |
hot-water: | |
-> kettle | |
-> water | |
stage = 2 | |
kettle: | |
-> power | |
stage = 3 | |
cost0 = 0.1 usd | |
power: | |
stage = 4 | |
cost0 = 0.01 usd | |
water: | |
stage = 4 | |
cost0 = 0.1 usd | |
leaves: | |
stage = 3 | |
cost0 = 0.5 usd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment