From c87a169fdd1ff0b6a08407ff2564f52c15def3cf Mon Sep 17 00:00:00 2001 From: Rogier Date: Fri, 20 May 2016 12:33:10 +0200 Subject: [PATCH] Add recipes with dates (and nuts, and coconut) Using a combination of dates, nuts and coconut, an extremely high energy date-nut cake can be baked (32 units of food). It's main purpose is to be a very concentrated transport mechanism of food, but it can be used for instant replenishment of a starving soul. In practise, it will be used to craft date-nut energy bars, which merely have a good nutritional value (4 units). Because of its exceptional nature, the cake requires special ingredients (all three types of nuts, as well as coconuts), and given the ingredients, 3 steps are needed (including one cooking step) to bake it. All of the ingredients themselves, except dates, are not found in nature, but must also be prepared. --- LICENSE | 3 +- crafts.lua | 77 +++++++++++++++++++++++++ depends.txt | 1 + textures/moretrees_date_nut_bar.png | Bin 0 -> 685 bytes textures/moretrees_date_nut_batter.png | Bin 0 -> 608 bytes textures/moretrees_date_nut_cake.png | Bin 0 -> 695 bytes textures/moretrees_date_nut_snack.png | Bin 0 -> 450 bytes 7 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 textures/moretrees_date_nut_bar.png create mode 100644 textures/moretrees_date_nut_batter.png create mode 100644 textures/moretrees_date_nut_cake.png create mode 100644 textures/moretrees_date_nut_snack.png diff --git a/LICENSE b/LICENSE index 7966b3f..b7c0f1f 100644 --- a/LICENSE +++ b/LICENSE @@ -7,10 +7,11 @@ All source code: Date palm code (date_palm.lua) © 2016, Rogier Published under the terms and conditions of the WTFPL. -All date palm textures: +All date & date palm textures and date-based food: © 2016, Rogier Published under the terms and conditions of CC-BY-SA-3.0 Unported. - Three of the date palm textures are modifications of existing moretrees textures + - The date cake batter is a modification of the acorn muffin batter All sapling textures (textures/*_sapling.png): © 2013, Tim Huppertz Published under the terms and conditions of CC-BY-SA-3.0 Unported. diff --git a/crafts.lua b/crafts.lua index 68b556e..9a0982b 100644 --- a/crafts.lua +++ b/crafts.lua @@ -69,6 +69,29 @@ minetest.register_craftitem("moretrees:date", { on_use = minetest.item_eat(1), }) +minetest.register_craftitem("moretrees:date_nut_snack", { + description = S("Date & nut snack"), + inventory_image = "moretrees_date_nut_snack.png", + on_use = minetest.item_eat(4), +}) + +minetest.register_craftitem("moretrees:date_nut_batter", { + description = S("Date-nut cake batter"), + inventory_image = "moretrees_date_nut_batter.png", +}) + +minetest.register_craftitem("moretrees:date_nut_cake", { + description = S("Date-nut cake"), + inventory_image = "moretrees_date_nut_cake.png", + on_use = minetest.item_eat(32), +}) + +minetest.register_craftitem("moretrees:date_nut_bar", { + description = S("Date-nut energy bar"), + inventory_image = "moretrees_date_nut_bar.png", + on_use = minetest.item_eat(4), +}) + minetest.register_craftitem("moretrees:acorn_muffin_batter", { description = S("Acorn Muffin batter"), inventory_image = "moretrees_acorn_muffin_batter.png", @@ -115,6 +138,60 @@ for i in ipairs(moretrees.cutting_tools) do }) end +minetest.register_craft({ + type = "shapeless", + output = "moretrees:date_nut_snack", + recipe = { + "moretrees:date", + "moretrees:date", + "moretrees:date", + "moretrees:spruce_nuts", + "moretrees:cedar_nuts", + "moretrees:fir_nuts", + } +}) + +-- The date-nut cake is an exceptional food item due to its highly +-- concentrated nature (32 food units). Because of that, it requires +-- many different ingredients, and, starting from the base ingredients +-- found or harvested in nature, it requires many steps to prepare. +local flour +if minetest.registered_nodes["farming:flour"] then + flour = "farming:flour" +else + flour = "moretrees:acorn_muffin_batter" +end +minetest.register_craft({ + type = "shapeless", + output = "moretrees:date_nut_batter", + recipe = { + "moretrees:date_nut_snack", + "moretrees:date_nut_snack", + "moretrees:date_nut_snack", + "moretrees:coconut_milk", + "moretrees:date_nut_snack", + "moretrees:raw_coconut", + "moretrees:coconut_milk", + flour, + "moretrees:raw_coconut", + }, + replacements = { + { "moretrees:coconut_milk", "vessels:drinking_glass 2" } + } +}) + +minetest.register_craft({ + type = "cooking", + output = "moretrees:date_nut_cake", + recipe = "moretrees:date_nut_batter", +}) + +minetest.register_craft({ + type = "shapeless", + output = "moretrees:date_nut_bar 8", + recipe = {"moretrees:date_nut_cake"}, +}) + minetest.register_craft({ type = "shapeless", output = "moretrees:acorn_muffin_batter", diff --git a/depends.txt b/depends.txt index 6d36526..7896571 100644 --- a/depends.txt +++ b/depends.txt @@ -4,4 +4,5 @@ vessels stairs? moreblocks? intllib? +farming? diff --git a/textures/moretrees_date_nut_bar.png b/textures/moretrees_date_nut_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..6895001119c39cb84d75942f7fd1f42a0c72c147 GIT binary patch literal 685 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7e6l0AZa85pY67#JE_7#My5g&JNk zFq9fFFuY1&V6d9Oz#v{QXIG#N0|TQ`fKP}kP(iCSLyJ5|n+!v(8Yhr!lV|BvWav<0 zY*gi`mt}9%s$Q!;m7w+OELREXUlh!x=8Y*(}TuBF>t`%Mv8akig3j zDa{IE@G&QdF!&2H0!8BGSSPCUcE~U^sPpfv%;?eP*;SL@rzFs)%U&nV-XPD_Ez6lA z%h@i`8C9)?&! z_E-U)NPfn6ai#_N88IT9u_6o+l6=vkED7SAQM`N!JPdKd457jdNqn3@XDlwxPUhuJ z5oB3dkP#uslPt!W!o!;&&XXd-5+lx%Cd9M2ASa%WF_E7qMT$L%mm!s(FO{DuR)`~6 zfF+)vB}$YdS&T7Bg!BLZ|6Jz+Qh=eRSQ6wH%;0nG%GJwPA>i57E3IrbKbEB~&tD$# z)ivaMs_*t4|7S-56*DGzySt=rz1uM#$l)yTh%9Dc;1&X5#!GkW{s0BpOFVsD*&nb; z3$q!kD)}!33a#*TaSX9Iotz-SdYIq9$Z+$9O&d2C6%-Y2{`BF~#!uV|-rQWA+FF{c zHCAe^)LfaJp_Q4b{jx(rTj1)|%h$~>n44TOzh-V|YJ7eBhAl$QVG4P<$=T`2`HvsG zc=F~^*5haI9==p)ab*dp*W_cck6s z2#3yK*A>yuTcYd_MA+<%v^yScbvn}eXr$HANb7wm4)Y>hx`JKTL^y7aayUA>|8kto zjwt&%;Vz5AotK6?_k_AO2f0j*aP0|k-5qa#D9(0zgzLsgheZ+2^CMjLMcba3-8U=3 z<>0LT-cZ+$5ZAsC*ToUeTO#e(L^@uW-LoRnsW;4Zdbn#>sB2S@OO>xfTd?b@aK|a3 zE{npQ=R~;F2RJtbIPaU;UmxJq8RFI+?7C@c@9c2b)?nAZP}iwpu62Hn(_-9f{2V)i z-7388Cxp7T1i9>*(LX8N_5c6>ODscy0mZ;r666=m;PC858i&EipB@ z{j;UT&K;E%KYy?;sBu(G6bv*hbma8Z>}c51vu4hWJxz-yZQ^oq2=$G14i5B=b`STL zKVoiRVq|7$YP?-w!8EItkxE-)e)%B60Fn`tXq|3A;him$*BG%pGA3ua)K)Hjmmw48kU*@q9$&(C&E|MatlMfl;@<H=O_6Kaz!feK>O8!fMLK8e)977~7CnqQf8yFdG-mvN5&Nni1 zV(!@Nsrkbsuy4VHovll!ZtYz=cSDE91bwx<_YYn?dGqMivv-P$oFWq@ef#q1TjAHQ zpUZhCOl0LcagyE2l9hFLOG{g;wgwaHlqt$eix(v)J$@uC6dK~#wrZui>hdMamM%}p z$Z%S7@zS-6S1(^SH!yM9apuO6D?Kssh71gu7UGt*eo+^JZe#Ft^>bP0l+XkKaqi&t literal 0 HcmV?d00001 diff --git a/textures/moretrees_date_nut_snack.png b/textures/moretrees_date_nut_snack.png new file mode 100644 index 0000000000000000000000000000000000000000..1766dab2558cb1fc02a4a7f18d108f3a052558b7 GIT binary patch literal 450 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7e6l0AZa85pY67#JE_7#My5g&JNk zFq9fFFuY1&V6d9Oz#v{QXIG#NP-1d`Plzj!PLW~ll3{3*VQ5uk>rmzbG8&b+I#sxU z+;9ob5OLNZVFnvL>4nJa0`Jj<`$ah1rZ%mHd|ig|a+d978Nl zzrA42*I*#v5_sSVkJ-%xBkz6x-|jf@&7&iJf0D_hFW--*w62)t$8%Y!tA}y+CY994 zd1^hkBnrAVJ(_cUj}|vObDr|8b@Ip7iS~9go}d4WmEl??w@pdvj>Cm<-x&k{d`qm) Z;MYFQF0m+`=PS@w22WQ%mvv4FO#oVNhrR#+ literal 0 HcmV?d00001