From a43a0ae3578fddf9a4d5d4e7e86734c5c485b455 Mon Sep 17 00:00:00 2001 From: D00Med Date: Mon, 17 Jul 2017 13:17:05 +1000 Subject: [PATCH] Initial Commit --- depends.txt | 1 + description.txt | 1 + init.lua | 132 +++++++++++++++++++++++++++++++ license.txt | 24 ++++++ screenshot.png | Bin 0 -> 856 bytes screenshot2.png | Bin 0 -> 1449 bytes textures/fruit_orange.png | Bin 0 -> 399 bytes textures/fruit_orange_leaves.png | Bin 0 -> 187 bytes textures/fruit_peach.png | Bin 0 -> 471 bytes textures/fruit_peach_leaves.png | Bin 0 -> 185 bytes textures/fruit_pear.png | Bin 0 -> 428 bytes textures/fruit_pear_leaves.png | Bin 0 -> 234 bytes textures/fruit_plum.png | Bin 0 -> 332 bytes textures/fruit_plum_leaves.png | Bin 0 -> 187 bytes 14 files changed, 158 insertions(+) create mode 100644 depends.txt create mode 100644 description.txt create mode 100644 init.lua create mode 100644 license.txt create mode 100644 screenshot.png create mode 100644 screenshot2.png create mode 100644 textures/fruit_orange.png create mode 100644 textures/fruit_orange_leaves.png create mode 100644 textures/fruit_peach.png create mode 100644 textures/fruit_peach_leaves.png create mode 100644 textures/fruit_pear.png create mode 100644 textures/fruit_pear_leaves.png create mode 100644 textures/fruit_plum.png create mode 100644 textures/fruit_plum_leaves.png diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..331d858 --- /dev/null +++ b/depends.txt @@ -0,0 +1 @@ +default \ No newline at end of file diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..64b9f06 --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +Adds fruit to trees \ No newline at end of file diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..9cfd07d --- /dev/null +++ b/init.lua @@ -0,0 +1,132 @@ + +minetest.register_node("fruit:leaves_with_pear", { + description = "Leaves with Pear", + drawtype = "allfaces", + tiles = { + "default_leaves.png^fruit_pear_leaves.png", + }, + paramtype = "light", + groups = {snappy=1, oddly_breakeable_by_hand=1, not_in_creative_inventory=1}, + drop = "default:leaves", + on_destruct = function(pos) + minetest.add_item(pos, "fruit:pear") + end, + sounds = default.node_sound_leaves_defaults() +}) + +minetest.register_node("fruit:leaves_with_plum", { + description = "Leaves with Plum", + drawtype = "allfaces", + tiles = { + "default_leaves.png^fruit_plum_leaves.png", + }, + paramtype = "light", + groups = {snappy=1, oddly_breakeable_by_hand=1, not_in_creative_inventory=1}, + drop = "default:leaves", + on_destruct = function(pos) + minetest.add_item(pos, "fruit:plum") + end, + sounds = default.node_sound_leaves_defaults() +}) + +minetest.register_node("fruit:leaves_with_peach", { + description = "Leaves with Peach", + drawtype = "allfaces", + tiles = { + "default_leaves.png^fruit_peach_leaves.png", + }, + paramtype = "light", + groups = {snappy=1, oddly_breakeable_by_hand=1, not_in_creative_inventory=1}, + drop = "default:leaves", + on_destruct = function(pos) + minetest.add_item(pos, "fruit:peach") + end, + sounds = default.node_sound_leaves_defaults() +}) + +minetest.register_node("fruit:leaves_with_orange", { + description = "Leaves with Orange", + drawtype = "allfaces", + tiles = { + "default_acacia_leaves.png^fruit_orange_leaves.png", + }, + paramtype = "light", + groups = {snappy=1, oddly_breakeable_by_hand=1, not_in_creative_inventory=1}, + drop = "default:acacia_leaves", + on_destruct = function(pos) + minetest.add_item(pos, "fruit:orange") + end, + sounds = default.node_sound_leaves_defaults() +}) + +minetest.register_craftitem("fruit:pear", { + description = "Pear", + inventory_image = "fruit_pear.png", + on_use = minetest.item_eat(2) +}) + +minetest.register_craftitem("fruit:plum", { + description = "Plum", + inventory_image = "fruit_plum.png", + on_use = minetest.item_eat(1) +}) + +minetest.register_craftitem("fruit:peach", { + description = "Peach", + inventory_image = "fruit_peach.png", + on_use = minetest.item_eat(2) +}) + +minetest.register_craftitem("fruit:orange", { + description = "Orange", + inventory_image = "fruit_orange.png", + on_use = minetest.item_eat(2) +}) + +fruit = {} + +function fruit.register_ores() + minetest.register_ore({ + ore_type = "blob", + ore = "fruit:leaves_with_orange", + wherein = "default:acacia_leaves", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 6, + clust_size = 5, + y_min = 0, + y_max = 31000, + }) + + minetest.register_ore({ + ore_type = "blob", + ore = "fruit:leaves_with_peach", + wherein = "default:leaves", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 6, + clust_size = 5, + y_min = 0, + y_max = 31000, + }) + + minetest.register_ore({ + ore_type = "blob", + ore = "fruit:leaves_with_pear", + wherein = "default:leaves", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 6, + clust_size = 5, + y_min = 0, + y_max = 31000, + }) + + minetest.register_ore({ + ore_type = "blob", + ore = "fruit:leaves_with_plum", + wherein = "default:leaves", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 6, + clust_size = 5, + y_min = 0, + y_max = 31000, + }) +end \ No newline at end of file diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..78cc847 --- /dev/null +++ b/license.txt @@ -0,0 +1,24 @@ + +License for Code +---------------- + +Copyright (C) 2017 D00Med + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +License for Textures, Models and Sounds +--------------------------------------- + +CC-BY-SA 3.0 UNPORTED. Created by D00Med diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..634cbf8bb4ffe045b01dfcfdfd4a9b0f602257fb GIT binary patch literal 856 zcmV-e1E>6nP)r9#@O-e#ayLPiJYbU0$n+|5d z2^+GD7X{fx5#~@26TNtG;z_oPhzP}A*NIGqr!u4<)}ozB+-zCFwOhB@n!tp003`&aaeW)%S=dQC_2Do&L)hfpAJk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&?4{FYlD~``4%#(Gr{w@d6b~QY%9@3?rZtR}!=e)h3XA0Go>Hg4` zs(R5Udd^6H4jtPg?HflVS&_Kv)_Uzv|65n`Ef46;aQ)T3-j`?n&2)c!+3YVPC;(Gj z03bjC3XF$2e)PJpBJD!^rbf|ym(S$dBWCr?q5oJL>sw3h zrP_YVKUkx`&XMxLj0Q-C-`&EySpb;g0ssLDu+I1!ML)9x*ny0U00000NkvXXu0mjf Df%nM! literal 0 HcmV?d00001 diff --git a/textures/fruit_orange.png b/textures/fruit_orange.png new file mode 100644 index 0000000000000000000000000000000000000000..7d7c4d0f3ad846452b59c70df153e2678ccb0502 GIT binary patch literal 399 zcmV;A0dW3_P)J`NycT;y{R!UXUXVpPb3ue2C)S)$++wrH|!iFZyaey6|ArfNL8~-stKROd%DBKO^e{Bw2c?E;Nj0nTuQojHI002ovPDHLkV1n(at<3-c literal 0 HcmV?d00001 diff --git a/textures/fruit_orange_leaves.png b/textures/fruit_orange_leaves.png new file mode 100644 index 0000000000000000000000000000000000000000..2d385ca5a1f05430936e6fbddb29a52e5d7d175d GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP%zii z#WBRthd;UA^8eh%@^|cRlm33TjC}C_c}nAdX7P>|hHVaMO0LG+9Mo>Hns7h4 e*y6&MFJ{>6b65Rm4$!6 zbT)$6TKgZw!ro4?7eufV3j?uO5_b!;=EIP6XM!_3Upuqc+K-9(0iN<4-k0aRyzqad z?(pEn9k<^d5e-wKVZz5(Jvp_(`jcBO9;HOXly}cIYMdp1(JY1Ypg&}6SiDWsks_4&|dIRP8l!LFBWPxdx z!nA~TiEXb?4z|z}jVY*qVd42}nV67l+@nkm(AVeDXD?FhbkS)HaPVRvOAO=+H z9K~iAxsYQ^%g$jy?{JU1ACBczRUX{F;fg4xSZb1l8T}votp6qk_z8V35#@ z^Xrt)vc@}w{y%&(e7~_rO!Xm;P4#gZC;!whRQ+84fN7$@0kIQ4OEQj$op9ORkk)83 cYr+bkU4cPnDPLOnfYvg2y85}Sb4q9e0E$sRUH||9 literal 0 HcmV?d00001 diff --git a/textures/fruit_pear.png b/textures/fruit_pear.png new file mode 100644 index 0000000000000000000000000000000000000000..3db0471dd8cabf6d57bc8b25bfa4f70c5acd0374 GIT binary patch literal 428 zcmV;d0aN~oP)17^s8Ol}2YQmUbk=2B117_M(bSQYp3*!Mr;RSR<2>BGZSwVk?at%BVWqygRX6f%R z&=2Ewh30tQLKZ{o85{y)CTpGRF}hQzkAxRfL54BSTPF9qNKKOa|@00I>WXHS3l zcO|FaE7`{ b7bAm`VRqo3!Q?qu+E^>bP0l+XkKqo-8) literal 0 HcmV?d00001 diff --git a/textures/fruit_plum.png b/textures/fruit_plum.png new file mode 100644 index 0000000000000000000000000000000000000000..7c1b6684d50955316d38cd0b0aa2952dce365ebe GIT binary patch literal 332 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkQ1G9p zi(`nz>Er|n*2N7BFEqaW_4nXa*5ll+^Y(vzpND~mW=+bDs^*Cg|E#^-<02_=H}m8F zuZPd`faLc4`8BPvcji>b3C;bE?oJaEFRinbcs26^Yn=U`Gar5(OlRYDG-R_c4rU9k zbYbP0l+XkK{M3Z; literal 0 HcmV?d00001 diff --git a/textures/fruit_plum_leaves.png b/textures/fruit_plum_leaves.png new file mode 100644 index 0000000000000000000000000000000000000000..be678d6294958b5e8d0d02941f36583dcdda2d1a GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP%zii z#WBRG}=nq$N&i5*!-RN z@Nc*OlAQ`?&iuCTsr~vkxNUX0zQLq7^0}$a|8JdQ`_HZ?z{!}?c*dnGEvM0E3wMUt eiN&0qK*vRRhA&vkS}zK;n8DN4&t;ucLK6TIPeCdG literal 0 HcmV?d00001