From 8a8b5593b743ec1a4bf365d967cd52b578c6ca92 Mon Sep 17 00:00:00 2001 From: Peppy Date: Fri, 16 Mar 2018 22:58:49 +0000 Subject: [PATCH] Add carrots --- depends.txt | 1 + farming.lua | 25 +++++++++++++++++++++++++ init.lua | 1 + textures/farming_carrot.png | Bin 0 -> 356 bytes textures/farming_carrot_1.png | Bin 0 -> 137 bytes textures/farming_carrot_2.png | Bin 0 -> 137 bytes textures/farming_carrot_3.png | Bin 0 -> 196 bytes textures/farming_carrot_4.png | Bin 0 -> 196 bytes textures/farming_carrot_5.png | Bin 0 -> 274 bytes textures/farming_carrot_6.png | Bin 0 -> 274 bytes textures/farming_carrot_7.png | Bin 0 -> 463 bytes textures/farming_carrot_8.png | Bin 0 -> 405 bytes textures/farming_carrot_seed.png | Bin 0 -> 242 bytes 13 files changed, 27 insertions(+) create mode 100644 farming.lua create mode 100644 textures/farming_carrot.png create mode 100644 textures/farming_carrot_1.png create mode 100644 textures/farming_carrot_2.png create mode 100644 textures/farming_carrot_3.png create mode 100644 textures/farming_carrot_4.png create mode 100644 textures/farming_carrot_5.png create mode 100644 textures/farming_carrot_6.png create mode 100644 textures/farming_carrot_7.png create mode 100644 textures/farming_carrot_8.png create mode 100644 textures/farming_carrot_seed.png diff --git a/depends.txt b/depends.txt index 4ad96d5..d77ba25 100644 --- a/depends.txt +++ b/depends.txt @@ -1 +1,2 @@ default +farming diff --git a/farming.lua b/farming.lua new file mode 100644 index 0000000..8cccbd9 --- /dev/null +++ b/farming.lua @@ -0,0 +1,25 @@ +---- Carrotes + +farming.register_plant("farming:carrot", { + description = "Carrot seed", + inventory_image = "farming_carrot_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"grassland"}, + groups = {flammable = 4}, +}) + +minetest.override_item("farming:carrot", { + description = "Carrot", + on_use = minetest.item_eat(2), +}) + +minetest.override_item("default:dry_shrub", {drop = { + max_items = 1, + items = { + {items = {'farming:seed_carrot'},rarity = 8}, + {items = {'default:dry_shrub'}}, + } +}}) + diff --git a/init.lua b/init.lua index ecd01ac..b7fc756 100644 --- a/init.lua +++ b/init.lua @@ -2,5 +2,6 @@ local path = minetest.get_modpath("axinite") dofile(path.."/nodes.lua") dofile(path.."/crafts.lua") dofile(path.."/rollback_check.lua") +dofile(path.."/farming.lua") -- dofile(path.."/chatcommands.lua") -- dofile(path.."/utilities.lua") diff --git a/textures/farming_carrot.png b/textures/farming_carrot.png new file mode 100644 index 0000000000000000000000000000000000000000..ae2addbc3f8056c2bfe83f8d0266a4c10dba5040 GIT binary patch literal 356 zcmV-q0h|7bP)1el8&$dH(>1wXxM>q0mfxevI!F!3u7!Ol&676B!UAO z-pn`_DnTVP*yt(mO-{aZ?uGxB0dRa?6YgNDAMS^wfahI1cXfI_S;Zg)5RSB-Og%D= zAit5Ny1C=7N?-x>dn25+48jmNj>LVLaeKBO0hH?iF&Kvc zbE8-Sz`VSBlHI1#twt#-7T(8$aY)2kf}uWT^C%E?}_KMHyWC7JkOf2TLcopS<;xi+K#0000256Gd3_Vh&aCL z-|=PBIA=e&^JuycNOsMdH9Y_S{Ym`sC2rQo7msfDs8k+Yf8@dc`}gZ5>;C^cf8g}_ tlN+}EHBmmv_#!mn!+pib&-Qkv4D)p~mv!$pm256Gd3_Vh&aCL z-|=PBIA=e&^JuycNOsMdH9Y_S{Ym`sC2rQo7msfDs8k+Yf8@dc`}gZ5>;C^cf8g}_ tlN+}EHBmmv_#!mn!+pib&-Qkv4D)p~mv!$pmYP)Z$lhyx4b;lS9y2348`#%E%1A~2%+W)v_+y4v<3=FXiR>XNHyuu8wFsRh{ ze@34ZoF7tR^q*)iBs5$9|MdPl0|PT7!@vK38DwO{7^W2LVkF8H+5M2v4=gqO@0E>+ z!l)_>(qbj7#^irA0lzchlVoLOW%&2!4_-@H@JW7n_l4p2Z~U&t>w^D`%nZMN{>5tm Y0M-vo`s!Wo%K!iX07*qoM6N<$g7*S`2mk;8 literal 0 HcmV?d00001 diff --git a/textures/farming_carrot_6.png b/textures/farming_carrot_6.png new file mode 100644 index 0000000000000000000000000000000000000000..7eb2070be219ee2a4856e04b5acae3af6b45bda3 GIT binary patch literal 274 zcmV+t0qy>YP)Z$lhyx4b;lS9y2348`#%E%1A~2%+W)v_+y4v<3=FXiR>XNHyuu8wFsRh{ ze@34ZoF7tR^q*)iBs5$9|MdPl0|PT7!@vK38DwO{7^W2LVkF8H+5M2v4=gqO@0E>+ z!l)_>(qbj7#^irA0lzchlVoLOW%&2!4_-@H@JW7n_l4p2Z~U&t>w^D`%nZMN{>5tm Y0M-vo`s!Wo%K!iX07*qoM6N<$g7*S`2mk;8 literal 0 HcmV?d00001 diff --git a/textures/farming_carrot_7.png b/textures/farming_carrot_7.png new file mode 100644 index 0000000000000000000000000000000000000000..f072143249858cdb3420ce5d6d698f6b89f97591 GIT binary patch literal 463 zcmV;=0WkiFP)1R+<0+0bEH$ zK~y-)osvsS0#Ovl|5qJ+)I_vu(W-4hnG=+ZR2D%H3R)Q4m%C`=k7TUn1UCpz)_dI^*f6l!?9rN!w$P?=){MQx^ofJBA=?a%m zT=hY6s9Tq`bR^U2`6vN^H(IU4^xN@t`_2HszbjEDlY`i1LHZ*H0I&#Ves`~8CjgjF zI0*oP2g9^+JwX64w=>9>@7XTP3&bTYF?=yb>q)nEUpXGBg0MfAn2@PdRFTf+(cWr9 zF|XqO^o2F_0#lp41OU^KKAH^oXk8a8qeZU9HJ{<<5R4BI0L(@udPu%907#{B=_Zx4YbQhX68q@#)002ovPDHLk FV1m0~x;Ov; literal 0 HcmV?d00001 diff --git a/textures/farming_carrot_8.png b/textures/farming_carrot_8.png new file mode 100644 index 0000000000000000000000000000000000000000..6eca7271f7c98776f024bfd33aee0daa5c5f86e5 GIT binary patch literal 405 zcmV;G0c!qq82o1-6~wk!{ZHz)MbVhpX-n83nOL{xdKzF!+~Yx`YK? z;K;mtj0_A648c_<|G$3y&cMsZ!SLndcLoLq1_lmRcKo*cmm2*YSVWBqumOx!oSa5JsGV*ktqn_pd(; zU%vfd5a8ir`1Rut!>X=Rj6}tNXP(Y~1_lNOpM3rQZt2=^TjQW!%b(~B7h{4kqH8Sv zGcYhPgqE57-#+OIBLf2i!{^W686;$c;074y!Oh@ncY_@&AlI zCloP1sOyLVK}AOYgG!C@YGA=9`Jeee!_RNO8OSz(m7SS^i<=X#0Ze!eU}a_a_va7! zE+}An!N9=Iz_1*T8k`AZb)F1L;Dt_lf>kX5)fjT?m^F#E00000NkvXXu0mjfWgoke literal 0 HcmV?d00001 diff --git a/textures/farming_carrot_seed.png b/textures/farming_carrot_seed.png new file mode 100644 index 0000000000000000000000000000000000000000..e8d3d5cf0a41fd2480bb64dd53f100524eadb563 GIT binary patch literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPt2OGP*b?wRar9h#2PZ!4!i_^&o5+x6u`#=5vD{1q; zGxU6m-iKdbv)i`c|Cem~qs&sijYWB**_l-v7n(!<~H|1%5pw#@N0kaFEIQ=-F{+viA|**casQ-QtD h>k?JW8hM!+7!+Du7qwS7umhdK;OXk;vd$@?2>>hRSYrSH literal 0 HcmV?d00001