diff options
author | Auke Kok <sofar+github@foo-projects.org> | 2016-04-12 07:46:10 -0700 |
---|---|---|
committer | Auke Kok <sofar+github@foo-projects.org> | 2016-04-12 07:46:10 -0700 |
commit | 65729b9d33fde507a4044b25cd29fba2d8a5eb50 (patch) | |
tree | 22583ea2c366bf30217d3c6e976af046add2afb0 | |
parent | daab8ac9146fe9bfde2a65719b47f8159ae92b3e (diff) | |
parent | 3819bf7b94f6f4be3a25abb167c0457dd96f461a (diff) |
Merge pull request #3 from C1ffisme/master
Make the watering can not lose water in creative
-rw-r--r-- | tools.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -65,7 +65,9 @@ minetest.register_tool("crops:watering_can", { water = math.min(water + crops.settings.watercan, crops.settings.watercan_max) meta:set_int("crops_water", water) - itemstack:set_wear(math.min(65534, wear + (65535 / crops.settings.watercan_uses))) + if not minetest.setting_getbool("creative_mode") then + itemstack:set_wear(math.min(65534, wear + (65535 / crops.settings.watercan_uses))) + end return itemstack end, }) |