From af4a0dfa8f0b9f4a0a649aca5bdc658f59cde9f8 Mon Sep 17 00:00:00 2001 From: "A. Demant" Date: Mon, 12 Nov 2018 16:22:51 +0100 Subject: [PATCH] First try --- README.txt | 49 ++ awards.lua | 48 ++ depends.txt | 3 + init.lua | 4 + license.txt | 62 ++ mod.conf | 8 + textures/farming_awards_coffee.png | Bin 0 -> 1664 bytes textures/farming_awards_coffee_gold.png | Bin 0 -> 1781 bytes textures/farming_awards_coffee_silver.png | Bin 0 -> 1713 bytes textures/src/1378982592.svg | 373 ++++++++++++ textures/src/Hot-Cup-Of-Coffee.svg | 698 ++++++++++------------ textures/src/Hot-Cup-Of-Coffee_gold.svg | 307 ++++++++++ textures/src/Hot-Cup-Of-Coffee_silver.svg | 307 ++++++++++ 13 files changed, 1468 insertions(+), 391 deletions(-) create mode 100644 README.txt create mode 100644 awards.lua create mode 100644 depends.txt create mode 100644 init.lua create mode 100644 license.txt create mode 100644 mod.conf create mode 100644 textures/farming_awards_coffee.png create mode 100644 textures/farming_awards_coffee_gold.png create mode 100644 textures/farming_awards_coffee_silver.png create mode 100644 textures/src/1378982592.svg create mode 100644 textures/src/Hot-Cup-Of-Coffee_gold.svg create mode 100644 textures/src/Hot-Cup-Of-Coffee_silver.svg diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..63028d3 --- /dev/null +++ b/README.txt @@ -0,0 +1,49 @@ +Minetest Game mod: farming awards +========================== +See license.txt for license information. + +Mod for extending the farming capabilities of minetest. +You have wild crops, which you can cultivate to get faster and more harvest. +The crops can be infected, where you get nothing. And the infection spreads to nearby crops. +A culture of crops can be destroyed by the infection, where the cultured variant of crops +are easier infected than the wild form. +With special plants (right now nettles) you can make a curing mixture. And other plants can protect the culture. +You should use special devices to get more fruits: +- With a scythe you dig the node and by change get one more harvest. The change is better for a steel scythe than for stone or wood +- With a billhook you punch for example berries to get by change one berry more. +Booth are weared out by each harvest. + +For each crop you can define the count of step. In the last step the crop is full-grown, where the crops can be punchable. +The defined grow time is modified by the amount of light the crop would see and the place: The less light at +the position will be (under a tree for example), the longer the crop needs to reach the next step. + +The code is written to enable extension by other mods. +You have only one txt file to configure the crops. It's read in a table. Not defined fields are filled, +if a default row is given. If no default is given, the field is not importet to the crop. +Based on the definition the behauvior is defined: +- Crops with harvest (Wheat, Barley, Spelt, Nettle, Hemp): The crop has to be digged and drops a harvest, which can not be seeded again. + The seed has to be crafted out of the harvest. If the option "use_flail" is activated, a standard + craft is used: With a flail you get one seed and one straw (default, can be changed by field "straw"). + The seed can be placed again to grow more. + If a cultured variant is given (Wheat), by change you get cultured harvest, which grows faster, has more harvest, + gets easier infected or what ever is defined for the cultured crop. + Most kind of wheat, barley and so on are defined this way. +- Crops with seed: The crop drops directly seed. The amount is given in the configuration by "max_harvest". + Crops like potato or corn are defined in this way. +- Punchable fruits (Berries, Tea, Tobaco, Coffee): Full-grown fruits can be punched to give one fruit and back one step. After the growing + time the fruits are available again. The full-grown can't be digged. It will be punched, directly afterwards + the second last step will be digged, giving one fruit. +- Crops with trellis (Tomatoes, Hop, Grapes): For creating seedable items you have to craft out of the harvest the seed with a trellis. + Digging any step will release the trellis for further usage. By using the option "use_trellis" the craft + is direct registered. +- crops with extractable seed (Tea, Tobaco): The normal harvest are the leaves of the plant, which you can punch out of the box. + To get a seed of the fruit, you have to use a seed picker. The plant goes back one step and need to regrow booth + leaves and seed. + +Authors of source code +---------------------- +ademant (MIT) + +Authors of media (textures) +--------------------------- +Created by ademant (CC BY 3.0): diff --git a/awards.lua b/awards.lua new file mode 100644 index 0000000..c309ad0 --- /dev/null +++ b/awards.lua @@ -0,0 +1,48 @@ +if minetest.get_modpath("awards") then + + awards.register_achievement("farming_coffee", { + title = ("Coffee"), + description = ("You got your first coffee"), + icon = "farming_awards_coffee.png", + trigger = { + type = "eat", + item = "group:coffee", + target = 1 + } + }) + awards.register_achievement("farming_coffee_silver", { + title = ("Coffee Silver"), + description = ("You got your tenth coffee"), + icon = "farming_awards_coffee_silver.png", + requires="farming_coffee", + trigger = { + type = "eat", + item = "group:coffee", + target = 10 + } + }) + + awards.register_achievement("farming_coffee_gold", { + title = ("Coffee Gold"), + description = ("You had 30 coffee"), + icon = "farming_awards_coffee_gold.png", + requires="farming_coffee_silver", + trigger = { + type = "eat", + item = "group:coffee", + target = 30 + } + }) + + awards.register_achievement("farming_cultured_wheat", { + title = ("Cultured Wheat"), + description = ("You got your first cultured wheat"), + icon = "farming_awards_cultured_wheat.png", + trigger = { + type = "dig", + item = "farming:culturedwheat", + target = 1 + } + }) + +end diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..7f5db36 --- /dev/null +++ b/depends.txt @@ -0,0 +1,3 @@ +default +awards +farming diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..8be586f --- /dev/null +++ b/init.lua @@ -0,0 +1,4 @@ +minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- start loading from "..minetest.get_modpath(minetest.get_current_modname())) +-- Load files +dofile(minetest.get_modpath("farming_awards") .. "/awards.lua") --few helping functions +minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- loaded ") diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..f26897d --- /dev/null +++ b/license.txt @@ -0,0 +1,62 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2018- ademant +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 webdesigner97 +Copyright (C) 2012-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +License of media (textures) +--------------------------- + +Attribution 3.0 Unported (CC BY 3.0) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2015-2016 MasterGollum +Copyright (C) 2015-2016 Gambit + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..7d3df5f --- /dev/null +++ b/mod.conf @@ -0,0 +1,8 @@ +name = farming_awards +title = Farming Awards +author = ademant +description = Extends farming awards +optional_depends = intllib +optional_depends = awards,farming +license = MIT +version = 1.0.0 diff --git a/textures/farming_awards_coffee.png b/textures/farming_awards_coffee.png new file mode 100644 index 0000000000000000000000000000000000000000..29c1d78e6cede86e04ac22995fa7408db4bc0c5e GIT binary patch literal 1664 zcmV-`27md9P)Fna?>f_zq-`d&U+1S#}%+1Hf$iu?W($C!9+u!8o$HKwM#KYd;-Q(us+u!2U*3-ef zx~QtBwXmWnU=S*v8<=2zPY%Tk&s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STXoSpY@= literal 0 HcmV?d00001 diff --git a/textures/farming_awards_coffee_gold.png b/textures/farming_awards_coffee_gold.png new file mode 100644 index 0000000000000000000000000000000000000000..4c77d9ae7045f8277c31446846805d1b5ac2e423 GIT binary patch literal 1781 zcmVFnX==<~jK{i;3us5AejGv>2%<)cUEmonv?Jm|-oq_y z(#_1eq=KYm0i~jxn}+EsbL)bW|xE*vf+ z8#FB*VnY(Ve=AH*OB);-4+#g4SqHI-R_4Z^92XHSArweEEkZjn5)KR!6cHL46C)!X zM@dFMJ31gC8XO!J9~&AD5Dg|HA}=TzzOSwUazPJ1{aZ z^uKxk`SJeJo4b=)y1&6#R8q~+)cvbQ{kUBJ`}+O={QS35wt+y}(Zh0daaL1Tkdlx8 z%Zk~~yO^Dyf`Ei^ZEHk8KZ}o&$I2`VHOO|{pWhc+ZSdc}C5+TD z(ixsDiyY-2tZBAeC=ylxB})jPT;ci3sMhjzYc9LdTqf9Rwb7LW7hI#Gle3Gfo4bdn zm$#3vpMOALP;f{n!i+E(bdPX`%kl_A^+rT`02rfZ{pf-y0N{7_GrH6%V?03mY!{m| zcWvIYwr$5wo^oyfe^bu!`Nie-)iowGhs(RfG{KlJ5Q@YSsjQhruIOuGoi$r8uT*Z_NK zra`kU3}OS|X8SlPNQuMxW(HzNAI)dF_n1XF-XHs%`!qeR!cp@c9Lk zBuNxJE2yGXtVjl|wqLUrD79|=h7B8ua>gdc&0CPu!PaeCx9=$3xd8~)6QRFi6XUMk zdyoxS#<+LcntdBLfWZEwj(Gg~_jxfLU^#dQ*?_~0vT6&b9$9%5Xu#35(j^smwD%li zR62g*GkAepz>Ae*>e_FFnDq5)C*Jta%I)vKn|EOEnW)0YM%32Nnc;-H9zmJH_Xp( zL-fK80CY;%2nfUg5Jd-BI|Wp!;Pz1AH0V`ucVAB?WPd+zB`G47sE2^(H?vgrlV1SL zrzSviTtgzUFaef53yG@21Q@T7D*6+Dtt~~vk;QFna?>cqywv9z$SvaYSKtg*JZrl_T$qMx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xvK~~1vS*^*_)eN*7ur| zRzZGc7$#esb-?NLHJ5vO`gbS-#A$DW?!uMM(*uJ;m46MBYTNDhVPrD^I^Ohsv#qCR z6jQ2kx9on=Ub}lMI9+=!;l$XFajJ>2-VxpH006wJrhD}oQKx!(PALPEI)tp_)P;F} zYST`~XE(Y|pFVx##_r37*LRvrW~IOmWq{azTLw&TleBLQQ*H7skT%mR1GZ@f8hZAq z0>rF3u$~c^Yh9}b5bB#S&j|D^U}`DuL`nCV=DS^832qi)#JGG{8~(tup|Z6GS0ILFQvdT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + Cup + 2013-09-12T10:43:12 + trophy cup + https://openclipart.org/detail/183387/cup-by-special_k-183387 + + + Special_K + + + + + cup + prize + trophy + win + winner + + + + + + + + + + + diff --git a/textures/src/Hot-Cup-Of-Coffee.svg b/textures/src/Hot-Cup-Of-Coffee.svg index db957ff..2f53a4c 100644 --- a/textures/src/Hot-Cup-Of-Coffee.svg +++ b/textures/src/Hot-Cup-Of-Coffee.svg @@ -1,391 +1,307 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/textures/src/Hot-Cup-Of-Coffee_gold.svg b/textures/src/Hot-Cup-Of-Coffee_gold.svg new file mode 100644 index 0000000..7fba0aa --- /dev/null +++ b/textures/src/Hot-Cup-Of-Coffee_gold.svg @@ -0,0 +1,307 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/textures/src/Hot-Cup-Of-Coffee_silver.svg b/textures/src/Hot-Cup-Of-Coffee_silver.svg new file mode 100644 index 0000000..fbe42c1 --- /dev/null +++ b/textures/src/Hot-Cup-Of-Coffee_silver.svg @@ -0,0 +1,307 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file