diff --git a/barley.lua b/barley.lua index d69b0ba..b7bf530 100644 --- a/barley.lua +++ b/barley.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- barley seeds minetest.register_node("farming:seed_barley", { - description = "Barley Seed", + description = S("Barley Seed"), tiles = {"farming_barley_seed.png"}, inventory_image = "farming_barley_seed.png", wield_image = "farming_barley_seed.png", @@ -19,7 +21,7 @@ minetest.register_node("farming:seed_barley", { -- harvested barley minetest.register_craftitem("farming:barley", { - description = "barley", + description = S("Barley"), inventory_image = "farming_barley.png", }) diff --git a/beanpole.lua b/beanpole.lua index cda736f..cef2767 100644 --- a/beanpole.lua +++ b/beanpole.lua @@ -4,9 +4,11 @@ CC-BY-SA-3.0 ]] +local S = farming.intllib + -- beans minetest.register_craftitem("farming:beans", { - description = "Green Beans", + description = S("Green Beans"), inventory_image = "farming_beans.png", on_use = minetest.item_eat(1), @@ -56,7 +58,7 @@ minetest.register_craft({ -- beanpole minetest.register_node("farming:beanpole", { - description = "Bean Pole (place on soil before planting beans)", + description = S("Bean Pole (place on soil before planting beans)"), drawtype = "plantlike", tiles = {"farming_beanpole.png"}, inventory_image = "farming_beanpole.png", diff --git a/blueberry.lua b/blueberry.lua index 6a29ba9..82ce7ff 100644 --- a/blueberry.lua +++ b/blueberry.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- blueberries minetest.register_craftitem("farming:blueberries", { - description = "Blueberries", + description = S("Blueberries"), inventory_image = "farming_blueberries.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1") @@ -12,7 +14,7 @@ minetest.register_craftitem("farming:blueberries", { -- blueberry muffin (thanks to sosogirl123 @ deviantart.com for muffin image) minetest.register_craftitem("farming:muffin_blueberry", { - description = "Blueberry Muffin", + description = S("Blueberry Muffin"), inventory_image = "farming_blueberry_muffin.png", on_use = minetest.item_eat(2), }) diff --git a/carrot.lua b/carrot.lua index 90c1b91..95ecfa8 100644 --- a/carrot.lua +++ b/carrot.lua @@ -4,8 +4,10 @@ https://forum.minetest.net/viewtopic.php?id=4990 ]] +local S = farming.intllib + minetest.register_craftitem("farming:carrot_seed", { - description = "Carrot Seeds", + description = S("Carrot Seeds"), inventory_image = "farming_carrot_seed.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1") @@ -14,7 +16,7 @@ minetest.register_craftitem("farming:carrot_seed", { -- carrot minetest.register_craftitem("farming:carrot", { - description = "Carrot", + description = S("Carrot"), inventory_image = "farming_carrot.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1") @@ -24,7 +26,7 @@ minetest.register_craftitem("farming:carrot", { -- golden carrot minetest.register_craftitem("farming:carrot_gold", { - description = "Golden Carrot", + description = S("Golden Carrot"), inventory_image = "farming_carrot_gold.png", on_use = minetest.item_eat(6), }) diff --git a/cocoa.lua b/cocoa.lua index a11a611..29cc96b 100644 --- a/cocoa.lua +++ b/cocoa.lua @@ -1,4 +1,6 @@ +local S = farming.intllib + -- place cocoa function place_cocoa(itemstack, placer, pointed_thing, plantname) @@ -48,7 +50,7 @@ end -- cocoa beans minetest.register_craftitem("farming:cocoa_beans", { - description = "Cocoa Beans", + description = S("Cocoa Beans"), inventory_image = "farming_cocoa_beans.png", on_place = function(itemstack, placer, pointed_thing) return place_cocoa(itemstack, placer, pointed_thing, "farming:cocoa_1") @@ -64,7 +66,7 @@ minetest.register_craft( { -- chocolate cookie minetest.register_craftitem("farming:cookie", { - description = "Cookie", + description = S("Cookie"), inventory_image = "farming_cookie.png", on_use = minetest.item_eat(2), }) @@ -78,7 +80,7 @@ minetest.register_craft( { -- bar of dark chocolate (thanks to Ice Pandora for her deviantart.com chocolate tutorial) minetest.register_craftitem("farming:chocolate_dark", { - description = "Bar of Dark Chocolate", + description = S("Bar of Dark Chocolate"), inventory_image = "farming_chocolate_dark.png", on_use = minetest.item_eat(3), }) @@ -135,38 +137,46 @@ crop_def.drop = { } minetest.register_node("farming:cocoa_3", table.copy(crop_def)) --- add random cocoa pods to jungle tree trunks -minetest.register_abm({ - nodenames = {"default:jungletree"}, - neighbors = {"default:jungleleaves", "moretrees:jungletree_leaves_green"}, - interval = 8, - chance = 80, - catch_up = false, - action = function(pos, node) +-- add random cocoa pods to jungle tree's +minetest.register_on_generated(function(minp, maxp) - local dir = math.random(1, 50) + if maxp.y < 0 then + return + end + + local pos, dir + local cocoa = minetest.find_nodes_in_area(minp, maxp, "default:jungletree") + + for n = 1, #cocoa do + + pos = cocoa[n] + + if minetest.find_node_near(pos, 1, + {"default:jungleleaves", "moretrees:jungletree_leaves_green"}) then + + dir = math.random(1, 80) + + if dir == 1 then + pos.x = pos.x + 1 + elseif dir == 2 then + pos.x = pos.x - 1 + elseif dir == 3 then + pos.z = pos.z + 1 + elseif dir == 4 then + pos.z = pos.z -1 + end + + if dir < 5 + and minetest.get_node(pos).name == "air" + and minetest.get_node_light(pos) > 12 then + + --print ("Cocoa Pod added at " .. minetest.pos_to_string(pos)) + + minetest.swap_node(pos, { + name = "farming:cocoa_" .. tostring(math.random(1, 3)) + }) + end - if dir == 1 then - pos.x = pos.x + 1 - elseif dir == 2 then - pos.x = pos.x - 1 - elseif dir == 3 then - pos.z = pos.z + 1 - elseif dir == 4 then - pos.z = pos.z -1 - else return end - - local nodename = minetest.get_node(pos).name - - if nodename == "air" - and minetest.get_node_light(pos) > 12 then - - --print ("Cocoa Pod added at " .. minetest.pos_to_string(pos)) - - minetest.set_node(pos, { - name = "farming:cocoa_" .. tostring(math.random(1, 3)) - }) - end - end, -}) + end +end) diff --git a/coffee.lua b/coffee.lua index c9854e6..f9632d2 100644 --- a/coffee.lua +++ b/coffee.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- coffee minetest.register_craftitem("farming:coffee_beans", { - description = "Coffee Beans", + description = S("Coffee Beans"), inventory_image = "farming_coffee_beans.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:coffee_1") @@ -11,7 +13,7 @@ minetest.register_craftitem("farming:coffee_beans", { -- drinking cup minetest.register_node("farming:drinking_cup", { - description = "Drinking Cup (empty)", + description = S("Drinking Cup (empty)"), drawtype = "plantlike", tiles = {"vessels_drinking_cup.png"}, inventory_image = "vessels_drinking_cup.png", @@ -36,7 +38,7 @@ minetest.register_craft( { -- cold cup of coffee minetest.register_node("farming:coffee_cup", { - description = "Cold Cup of Coffee", + description = S("Cold Cup of Coffee"), drawtype = "plantlike", tiles = {"farming_coffee_cup.png"}, inventory_image = "farming_coffee_cup.png", @@ -69,7 +71,7 @@ minetest.register_craft({ -- hot cup of coffee minetest.register_node("farming:coffee_cup_hot", { - description = "Hot Cup of Coffee", + description = S("Hot Cup of Coffee"), drawtype = "plantlike", tiles = {"farming_coffee_cup_hot.png"}, inventory_image = "farming_coffee_cup_hot.png", diff --git a/corn.lua b/corn.lua index 4370757..f178a48 100644 --- a/corn.lua +++ b/corn.lua @@ -4,9 +4,11 @@ http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1440575-1-2-5-generation-minecraft-beta-1-2-farming-and ]] +local S = farming.intllib + -- corn minetest.register_craftitem("farming:corn", { - description = "Corn", + description = S("Corn"), inventory_image = "farming_corn.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:corn_1") @@ -16,7 +18,7 @@ minetest.register_craftitem("farming:corn", { -- corn on the cob (texture by TenPlus1) minetest.register_craftitem("farming:corn_cob", { - description = "Corn on the Cob", + description = S("Corn on the Cob"), inventory_image = "farming_corn_cob.png", on_use = minetest.item_eat(5), }) @@ -30,7 +32,7 @@ minetest.register_craft({ -- ethanol (thanks to JKMurray for this idea) minetest.register_craftitem("farming:bottle_ethanol", { - description = "Bottle of Ethanol", + description = S("Bottle of Ethanol"), inventory_image = "farming_bottle_ethanol.png", }) diff --git a/cotton.lua b/cotton.lua index 2ddf88e..eef6425 100644 --- a/cotton.lua +++ b/cotton.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- cotton seeds minetest.register_node("farming:seed_cotton", { - description = "Cotton Seed", + description = S("Cotton Seed"), tiles = {"farming_cotton_seed.png"}, inventory_image = "farming_cotton_seed.png", wield_image = "farming_cotton_seed.png", @@ -20,7 +22,7 @@ minetest.register_node("farming:seed_cotton", { -- cotton / string minetest.register_craftitem("farming:cotton", { - description = "Cotton", + description = S("Cotton"), inventory_image = "farming_cotton.png", }) @@ -112,3 +114,10 @@ crop_def.drop = { } } minetest.register_node("farming:cotton_8", table.copy(crop_def)) + +--[[ Cotton (example, is already registered in cotton.lua) +farming.register_plant("farming:cotton", { + description = "Cotton seed", + inventory_image = "farming_cotton_seed.png", + steps = 8, +})]] diff --git a/cucumber.lua b/cucumber.lua index 22e367b..8e29215 100644 --- a/cucumber.lua +++ b/cucumber.lua @@ -4,9 +4,11 @@ https://forum.minetest.net/viewtopic.php?id=3948 ]] +local S = farming.intllib + -- cucumber minetest.register_craftitem("farming:cucumber", { - description = "Cucumber", + description = S("Cucumber"), inventory_image = "farming_cucumber.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:cucumber_1") diff --git a/depends.txt b/depends.txt index be420a3..8c4c21f 100644 --- a/depends.txt +++ b/depends.txt @@ -1,2 +1,3 @@ default -wool \ No newline at end of file +wool +intllib? diff --git a/donut.lua b/donut.lua index 1b49848..68aeb8e 100644 --- a/donut.lua +++ b/donut.lua @@ -1,6 +1,9 @@ + +local S = farming.intllib + -- Donut (thanks to Bockwurst for making the donut images) minetest.register_craftitem("farming:donut", { - description = "Donut", + description = S("Donut"), inventory_image = "farming_donut.png", on_use = minetest.item_eat(4), }) @@ -16,7 +19,7 @@ minetest.register_craft({ -- Chocolate Donut minetest.register_craftitem("farming:donut_chocolate", { - description = "Chocolate Donut", + description = S("Chocolate Donut"), inventory_image = "farming_donut_chocolate.png", on_use = minetest.item_eat(6), }) @@ -31,7 +34,7 @@ minetest.register_craft({ -- Apple Donut minetest.register_craftitem("farming:donut_apple", { - description = "Apple Donut", + description = S("Apple Donut"), inventory_image = "farming_donut_apple.png", on_use = minetest.item_eat(6), }) @@ -42,4 +45,4 @@ minetest.register_craft({ {'default:apple'}, {'farming:donut'}, } -}) \ No newline at end of file +}) diff --git a/grapes.lua b/grapes.lua index 9c93016..7a3bfc5 100644 --- a/grapes.lua +++ b/grapes.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- grapes minetest.register_craftitem("farming:grapes", { - description = "Grapes", + description = S("Grapes"), inventory_image = "farming_grapes.png", on_use = minetest.item_eat(2), @@ -51,7 +53,7 @@ minetest.register_craft({ -- trellis minetest.register_node("farming:trellis", { - description = "Trellis (place on soil before planting grapes)", + description = S("Trellis (place on soil before planting grapes)"), drawtype = "plantlike", tiles = {"farming_trellis.png"}, inventory_image = "farming_trellis.png", diff --git a/hoes.lua b/hoes.lua index ef27d42..dab2ac9 100644 --- a/hoes.lua +++ b/hoes.lua @@ -1,4 +1,6 @@ +local S = farming.intllib + -- Hoe registration function farming.register_hoe = function(name, def) @@ -109,42 +111,42 @@ end -- Define Hoes farming.register_hoe(":farming:hoe_wood", { - description = "Wooden Hoe", + description = S("Wooden Hoe"), inventory_image = "farming_tool_woodhoe.png", max_uses = 30, material = "group:wood" }) farming.register_hoe(":farming:hoe_stone", { - description = "Stone Hoe", + description = S("Stone Hoe"), inventory_image = "farming_tool_stonehoe.png", max_uses = 90, material = "group:stone" }) farming.register_hoe(":farming:hoe_steel", { - description = "Steel Hoe", + description = S("Steel Hoe"), inventory_image = "farming_tool_steelhoe.png", max_uses = 200, material = "default:steel_ingot" }) farming.register_hoe(":farming:hoe_bronze", { - description = "Bronze Hoe", + description = S("Bronze Hoe"), inventory_image = "farming_tool_bronzehoe.png", max_uses = 220, material = "default:bronze_ingot" }) farming.register_hoe(":farming:hoe_mese", { - description = "Mese Hoe", + description = S("Mese Hoe"), inventory_image = "farming_tool_mesehoe.png", max_uses = 350, material = "default:mese_crystal" }) farming.register_hoe(":farming:hoe_diamond", { - description = "Diamond Hoe", + description = S("Diamond Hoe"), inventory_image = "farming_tool_diamondhoe.png", max_uses = 500, material = "default:diamond" diff --git a/init.lua b/init.lua index 29cf5b7..db1a804 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,5 @@ --[[ - Minetest Farming Redo Mod 1.22 (31st March 2016) + Minetest Farming Redo Mod 1.22 (4th June 2016) by TenPlus1 NEW growing routine by prestidigitator auto-refill by crabman77 @@ -49,33 +49,15 @@ end local statistics = dofile(farming.path.."/statistics.lua") -dofile(farming.path.."/soil.lua") -dofile(farming.path.."/banana.lua") -dofile(farming.path.."/hoes.lua") -dofile(farming.path.."/grass.lua") -dofile(farming.path.."/wheat.lua") -dofile(farming.path.."/cotton.lua") -dofile(farming.path.."/carrot.lua") -dofile(farming.path.."/potato.lua") -dofile(farming.path.."/tomato.lua") -dofile(farming.path.."/cucumber.lua") -dofile(farming.path.."/corn.lua") -dofile(farming.path.."/coffee.lua") -dofile(farming.path.."/melon.lua") -dofile(farming.path.."/sugar.lua") -dofile(farming.path.."/pumpkin.lua") -dofile(farming.path.."/cocoa.lua") -dofile(farming.path.."/raspberry.lua") -dofile(farming.path.."/strawberry.lua") -dofile(farming.path.."/blueberry.lua") -dofile(farming.path.."/rhubarb.lua") -dofile(farming.path.."/beanpole.lua") -dofile(farming.path.."/grapes.lua") -dofile(farming.path.."/barley.lua") -dofile(farming.path.."/oranges.lua") -dofile(farming.path.."/donut.lua") -dofile(farming.path.."/mapgen.lua") -dofile(farming.path.."/compatibility.lua") -- Farming Plus compatibility +-- Intllib + +local S +if minetest.get_modpath("intllib") then + S = intllib.Getter() +else + S = function(s) return s end +end +farming.intllib = S -- Utility Functions @@ -519,15 +501,15 @@ function farming.plant_growth_timer(pos, elapsed, node_name) return true end else - local under = minetest.get_node_or_nil({ x = pos.x, y = pos.y - 1, z = pos.z }) + local under = minetest.get_node({ x = pos.x, y = pos.y - 1, z = pos.z }) - if not under or under.name ~= "farming:soil_wet" then + if minetest.get_item_group(under.name, "soil") < 3 then return true end end local growth - local light_pos = {x = pos.x, y = pos.y, z = pos.z} + local light_pos = {x = pos.x, y = pos.y + 1, z = pos.z} local lambda = elapsed / STAGE_LENGTH_AVG if lambda < 0.1 then @@ -616,6 +598,7 @@ local can_refill_plant = { ["farming:rhubarb_1"] = "farming:rhubarb", ["farming:cocoa_1"] = "farming:cocoa_beans", ["farming:orange_1"] = "farming:orange_item", + ["farming:barley_1"] = "farming:seed_barley", } function farming.refill_plant(player, plantname, index) @@ -717,7 +700,7 @@ farming.register_plant = function(name, def) -- Check def table if not def.description then - def.description = "Seed" + def.description = S("Seed") end if not def.inventory_image then @@ -770,7 +753,7 @@ farming.register_plant = function(name, def) -- Last step doesn't need growing=1 so Abm never has to check these if i == def.steps then - g = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1} + g.growing = 0 end local node_name = mname .. ":" .. pname .. "_" .. i @@ -788,7 +771,7 @@ farming.register_plant = function(name, def) sounds = default.node_sound_leaves_defaults(), }) - register_plant_node(node_name) +-- register_plant_node(node_name) end -- Return info @@ -796,9 +779,33 @@ farming.register_plant = function(name, def) return r end ---[[ Cotton (example, is already registered in cotton.lua) -farming.register_plant("farming:cotton", { - description = "Cotton2 seed", - inventory_image = "farming_cotton_seed.png", - steps = 8, -})]] +-- load crops + +dofile(farming.path.."/soil.lua") +dofile(farming.path.."/banana.lua") +dofile(farming.path.."/hoes.lua") +dofile(farming.path.."/grass.lua") +dofile(farming.path.."/wheat.lua") +dofile(farming.path.."/cotton.lua") +dofile(farming.path.."/carrot.lua") +dofile(farming.path.."/potato.lua") +dofile(farming.path.."/tomato.lua") +dofile(farming.path.."/cucumber.lua") +dofile(farming.path.."/corn.lua") +dofile(farming.path.."/coffee.lua") +dofile(farming.path.."/melon.lua") +dofile(farming.path.."/sugar.lua") +dofile(farming.path.."/pumpkin.lua") +dofile(farming.path.."/cocoa.lua") +dofile(farming.path.."/raspberry.lua") +dofile(farming.path.."/strawberry.lua") +dofile(farming.path.."/blueberry.lua") +dofile(farming.path.."/rhubarb.lua") +dofile(farming.path.."/beanpole.lua") +dofile(farming.path.."/grapes.lua") +dofile(farming.path.."/barley.lua") +dofile(farming.path.."/oranges.lua") +dofile(farming.path.."/donut.lua") +dofile(farming.path.."/mapgen.lua") +dofile(farming.path.."/compatibility.lua") -- Farming Plus compatibility + diff --git a/license.txt b/license.txt index 5d30c14..fec6f6a 100644 --- a/license.txt +++ b/license.txt @@ -1,14 +1,21 @@ +The MIT License (MIT) - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 +Copyright (c) 2016 TenPlus1 - Copyright (C) 2004 Sam Hocevar +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: - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. \ No newline at end of file +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. diff --git a/locale/de.txt b/locale/de.txt new file mode 100644 index 0000000..009b880 --- /dev/null +++ b/locale/de.txt @@ -0,0 +1,110 @@ +# German Translation for farming mod +# Deutsche Übersetzung der farming Mod +# last update: 2016/March/31 +# Author: Xanthin + +#init.lua +Seed = Saatgut + +#barley.lua +Barley Seed = Gerstenkörner +Barley = Gerste + +#beanpole.lua +Green Beans = Grüne Bohnen +Bean Pole (place on soil before planting beans) = Bohnenstange (vor dem Pflanzen der Bohnen auf den\nAckerboden stellen) + +#blueberry.lua +Blueberries = Blaubeeren +Blueberry Muffin = Blaubeermuffin + +#carrot.lua +Carrot = Möhre +Golden Carrot = Goldene Möhre +Carrot Seeds = Möhren Samen + +#cocoa.lua +Cocoa Beans = Kakaobohne +Cookie = Keks +Bar of Dark Chocolate = Tafel Zartbitterschokolade + +#coffee.lua +Coffee Beans = Kaffeebohnen +Drinking Cup (empty) = Tasse (leer) +Cold Cup of Coffee = Kalte Tasse Kaffee +Hot Cup of Coffee = Heiße Tasse Kaffee + +#corn.lua +Corn = Mais +Corn on the Cob = Maiskolben +Bottle of Ethanol = Flasche Ethanol + +#cotton.lua +Cotton Seed = Baumwollsamen +Cotton = Baumwolle + +#cucumber.lua +Cucumber = Gurke + +#donut.lua +Donut = Donut +Chocolate Donut = Schokodonut +Apple Donut = Apfeldonut + +#grapes.lua +Grapes = Weintrauben +Trellis (place on soil before planting grapes) = Spalier (vor dem Pflanzen der Weintrauben auf den\nAckerboden stellen) + +#hoes.lua +Hoe = Hacke +Wooden Hoe = Holzhacke +Stone Hoe = Steinhacke +Steel Hoe = Stahlhacke +Bronze Hoe = Bronzehacke +Mese Hoe = Mesehacke +Diamond Hoe = Diamanthacke + +#melon.lua +Melon Slice = Melonenscheibe +Melon = Melone + +#potato.lua +Potato = Kartoffel +Baked Potato = Ofenkartoffel +Potato Seeds = Kartoffel Samen + +#pumpkin.lua +Pumpkin = Kürbis +Pumpkin Slice = Kürbisscheibe +Jack 'O Lantern = Kürbislaterne +Pumpkin Bread = Kürbisbrot +Pumpkin Dough = Kürbisteig +Pumpkin Seeds = Kürbis Samen + +#rasperry.lua +Raspberries = Himbeeren +Raspberry Smoothie = Himbeersmoothie +Raspberry Seeds = Himbeer Samen + +#rhubarb.lua +Rhubarb = Rhabarber +Rhubarb Pie = Rhabarberkuchen +Rhubarb Seeds = Rihabarber Samen + +#soil.lua +Soil = Ackerboden +Wet Soil = Bewässerter Ackerboden + +#sugar.lua +Sugar = Zucker + +#tomato.lua +Tomato = Tomate +Tomato Seeds = Tomaten Samen + +#wheat.lua +Wheat Seed = Weizenkörner +Wheat = Weizen +Straw = Stroh +Flour = Mehl +Bread = Brot diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..6d067f5 --- /dev/null +++ b/locale/template.txt @@ -0,0 +1,102 @@ +# Template for translations of farming mod +# last update: 2016/March/31 + +#init.lua +Seed = + +#barley.lua +Barley Seed = +Barley = + +#beanpole.lua +Green Beans = +Bean Pole (place on soil before planting beans) = + +#blueberry.lua +Blueberries = +Blueberry Muffin = + +#carrot.lua +Carrot = +Golden Carrot = + +#cocoa.lua +Cocoa Beans = +Cookie = +Bar of Dark Chocolate = + +#coffee.lua +Coffee Beans = +Drinking Cup (empty) = +Cold Cup of Coffee = +Hot Cup of Coffee = + +#corn.lua +Corn = +Corn on the Cob = +Bottle of Ethanol = + +#cotton.lua +Cotton Seed = +Cotton = + +#cucumber.lua +Cucumber = + +#donut.lua +Donut = +Chocolate Donut = +Apple Donut = + +#grapes.lua +Grapes = +Trellis (place on soil before planting grapes) = + +#hoes.lua +Hoe = +Wooden Hoe = +Stone Hoe = +Steel Hoe = +Bronze Hoe = +Mese Hoe = +Diamond Hoe = + +#melon.lua +Melon Slice = +Melon = + +#potato.lua +Potato = +Baked Potato = + +#pumpkin.lua +Pumpkin = +Pumpkin Slice = +Jack 'O Lantern = +Pumpkin Bread = +Pumpkin Dough = + +#rasperry.lua +Raspberries = +Raspberry Smoothie = + +#rhubarb.lua +Rhubarb = +Rhubarb Pie = + +#soil.lua +Soil = +Wet Soil = + +#sugar.lua +Sugar = + +#tomato.lua +Tomato = + +#wheat.lua +Wheat Seed = +Wheat = +Straw = +Flour = +Bread = \ No newline at end of file diff --git a/mapgen.lua b/mapgen.lua index 1cb46ca..1ac6da3 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -58,8 +58,8 @@ function farming.register_mgv7_decorations() end -- detect mapgen -if minetest.get_mapgen_params().mgname == "v6" then - farming.register_mgv6_decorations() +if minetest.get_mapgen_setting("mg_name") == "v6" then + farming.register_mgv6_decorations() ; print ("v6") else - farming.register_mgv7_decorations() + farming.register_mgv7_decorations() ; print ("v7") end diff --git a/melon.lua b/melon.lua index fb59e7b..a737ca0 100644 --- a/melon.lua +++ b/melon.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- melon minetest.register_craftitem("farming:melon_slice", { - description = "Melon Slice", + description = S("Melon Slice"), inventory_image = "farming_melon_slice.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1") @@ -71,7 +73,7 @@ minetest.register_node("farming:melon_7", table.copy(crop_def)) -- stage 8 (final) crop_def.drawtype = "nodebox" -crop_def.description = "Melon" +crop_def.description = S("Melon") crop_def.tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png"} crop_def.selection_box = {-.5, -.5, -.5, .5, .5, .5} crop_def.walkable = true diff --git a/potato.lua b/potato.lua index fa95442..d051476 100644 --- a/potato.lua +++ b/potato.lua @@ -4,8 +4,10 @@ https://forum.minetest.net/viewtopic.php?id=3948 ]] +local S = farming.intllib + minetest.register_craftitem("farming:potato_seed", { - description = "Potato Seeds", + description = S("Potato Seeds"), inventory_image = "farming_potato_seed.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1") @@ -14,7 +16,7 @@ minetest.register_craftitem("farming:potato_seed", { -- potato minetest.register_craftitem("farming:potato", { - description = "Potato", + description = S("Potato"), inventory_image = "farming_potato.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1") @@ -24,7 +26,7 @@ minetest.register_craftitem("farming:potato", { -- baked potato minetest.register_craftitem("farming:baked_potato", { - description = "Baked Potato", + description = S("Baked Potato"), inventory_image = "farming_baked_potato.png", on_use = minetest.item_eat(6), }) diff --git a/pumpkin.lua b/pumpkin.lua index 67ecb9c..7b8108d 100644 --- a/pumpkin.lua +++ b/pumpkin.lua @@ -3,8 +3,10 @@ Big thanks to PainterlyPack.net for allowing me to use these textures ]] +local S = farming.intllib + minetest.register_craftitem("farming:pumpkin_seed", { - description = "Pumpkin Seed", + description = S("Pumpkin Seed"), inventory_image = "farming_pumpkin_seed.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1") @@ -13,7 +15,7 @@ minetest.register_craftitem("farming:pumpkin_seed", { -- pumpkin minetest.register_node("farming:pumpkin", { - description = "Pumpkin", + description = S("Pumpkin"), tiles = { "farming_pumpkin_top.png", "farming_pumpkin_top.png", @@ -33,7 +35,7 @@ minetest.register_node("farming:pumpkin", { -- pumpkin slice minetest.register_craftitem("farming:pumpkin_slice", { - description = "Pumpkin Slice", + description = S("Pumpkin Slice"), inventory_image = "farming_pumpkin_slice.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1") @@ -59,7 +61,7 @@ minetest.register_craft({ -- jack 'o lantern minetest.register_node("farming:jackolantern", { - description = "Jack 'O Lantern", + description = S("Jack 'O Lantern"), tiles = { "farming_pumpkin_top.png", "farming_pumpkin_top.png", @@ -78,7 +80,6 @@ minetest.register_node("farming:jackolantern", { }) minetest.register_node("farming:jackolantern_on", { - description = "Jack 'O Lantern", tiles = { "farming_pumpkin_top.png", "farming_pumpkin_top.png", @@ -266,13 +267,13 @@ minetest.register_craft({ -- pumpkin bread minetest.register_craftitem("farming:pumpkin_bread", { - description = ("Pumpkin Bread"), + description = S("Pumpkin Bread"), inventory_image = "farming_pumpkin_bread.png", on_use = minetest.item_eat(8) }) minetest.register_craftitem("farming:pumpkin_dough", { - description = "Pumpkin Dough", + description = S("Pumpkin Dough"), inventory_image = "farming_pumpkin_dough.png", }) diff --git a/raspberry.lua b/raspberry.lua index 686ea5a..80b0084 100644 --- a/raspberry.lua +++ b/raspberry.lua @@ -1,5 +1,7 @@ +local S = farming.intllib + minetest.register_craftitem("farming:raspberry_seed", { - description = "Raspberry Seeds", + description = S("Raspberry Seeds"), inventory_image = "farming_raspberry_seed.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1") @@ -8,7 +10,7 @@ minetest.register_craftitem("farming:raspberry_seed", { -- raspberries minetest.register_craftitem("farming:raspberries", { - description = "Raspberries", + description = S("Raspberries"), inventory_image = "farming_raspberries.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1") @@ -18,7 +20,7 @@ minetest.register_craftitem("farming:raspberries", { -- raspberry smoothie minetest.register_craftitem("farming:smoothie_raspberry", { - description = "Raspberry Smoothie", + description = S("Raspberry Smoothie"), inventory_image = "farming_raspberry_smoothie.png", on_use = minetest.item_eat(2, "vessels:drinking_glass"), }) diff --git a/rhubarb.lua b/rhubarb.lua index aaf5086..32ac6dc 100644 --- a/rhubarb.lua +++ b/rhubarb.lua @@ -1,14 +1,16 @@ +local S = farming.intllib + minetest.register_craftitem("farming:rhubarb_seed", { - description = "Rhubarb Seeds", + description = S("Rhubarb Seeds"), inventory_image = "farming_rhubarb_seed.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1") end }) - + -- rhubarb minetest.register_craftitem("farming:rhubarb", { - description = "Rhubarb", + description = S("Rhubarb"), inventory_image = "farming_rhubarb.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1") @@ -18,7 +20,7 @@ minetest.register_craftitem("farming:rhubarb", { -- rhubarb pie minetest.register_craftitem("farming:rhubarb_pie", { - description = "Rhubarb Pie", + description = S("Rhubarb Pie"), inventory_image = "farming_rhubarb_pie.png", on_use = minetest.item_eat(6), }) diff --git a/soil.lua b/soil.lua index e748d5c..2b8c6b2 100644 --- a/soil.lua +++ b/soil.lua @@ -1,6 +1,9 @@ + +local S = farming.intllib + -- normal soil minetest.register_node("farming:soil", { - description = "Soil", + description = S("Soil"), tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"}, drop = "default:dirt", groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 2}, @@ -9,7 +12,7 @@ minetest.register_node("farming:soil", { -- wet soil minetest.register_node("farming:soil_wet", { - description = "Wet Soil", + description = S("Wet Soil"), tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"}, drop = "default:dirt", groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 3}, diff --git a/sugar.lua b/sugar.lua index efc92ef..97efc67 100644 --- a/sugar.lua +++ b/sugar.lua @@ -1,8 +1,10 @@ +local S = farming.intllib + --= Sugar minetest.register_craftitem("farming:sugar", { - description = "Sugar", + description = S("Sugar"), inventory_image = "farming_sugar.png", }) diff --git a/tomato.lua b/tomato.lua index 4ff6b64..68efea7 100644 --- a/tomato.lua +++ b/tomato.lua @@ -4,8 +4,10 @@ http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1288375-food-plus-mod-more-food-than-you-can-imagine-v2-9) ]] +local S = farming.intllib + minetest.register_craftitem("farming:tomato_seed", { - description = "Tomato Seeds", + description = S("Tomato Seeds"), inventory_image = "farming_tomato_seed.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1") @@ -14,7 +16,7 @@ minetest.register_craftitem("farming:tomato_seed", { -- tomato minetest.register_craftitem("farming:tomato", { - description = "Tomato", + description = S("Tomato"), inventory_image = "farming_tomato.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1") diff --git a/wheat.lua b/wheat.lua index 72d65c4..a1a77ec 100644 --- a/wheat.lua +++ b/wheat.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- wheat seeds minetest.register_node("farming:seed_wheat", { - description = "Wheat Seed", + description = S("Wheat Seed"), tiles = {"farming_wheat_seed.png"}, inventory_image = "farming_wheat_seed.png", wield_image = "farming_wheat_seed.png", @@ -19,13 +21,13 @@ minetest.register_node("farming:seed_wheat", { -- harvested wheat minetest.register_craftitem("farming:wheat", { - description = "Wheat", + description = S("Wheat"), inventory_image = "farming_wheat.png", }) -- straw minetest.register_node("farming:straw", { - description = "Straw", + description = S("Straw"), tiles = {"farming_straw.png"}, is_ground_content = false, groups = {snappy = 3, flammable = 4, fall_damage_add_percent=-30}, @@ -50,7 +52,7 @@ minetest.register_craft({ -- flour minetest.register_craftitem("farming:flour", { - description = "Flour", + description = S("Flour"), inventory_image = "farming_flour.png", }) @@ -62,7 +64,7 @@ minetest.register_craft({ -- bread minetest.register_craftitem("farming:bread", { - description = "Bread", + description = S("Bread"), inventory_image = "farming_bread.png", on_use = minetest.item_eat(5), })