diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2015-05-07 23:40:14 -0700 |
---|---|---|
committer | Auke Kok <auke-jan.h.kok@intel.com> | 2015-05-07 23:40:14 -0700 |
commit | 7ba94da27aedf69bb8301455af10f73d992a3f47 (patch) | |
tree | fffbc04b5c8535eafaec2c243453e73536572130 /init.lua | |
parent | bcf27ebd99a3826982fd40da2981f7f459ee5205 (diff) |
Abstract crops.register method a bit.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -101,6 +101,10 @@ local find_plant = function(node) return nil end +crops.register = function(plantdef) + table.insert(crops.plants, plantdef) +end + crops.plant = function(pos, node) minetest.set_node(pos, node) local meta = minetest.get_meta(pos) |