summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2015-05-04 23:00:33 -0700
committerAuke Kok <auke-jan.h.kok@intel.com>2015-05-04 23:00:33 -0700
commit177244f9bb57ce07c226fa257766389ded75922c (patch)
tree0364eac4a4b4275ce77a6f980401f03c71e1fa47 /init.lua
parenta25d61bc7589162fc0beaa7e54de2b08ffaf8efb (diff)
Make the act of growing cost extra water.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index cd65e0c..0880299 100644
--- a/init.lua
+++ b/init.lua
@@ -75,6 +75,8 @@ crops.can_grow = function(pos)
return false
end
end
+ -- growing costs water!
+ meta:set_int("crops_water", math.max(0, water - 10))
-- allow the plant to grow
return true