diff --git a/.gitignore b/.gitignore index 9b4291b..ff4f8ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -# Compiled -*.elc +*.el +*~ +*.autosave -# Packaging -.cask diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..29e07c1 --- /dev/null +++ b/depends.txt @@ -0,0 +1,2 @@ +moreflowers +farming diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..039b1c9 --- /dev/null +++ b/init.lua @@ -0,0 +1,44 @@ +-- carrot +minetest.override_item("moreflowers:wild_carrot", + { + drop = { + max_items = 1, + items = { + { items = {"morefarming:seed_carrot"}, rarity = 8}, + { items = {"moreflowers:wild_carrot"}}, + } + }}) + +farming.register_plant("morefarming:carrot", + { + description = "Carrot seed", + paramtype2 = "meshoptions", + inventory_image = "morefarming_carrot_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"grassland"}, + groups = {flammable = 4}, + place_param2 = 3, + }) + +minetest.override_item("morefarming:carrot", + { + on_use = minetest.item_eat(4) + }) + +-- golden carrot +minetest.register_craftitem("morefarming:carrot_gold", { + description = "Golden Carrot", + inventory_image = "morefarming_carrot_gold.png", + on_use = minetest.item_eat(6), +}) + +minetest.register_craft({ + output = "morefarming:carrot_gold", + recipe = { + {"", "default:gold_lump", ""}, + {"default:gold_lump", "morefarming:carrot", "default:gold_lump"}, + {"", "default:gold_lump", ""}, + } +}) diff --git a/textures/morefarming_carrot.png b/textures/morefarming_carrot.png new file mode 100644 index 0000000..3c2da36 Binary files /dev/null and b/textures/morefarming_carrot.png differ diff --git a/textures/morefarming_carrot_1.png b/textures/morefarming_carrot_1.png new file mode 100644 index 0000000..26cbd50 Binary files /dev/null and b/textures/morefarming_carrot_1.png differ diff --git a/textures/morefarming_carrot_2.png b/textures/morefarming_carrot_2.png new file mode 100644 index 0000000..9e829f2 Binary files /dev/null and b/textures/morefarming_carrot_2.png differ diff --git a/textures/morefarming_carrot_3.png b/textures/morefarming_carrot_3.png new file mode 100644 index 0000000..21fed93 Binary files /dev/null and b/textures/morefarming_carrot_3.png differ diff --git a/textures/morefarming_carrot_4.png b/textures/morefarming_carrot_4.png new file mode 100644 index 0000000..17fe723 Binary files /dev/null and b/textures/morefarming_carrot_4.png differ diff --git a/textures/morefarming_carrot_5.png b/textures/morefarming_carrot_5.png new file mode 100644 index 0000000..3e3bc4b Binary files /dev/null and b/textures/morefarming_carrot_5.png differ diff --git a/textures/morefarming_carrot_6.png b/textures/morefarming_carrot_6.png new file mode 100644 index 0000000..471b245 Binary files /dev/null and b/textures/morefarming_carrot_6.png differ diff --git a/textures/morefarming_carrot_7.png b/textures/morefarming_carrot_7.png new file mode 100644 index 0000000..4ad6cf2 Binary files /dev/null and b/textures/morefarming_carrot_7.png differ diff --git a/textures/morefarming_carrot_8.png b/textures/morefarming_carrot_8.png new file mode 100644 index 0000000..7c6a8a7 Binary files /dev/null and b/textures/morefarming_carrot_8.png differ diff --git a/textures/morefarming_carrot_gold.png b/textures/morefarming_carrot_gold.png new file mode 100644 index 0000000..5a2cc91 Binary files /dev/null and b/textures/morefarming_carrot_gold.png differ diff --git a/textures/morefarming_carrot_seed.png b/textures/morefarming_carrot_seed.png new file mode 100644 index 0000000..24eff83 Binary files /dev/null and b/textures/morefarming_carrot_seed.png differ