From 282e14cc185e1c2ed264f403326f9b238b815fdb Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 6 Feb 2017 18:29:13 +0100 Subject: [PATCH] Add beetroot items --- mods/mcl_farming/beetroot.lua | 64 ++++++++++-------- mods/mcl_farming/init.lua | 3 +- .../textures/mcl_farming_beetroot.png | Bin 0 -> 705 bytes .../textures/mcl_farming_beetroot_0.png | Bin 0 -> 274 bytes .../textures/mcl_farming_beetroot_1.png | Bin 0 -> 315 bytes .../textures/mcl_farming_beetroot_2.png | Bin 0 -> 448 bytes .../textures/mcl_farming_beetroot_3.png | Bin 0 -> 667 bytes .../textures/mcl_farming_beetroot_seeds.png | Bin 0 -> 14785 bytes .../textures/mcl_farming_beetroot_soup.png | Bin 0 -> 15468 bytes 9 files changed, 37 insertions(+), 30 deletions(-) create mode 100644 mods/mcl_farming/textures/mcl_farming_beetroot.png create mode 100644 mods/mcl_farming/textures/mcl_farming_beetroot_0.png create mode 100644 mods/mcl_farming/textures/mcl_farming_beetroot_1.png create mode 100644 mods/mcl_farming/textures/mcl_farming_beetroot_2.png create mode 100644 mods/mcl_farming/textures/mcl_farming_beetroot_3.png create mode 100644 mods/mcl_farming/textures/mcl_farming_beetroot_seeds.png create mode 100644 mods/mcl_farming/textures/mcl_farming_beetroot_soup.png diff --git a/mods/mcl_farming/beetroot.lua b/mods/mcl_farming/beetroot.lua index 230725ff7..c0eb3db9a 100644 --- a/mods/mcl_farming/beetroot.lua +++ b/mods/mcl_farming/beetroot.lua @@ -4,15 +4,35 @@ minetest.register_craftitem("mcl_farming:beetroot_seeds", { inventory_image = "mcl_farming_beetroot_seeds.png", wield_image = "mcl_farming_beetroot_seeds.png", on_place = function(itemstack, placer, pointed_thing) - return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:beetroot_1") + return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:beetroot_0") end }) +minetest.register_node("mcl_farming:beetroot_0", { + paramtype = "light", + walkable = false, + drawtype = "plantlike", + drop = "", + tiles = {"mcl_farming_beetroot_0.png"}, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.125, 0.5} + }, + }, + groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1}, + sounds = mcl_core.node_sound_leaves_defaults(), +}) + minetest.register_node("mcl_farming:beetroot_1", { paramtype = "light", walkable = false, drawtype = "plantlike", - drop = "", + drop = { + items = { + { items = {"mcl_farming:beetroot_seeds"}, rarity = 5 }, + }, + }, tiles = {"mcl_farming_beetroot_1.png"}, selection_box = { type = "fixed", @@ -20,7 +40,7 @@ minetest.register_node("mcl_farming:beetroot_1", { {-0.5, -0.5, -0.5, 0.5, -0.125, 0.5} }, }, - groups = {snappy=3, not_in_creative_inventory=1,dig_by_water=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1}, sounds = mcl_core.node_sound_leaves_defaults(), }) @@ -28,31 +48,19 @@ minetest.register_node("mcl_farming:beetroot_2", { paramtype = "light", walkable = false, drawtype = "plantlike", - drop = "", - tiles = {"mcl_farming_beetroot_2.png"}, + drop = { + items = { + { items = {"mcl_farming:beetroot_seeds"}, rarity = 4 }, + }, + }, + tiles = {"farming_carrot_2.png"}, selection_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.125, 0.5} }, }, - groups = {snappy=3, not_in_creative_inventory=1,dig_by_water=1}, - sounds = mcl_core.node_sound_leaves_defaults(), -}) - -minetest.register_node("mcl_farming:beetroot_3", { - paramtype = "light", - walkable = false, - drawtype = "plantlike", - drop = "", - tiles = {"farming_carrot_3.png"}, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, -0.125, 0.5} - }, - }, - groups = {snappy=3, not_in_creative_inventory=1,dig_by_water=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1}, sounds = mcl_core.node_sound_leaves_defaults(), }) @@ -64,19 +72,19 @@ minetest.register_node("mcl_farming:beetroot", { max_items = 2, items = { { items = {"mcl_farming:beetroot_item"}, rarity = 1 }, - { items = {"mcl_farming:beetroot_seed 3"}, rarity = 4 }, - { items = {"mcl_farming:beetroot_seed 2"}, rarity = 4 }, - { items = {"mcl_farming:beetroot_seed 1"}, rarity = 4 }, + { items = {"mcl_farming:beetroot_seeds 3"}, rarity = 4 }, + { items = {"mcl_farming:beetroot_seeds 2"}, rarity = 4 }, + { items = {"mcl_farming:beetroot_seeds 1"}, rarity = 4 }, }, }, - tiles = {"mcl_farming_beetroot_4.png"}, + tiles = {"mcl_farming_beetroot_3.png"}, selection_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.125, 0.5} }, }, - groups = {snappy=3, not_in_creative_inventory=1,dig_by_water=1}, + groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1}, sounds = mcl_core.node_sound_leaves_defaults(), }) @@ -106,4 +114,4 @@ minetest.register_craft({ }, }) -mcl_farming:add_plant("mcl_farming:beetroot", {"mcl_farming:beetroot_1", "mcl_farming:beetroot_2", "mcl_farming:beetroot_3", "mcl_farming:beetroot_4"}, 68, 3) +mcl_farming:add_plant("mcl_farming:beetroot", {"mcl_farming:beetroot_0", "mcl_farming:beetroot_1", "mcl_farming:beetroot_2"}, 68, 3) diff --git a/mods/mcl_farming/init.lua b/mods/mcl_farming/init.lua index 10664e844..77f489a8c 100644 --- a/mods/mcl_farming/init.lua +++ b/mods/mcl_farming/init.lua @@ -92,8 +92,7 @@ dofile(minetest.get_modpath("mcl_farming").."/potatoes.lua") dofile(minetest.get_modpath("mcl_farming").."/mushrooms.lua") -- ========= BEETROOT ========= --- TODO: Add beetroot textures ---dofile(minetest.get_modpath("mcl_farming").."/beetroot.lua") +dofile(minetest.get_modpath("mcl_farming").."/beetroot.lua") local time_to_load= os.clock() - init print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load)) diff --git a/mods/mcl_farming/textures/mcl_farming_beetroot.png b/mods/mcl_farming/textures/mcl_farming_beetroot.png new file mode 100644 index 0000000000000000000000000000000000000000..e848a4dbbe19ab48db0ae25f372fa6348708a793 GIT binary patch literal 705 zcmV;y0zUnTP)`ZtgQFrnC+|0wLLJ z?S0Nk&NTrr1nXyZwl@bwRM!DGG22S_Y|v?(S*q=RH1r8K1f_HyfZ#N?O?%UA_r0OiC-2JnHs9(KGG;n8ZFCY*1= zj09FHYH;Lyk;)-U%+ZP6#x|^&ExO>;yr(YzQuQ0(1*d zqHLG*tW`cW443O(*Ai%fvVs3m0s5>GSnZymD8P3vFDwm#q%i_k6j1tGm4-ml7y+jV nXo2LeUq-KF|L3#eUoY?r#FKgsypt9Y00000NkvXXu0mjfchxN` literal 0 HcmV?d00001 diff --git a/mods/mcl_farming/textures/mcl_farming_beetroot_0.png b/mods/mcl_farming/textures/mcl_farming_beetroot_0.png new file mode 100644 index 0000000000000000000000000000000000000000..3e3162ab39283cc1b1ef9a976ab9b6dcc131f576 GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}jKx9jPK-BC>ePc|l0AZa z85pY67#JE_7#MyrFfcT{U|=XUU|@Kaz`$TNgMmT3V9u^U8wLgj&H|6fVg?4jBOuH; zRhv(mfq|jh)5S3);&Aex|Nrd|J20uWF|sY@lPEo~g4s>h;8jB)dyiGZ6-Ky_!$f9@ za<4z~pA-);ypmQ*ZgXe)fAQ#s#I~)Ej;yq9i|eePc|l0AZa z85pY67#JE_7#MyrFfcT{U|=XUU|@Kaz`$TNgMmT3V9u^U8wLgj&H|6fVg?4jBOuH; zRhv(mfq`L*r;B4q#NoFS4f&c4cwBW=!mg~eOgVqp@P@U)bA`Pf2d4&2O0aI?TX9w1 z=*Z81b@vt1mTB`dG9UwcUWfJ4|HTgoI{Q|$y(rO|^*&$Lw{ic?WA{EVI7q$wy7kYO zkjUUwnP2^X`6M&WXgIpm=#20?p7{q^7wp(u8Lgpr*CNNaH-zbe&weM7*b}0ya z{a^L}{i~#c_S+2E!T(?QCSN?U`^BYeA)n72zoe@%XO-1mTZTg*M|isWxvXoz5<{mDA88QD**Sn z#B>^nEtA6%R3J|uzbTOwywY_=OLABa0F{$-Ti3q@?Ky}y;E6!;9smTbjLgXbPy!+V z5HJ01b&``<^N%i_fP005q2#y;jm=j8f)|^u=sGd6u6cC`Vm0HwCUt9yeW#9nIGFeh)p+C^1HjA=B0 z)pCNLEQ5f+?PBTbvW)?#dmz^|KS<)|Ck@qB(vf}k)iP3>FiijjpM}xMFJ|zvjsft7 q)d3c#={j`-lZNbBE7hNCk>(9bvp>mQNzUy60000-qBtfCpyv_%7c;a6O!3w5iAiktR-I?kQ+4Kwk*=S$M!W)^2L z@7_7*mwRV28UXD%rMUnufD7OPxByQ!Bs_RF0PVCA+J*=J6XKr&P+y_2((sz)HcX~_ z;hA}BN@{dg0a972f!j+p?zsv;d7@qlz`~jGdqw9$0CV(z0etwJp@^;i=y#_iZYO(!yHhLe;ZLI$vzoWnwL zQVoE1EdikO!d^qeEIS**)weHZ_{V{l-2LCCzhgeo32o_xDSJJ7@D+OKGk5e#0LS5J zT+W5fa1p>=CWGn0rbpqV_GKN>?$_5a?-d7}1jdE%N&r`j5&Y`u6&hrNQ__IL zi6O*V-xLpU5e{Irt5ax@@^vFrS0${ceO(B?sxBO0q{aghy#Z((H8&!002ovPDHLkV1i@o B8^Hho literal 0 HcmV?d00001 diff --git a/mods/mcl_farming/textures/mcl_farming_beetroot_seeds.png b/mods/mcl_farming/textures/mcl_farming_beetroot_seeds.png new file mode 100644 index 0000000000000000000000000000000000000000..929200da54f291380fd7e2644abf9acae5ceea83 GIT binary patch literal 14785 zcmeI3eQXnD9LJvy9b*Vn1QvmWOE(Az?cH^4*PhqnSO*)SbJ+%zAgv7+eML?JlL1T;xi9rp27&HOJV0?)N&0V|p+O-Rh3I9Ex zq|N#~&-eR#?)$uS|MbPK&ebz&=hXrLW^}Yix&Z)$`KqY~0O-TRznLHS_U&32TTk5OTJd1&LU+i)d9eNch}- z7f;hP(HwNszCe@5x18`$w2!2MBu%*}nxQGiLlHTg;aY+qSWSpC-H}zfa+(kiIg^H= zG9;N!r`_o$x1uFTIv5O+l!x?qT$&Jf=|i%?Wn8k}kTn_ii9ns#MAZ-#nJ|61er3=I zIh|&qJh|tR)O;aX&t=Ce5}Dytl6F&MIg!BUHR_<2vZf~RBuqgG%7#wTZn~^aO)7?> zCzT2%^W7B-XCyTm&DSnFUr8!kS~uFZ8j~ya-XRr|-B4EsH6FHYg|g95?&%FNURa!> zIhZ{a=MFPs1)15Cm04RM3!9Ntrd5NSp=iB|k_u;cS=V@kL~Ex51OYXXDuLF+vF3hAJfEyD03;>7<2ZhCCb=LDAg|NhN2DGI>zsy9{6-|>v%^> zwC*I8({yN_xR7)F$l14l9@aX!49A zxRAhcA%WvU0>^~}jtdDK7ZNxwBye0v;JA>$aUp@@LITHy1da;{92XKeE+lYVNZ`1T zz;Pjg<3a+*g#?ZZ2^<#^I4&e`Tu9)!kic;vf#X5~$Atur3ke(-5|hSNTlnc8l!cHp z?OYMww7snX07rdCq@_1@?#6*{XPl+(+u5}6;?1#|>*pfN_c_)+xbK25aqVN*?4@;c zj~zcqrgzs>J+SM^^{;{LbvK{A;vYQy#FDSI=nvm*0ApvzPA!~rKmX}R^_Pj=>qi<# zcK%eo<bTJP&KCo*M}J=Y?%dT^8>%n8 z@UjoS@90}|oNw`NI&$pL0{;g`znU}p&EA!Oo&WZ2_2NraQ+Ms3ex`3hoBMG6=s%5L zZXNruZ_mk#Rj*II)bXanh^~BVTFdoWhhLd@-VN6Le(jm$uLmE#wda$20{5Po{*Yr` V^{vddr1`_ij<(LoiIrQP`wznZ73BZ` literal 0 HcmV?d00001 diff --git a/mods/mcl_farming/textures/mcl_farming_beetroot_soup.png b/mods/mcl_farming/textures/mcl_farming_beetroot_soup.png new file mode 100644 index 0000000000000000000000000000000000000000..8324ea7a1f83ee02e5a3677fee550f661de8acc0 GIT binary patch literal 15468 zcmeHOTZ|J`7(QKsV3Exl1r0HAQq%z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