Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Illuna-Minetest/plantlife_modpack
1 result
Show changes
Commits on Source (15)
Showing
with 125 additions and 281 deletions
default
biome_lib
plantlife_i18n
stonage?
sumpf?
......@@ -5,10 +5,12 @@
-- Branch textures created by Neuromancer.
-- Licence for Code and Non-Bush leaf code is WTFPL.
-- support for i18n
local S = plantlife_i18n.gettext
abstract_bushes = {}
minetest.register_node("bushes:youngtree2_bottom", {
description = "Young Tree 2 (bottom)",
description = S("Young Tree 2 (bottom)"),
drawtype="nodebox",
tiles = {"bushes_youngtree2trunk.png"},
inventory_image = "bushes_youngtree2trunk_inv.png",
......@@ -33,7 +35,7 @@ for i in pairs(BushBranchCenter) do
local Num = BushBranchCenter[i][1]
local TexNum = BushBranchCenter[i][2]
minetest.register_node("bushes:bushbranches"..Num, {
description = "Bush Branches "..Num,
description = S("Bush Branches @1", Num),
drawtype = "nodebox",
tiles = {
"bushes_leaves_"..TexNum..".png",
......@@ -70,7 +72,7 @@ for i in pairs(BushBranchSide) do
local Num = BushBranchSide[i][1]
local TexNum = BushBranchSide[i][2]
minetest.register_node("bushes:bushbranches"..Num, {
description = "Bush Branches "..Num,
description = S("Bush Branches @1", Num),
drawtype = "nodebox",
tiles = {
--[[top]] "bushes_leaves_"..TexNum..".png",
......@@ -112,7 +114,7 @@ local BushLeafNode = { {1}, {2}}
for i in pairs(BushLeafNode) do
local Num = BushLeafNode[i][1]
minetest.register_node("bushes:BushLeaves"..Num, {
description = "Bush Leaves "..Num,
description = S("Bush Leaves @1", Num),
drawtype = "allfaces_optional",
tiles = {"bushes_leaves_"..Num..".png"},
paramtype = "light",
......
local S = biome_lib.intllib
-- support for i18n
local S = plantlife_i18n.gettext
-- Basket
......@@ -27,10 +28,9 @@ minetest.register_craft({
})
for i, berry in ipairs(bushes_classic.bushes) do
local desc = bushes_classic.bushes_descriptions[i]
minetest.register_craftitem(":bushes:"..berry.."_pie_raw", {
description = S("Raw "..desc.." pie"),
description = bushes_classic.bushes_descriptions[i][2],
inventory_image = "bushes_"..berry.."_pie_raw.png",
on_use = minetest.item_eat(4),
})
......@@ -44,7 +44,7 @@ for i, berry in ipairs(bushes_classic.bushes) do
if berry == "strawberry" and minetest.registered_nodes["farming_plus:strawberry"] then
minetest.register_craftitem(":farming_plus:strawberry_item", {
description = S("Strawberry"),
description = bushes_classic.bushes_descriptions[i][1],
inventory_image = "bushes_"..berry..".png",
on_use = minetest.item_eat(2),
groups = {berry=1, strawberry=1}
......@@ -53,7 +53,7 @@ for i, berry in ipairs(bushes_classic.bushes) do
elseif berry == "blueberry" and minetest.registered_items["farming:blueberries"] then
minetest.register_craftitem(":farming:blueberries", {
description = S("Blueberry"),
description = bushes_classic.bushes_descriptions[i][1],
inventory_image = "bushes_"..berry..".png",
on_use = minetest.item_eat(1),
groups = {berry=1, blueberry=1}
......@@ -62,7 +62,7 @@ for i, berry in ipairs(bushes_classic.bushes) do
elseif berry == "raspberry" and minetest.registered_items["farming:raspberries"] then
minetest.register_craftitem(":farming:raspberries", {
description = S("Raspberry"),
description = bushes_classic.bushes_descriptions[i][1],
inventory_image = "bushes_"..berry..".png",
on_use = minetest.item_eat(1),
groups = {berry=1, raspberry=1}
......@@ -71,7 +71,7 @@ for i, berry in ipairs(bushes_classic.bushes) do
else
minetest.register_craftitem(":bushes:"..berry, {
description = desc,
description = bushes_classic.bushes_descriptions[i][1],
inventory_image = "bushes_"..berry..".png",
groups = {berry = 1, [berry] = 1},
on_use = minetest.item_eat(1),
......@@ -90,7 +90,7 @@ for i, berry in ipairs(bushes_classic.bushes) do
-- Cooked pie
minetest.register_craftitem(":bushes:"..berry.."_pie_cooked", {
description = S("Cooked "..desc.." pie"),
description = bushes_classic.bushes_descriptions[i][3],
inventory_image = "bushes_"..berry.."_pie_cooked.png",
on_use = minetest.item_eat(6),
})
......@@ -105,7 +105,7 @@ for i, berry in ipairs(bushes_classic.bushes) do
-- slice of pie
minetest.register_craftitem(":bushes:"..berry.."_pie_slice", {
description = S("Slice of "..desc.." pie"),
description = bushes_classic.bushes_descriptions[i][4],
inventory_image = "bushes_"..berry.."_pie_slice.png",
on_use = minetest.item_eat(1),
})
......@@ -136,5 +136,3 @@ minetest.register_craft({
{ "group:berry", "group:berry", "group:berry" },
},
})
biome_lib
plantlife_i18n
farming?
farming_plus?
......@@ -3,12 +3,13 @@
--
-- License: WTFPL
local S = biome_lib.intllib
bushes_classic = {}
-- support for i18n
local S = plantlife_i18n.gettext
bushes_classic.bushes = {
"strawberry",
"strawberry",
"blackberry",
"blueberry",
"raspberry",
......@@ -17,12 +18,12 @@ bushes_classic.bushes = {
}
bushes_classic.bushes_descriptions = {
"Strawberry",
"Blackberry",
"Blueberry",
"Raspberry",
"Gooseberry",
"Mixed Berry"
{S("Strawberry"), S("Raw Strawberry pie"), S("Cooked Strawberry pie"), S("Slice of Strawberry pie"), S("Basket with Strawberry pies"), S("Strawberry Bush")},
{S("Blackberry"), S("Raw Blackberry pie"), S("Cooked Blackberry pie"), S("Slice of Blackberry pie"), S("Basket with Blackberry pies"), S("Blackberry Bush")},
{S("Blueberry"), S("Raw Blueberry pie"), S("Cooked Blueberry pie"), S("Slice of Blueberry pie"), S("Basket with Blueberry pies"), S("Blueberry Bush")},
{S("Raspberry"), S("Raw Raspberry pie"), S("Cooked Raspberry pie"), S("Slice of Raspberry pie"), S("Basket with Raspberry pies"), S("Raspberry Bush")},
{S("Gooseberry"), S("Raw Gooseberry pie"), S("Cooked Gooseberry pie"), S("Slice of Gooseberry pie"), S("Basket with Gooseberry pies"), S("Gooseberry Bush")},
{S("Mixed Berry"), S("Raw Mixed Berry pie"), S("Cooked Mixed Berry pie"), S("Slice of Mixed Berry pie"), S("Basket with Mixed Berry pies"), S("Currently fruitless Bush")}
}
bushes_classic.spawn_list = {}
......
# Translation by Xanthin
Strawberry = Erdbeere
Blackberry = Brombeere
Blueberry = Blaubeere
Raspberry = Himbeere
Gooseberry = Stachelbeere
Mixed Berry = Beerenmix
Basket with Strawberry Pies = Korb mit Erdbeertorten
Basket with Blackberry Pies = Korb mit Brombeertorten
Basket with Blueberry Pies = Korb mit Blaubeertorten
Basket with Raspberry Pies = Korb mit Himbeertorten
Basket with Gooseberry Pies = Korb mit Stachelbeertorten
Basket with Mixed Berry Pies = Korb mit Beerenmixtorten
currently fruitless = zur Zeit fruechteloser
Strawberry Bush = Erdbeerbusch
Blackberry Bush = Brombeerbusch
Blueberry Bush = Blaubeerbusch
Raspberry Bush = Himbeerbusch
Gooseberry Bush = Stachelbeerbusch
Mixed Berry Bush = Beerenmixbusch
Basket = Korb
Sugar = Zucker
Raw Strawberry pie = Rohe Erdbeertorte
Raw Blackberry pie = Rohe Brombeertorte
Raw Blueberry pie = Rohe Blaubeertorte
Raw Raspberry pie = Rohe Himbeertorte
Raw Gooseberry pie = Rohe Stachelbeertorte
Raw Mixed Berry pie = Rohe Beerenmixtorte
Cooked Strawberry pie = Erdbeertorte
Cooked Blackberry pie = Brombeertorte
Cooked Blueberry pie = Blaubeertorte
Cooked Raspberry pie = Himbeertorte
Cooked Gooseberry pie = Stachelbeertorte
Cooked Mixed Berry pie = Beerenmixtorte
Slice of Strawberry pie = Erdbeertortenstueck
Slice of Blackberry pie = Brombeertortenstueck
Slice of Blueberry pie = Blaubeertortenstueck
Slice of Raspberry pie = Himbeertortenstueck
Slice of Gooseberry pie = Stachelbeertortenstueck
Slice of Mixed Berry pie = Beerenmixtortenstueck
[Bushes] Loaded. = [Bushes] Geladen.
# Template
Strawberry = Fraise
Blackberry = Mûre
Blueberry = Myrtille
Raspberry = Framboise
Gooseberry = Groseille
Mixed Berry = Mélange de baies
Basket with Strawberry Pies = Panier de tartes aux fraises
Basket with Blackberry Pies = Panier de tartes aux mûres
Basket with Blueberry Pies = Panier de tartes aux myrtilles
Basket with Raspberry Pies = Panier de tartes aux framboises
Basket with Gooseberry Pies = Panier de tartes aux groseilles
Basket with Mixed Berry Pies = Panier de tartes au mélange de baies
currently fruitless = actuellement sans fruit
Strawberry Bush = Buisson à fraise
Blackberry Bush = Buisson à mûre
Blueberry Bush = Buisson à myrtille
Raspberry Bush = Buisson à framboise
Gooseberry Bush = Buisson à groseille
Mixed Berry Bush = Buisson de baies mélangées
Basket = Panier
Sugar = Sucre
Raw Strawberry pie = Tarte crue aux fraises
Raw Blackberry pie = Tarte crue aux mûres
Raw Blueberry pie = Tarte crue aux myrtilles
Raw Raspberry pie = Tarte crue aux framboises
Raw Gooseberry pie = Tarte crue aux groseilles
Raw Mixed Berry pie = Tarte crue au mélange de baies
Cooked Strawberry pie = Tarte cuite aux fraises
Cooked Blackberry pie = Tarte cuite aux mûres
Cooked Blueberry pie = Tarte cuite aux myrtilles
Cooked Raspberry pie = Tarte cuite aux framboises
Cooked Gooseberry pie = Tarte cuite aux groseilles
Cooked Mixed Berry pie = Tarte cuite au mélange de baies
Slice of Strawberry pie = Part de tarte aux fraises
Slice of Blackberry pie = Part de tarte aux mûres
Slice of Blueberry pie = Part de tarte aux myrtilles
Slice of Raspberry pie = Part de tarts aux framboises
Slice of Gooseberry pie = Part de tarte aux groseilles
Slice of Mixed Berry pie = Part de tarte au mélange de baies
[Bushes] Loaded. = [Buissons] Chargés.
# Template
Strawberry =
Blackberry =
Blueberry =
Raspberry =
Gooseberry =
Mixed Berry =
Basket with Strawberry Pies =
Basket with Blackberry Pies =
Basket with Blueberry Pies =
Basket with Raspberry Pies =
Basket with Gooseberry Pies =
Basket with Mixed Berry Pies =
currently fruitless =
Strawberry Bush =
Blackberry Bush =
Blueberry Bush =
Raspberry Bush =
Gooseberry Bush =
Mixed Berry Bush =
Basket =
Sugar =
Raw Strawberry pie =
Raw Blackberry pie =
Raw Blueberry pie =
Raw Raspberry pie =
Raw Gooseberry pie =
Raw Mixed Berry pie =
Cooked Strawberry pie =
Cooked Blackberry pie =
Cooked Blueberry pie =
Cooked Raspberry pie =
Cooked Gooseberry pie =
Cooked Mixed Berry pie =
Slice of Strawberry pie =
Slice of Blackberry pie =
Slice of Blueberry pie =
Slice of Raspberry pie =
Slice of Gooseberry pie =
Slice of Mixed Berry pie =
[Bushes] Loaded. =
# Turkish translation
# mahmutelmas06@hotmail.com
Strawberry = Çilek
Blackberry = Böğürtlen
Blueberry = Yaban mersini
Raspberry = Ahududu
Gooseberry = Bektaşi üzümü
Mixed Berry = Dut
Basket with Strawberry Pies = Çilekli pasta sepeti
Basket with Blackberry Pies = Böğürtlenli pasta sepeti
Basket with Blueberry Pies = Yaban mersini pastalı sepet
Basket with Raspberry Pies = Ahududulu pasta sepeti
Basket with Gooseberry Pies = Bektaşi üzümlü pasta sepeti
Basket with Mixed Berry Pies = Dutlu pasta sepeti
currently fruitless = şu anda meyvesiz
Strawberry Bush = Çilek fidanı
Blackberry Bush = Böğürtlen fidanı
Blueberry Bush = Yaban mersini fidanı
Raspberry Bush = Ahududu fidanı
Gooseberry Bush = Bektaşi üzümü fidanı
Mixed Berry Bush = Dut fidanı
Basket = Sepet
Sugar = Şeker
Raw Strawberry pie = Çilekli çiğ pasta
Raw Blackberry pie = Böğürtlenli çiğ pasta
Raw Blueberry pie = Yaban mersinli çiğ pasta
Raw Raspberry pie = Ahududulu çiğ pasta
Raw Gooseberry pie = Bektaşi üzümlü çiğ pasta
Raw Mixed Berry pie = Dutlu çiğ pasta
Cooked Strawberry pie = Pişmiş çilekli pasta
Cooked Blackberry pie = Pişmiş böğürtlenli pasta
Cooked Blueberry pie = Pişmiş yaban mersinli pasta
Cooked Raspberry pie = Pişmiş ahududulu pasta
Cooked Gooseberry pie = Pişmiş bektaşi üzümlü pasta
Cooked Mixed Berry pie = Pişmiş dutlu pasta
Slice of Strawberry pie = Çilekli pasta dilimi
Slice of Blackberry pie = Böğürtlenli pasta dilimi
Slice of Blueberry pie = Yaban mersinli pasta dilimi
Slice of Raspberry pie = Ahududulu pasta dilimi
Slice of Gooseberry pie = Bektaşi üzümlü pasta dilimi
Slice of Mixed Berry pie = Dutlu pasta dilimi
[Bushes] Loaded. = [Bushes] yüklendi.
local S = biome_lib.intllib
-- support for i18n
local S = plantlife_i18n.gettext
plantlife_bushes = {}
......@@ -11,7 +12,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
-- find out which bush type we are dealing with
local bush_name = ""
local can_harvest = false
if oldnode.name == "bushes:fruitless_bush" then
-- this bush has not grown fruits yet (but will eventually)
bush_name = oldmetadata.fields.bush_type
......@@ -146,10 +147,8 @@ minetest.register_abm({
for i, bush_name in ipairs(bushes_classic.bushes) do
local desc = bushes_classic.bushes_descriptions[i]
minetest.register_node(":bushes:basket_"..bush_name, {
description = S("Basket with "..desc.." Pies"),
description = bushes_classic.bushes_descriptions[i][5],
drawtype = "mesh",
mesh = "bushes_basket_full.obj",
tiles = {
......@@ -167,7 +166,6 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
local groups = {snappy = 3, bush = 1, flammable = 2, attached_node=1}
if bush_name == "mixed_berry" then
bush_name = "fruitless";
desc = S("currently fruitless");
texture_top = "bushes_fruitless_bush_top.png"
texture_bottom = "bushes_fruitless_bush_bottom.png"
groups.not_in_creative_inventory = 1
......@@ -177,7 +175,7 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
end
minetest.register_node(":bushes:" .. bush_name .. "_bush", {
description = S(desc.." Bush"),
description = bushes_classic.bushes_descriptions[i][6],
drawtype = "mesh",
mesh = "bushes_bush.obj",
tiles = {"bushes_bush_"..bush_name..".png"},
......@@ -210,5 +208,3 @@ minetest.register_node(":bushes:basket_empty", {
paramtype2 = "facedir",
groups = { dig_immediate = 3 },
})
default
plantlife_i18n
......@@ -4,6 +4,9 @@ local version = "0.0.3"
local mname = "cavestuff"
-----------------------------------------------------------------------------------------------
-- support for i18n
local S = plantlife_i18n.gettext
dofile(minetest.get_modpath("cavestuff").."/nodes.lua")
dofile(minetest.get_modpath("cavestuff").."/mapgen.lua")
......
-- support for i18n
local S = plantlife_i18n.gettext
--Rocks
local cbox = {
......@@ -6,7 +9,7 @@ local cbox = {
}
minetest.register_node("cavestuff:pebble_1",{
description = "Pebble",
description = S("Pebble"),
drawtype = "mesh",
mesh = "cavestuff_pebble.obj",
tiles = {"undergrowth_pebble.png"},
......@@ -39,7 +42,7 @@ minetest.register_node("cavestuff:pebble_2",{
})
minetest.register_node("cavestuff:desert_pebble_1",{
description = "Desert Pebble",
description = S("Desert Pebble"),
drawtype = "mesh",
mesh = "cavestuff_pebble.obj",
tiles = {"default_desert_stone.png"},
......@@ -76,7 +79,7 @@ minetest.register_node("cavestuff:stalactite_1",{
drawtype="nodebox",
tiles = {"undergrowth_pebble.png"},
groups = {cracky=3,attached_node=1},
description = "Stalactite",
description = S("Stalactite"),
paramtype = "light",
paramtype2 = "wallmounted",
node_box = {
......@@ -88,10 +91,10 @@ minetest.register_node("cavestuff:stalactite_1",{
{-0.037500,-0.837500,0.037500,0.037500,0.500000,-0.025000},
}
},
on_place = function(itemstack, placer, pointed_thing)
local pt = pointed_thing
if minetest.get_node(pt.under).name=="default:stone"
if minetest.get_node(pt.under).name=="default:stone"
and minetest.get_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}).name=="air"
and minetest.get_node({x=pt.under.x, y=pt.under.y-2, z=pt.under.z}).name=="air" then
minetest.set_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..math.random(1,3)})
......@@ -140,6 +143,3 @@ minetest.register_node("cavestuff:stalactite_3",{
})
--Stalagmites
default
biome_lib
plantlife_i18n
farming?
......@@ -7,13 +7,16 @@ local mname = "dryplants"
-- textures & ideas partly by Neuromancer
-- License (everything): WTFPL
-- Contains code from: default, farming
-- Contains code from: default, farming
-- Looked at code from: darkage, sickle, stairs
-- Dependencies: default, farming, biome_lib
-- Supports:
-- Supports:
-----------------------------------------------------------------------------------------------
abstract_dryplants = {}
-- support for i18n
local S = plantlife_i18n.gettext
dofile(minetest.get_modpath("dryplants").."/crafting.lua")
dofile(minetest.get_modpath("dryplants").."/settings.txt")
dofile(minetest.get_modpath("dryplants").."/reed.lua")
......@@ -111,7 +114,7 @@ local function sickle_on_use(itemstack, user, pointed_thing, uses)
end
-- the tool
minetest.register_tool("dryplants:sickle", {
description = "Sickle",
description = S("Sickle"),
inventory_image = "dryplants_sickle.png",
on_use = function(itemstack, user, pointed_thing)
return sickle_on_use(itemstack, user, pointed_thing, 220)
......@@ -122,7 +125,7 @@ minetest.register_tool("dryplants:sickle", {
-- Cut Grass
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:grass", {
description = "Cut Grass",
description = S("Cut Grass"),
inventory_image = "dryplants_grass.png",
wield_image = "dryplants_grass.png",
paramtype = "light",
......@@ -153,7 +156,7 @@ minetest.register_abm({
-- Hay
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:hay", {
description = "Hay",
description = S("Hay"),
inventory_image = "dryplants_hay.png",
wield_image = "dryplants_hay.png",
paramtype = "light",
......@@ -172,7 +175,7 @@ minetest.register_node("dryplants:hay", {
-- Short Grass
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:grass_short", {
description = "Short Grass",
description = S("Short Grass"),
tiles = {"default_grass.png^dryplants_grass_short.png", "default_dirt.png", "default_dirt.png^default_grass_side.png^dryplants_grass_short_side.png"},
is_ground_content = true,
groups = {crumbly=3,soil=1,not_in_creative_inventory=1},
......@@ -190,11 +193,11 @@ minetest.register_abm({
interval = GRASS_REGROWING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
chance = 100/GRASS_REGROWING_CHANCE,
action = function(pos)
-- Only become dirt with grass if no cut grass or hay lies on top
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
if above.name ~= "dryplants:grass" and above.name ~= "dryplants:hay" then
-- Only become dirt with grass if no cut grass or hay lies on top
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
if above.name ~= "dryplants:grass" and above.name ~= "dryplants:hay" then
minetest.set_node(pos, {name="default:dirt_with_grass"})
end
end
end,
})
......
......@@ -6,9 +6,12 @@
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default
-- Looked at code from: default
-----------------------------------------------------------------------------------------------
-- support for i18n
local S = plantlife_i18n.gettext
abstract_dryplants.grow_juncus = function(pos)
local juncus_type = math.random(2,3)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
......@@ -23,9 +26,9 @@ abstract_dryplants.grow_juncus = function(pos)
end
minetest.register_node("dryplants:juncus", {
description = "Juncus",
description = S("Juncus"),
drawtype = "plantlike",
visual_scale = 2,
visual_scale = math.sqrt(8),
paramtype = "light",
tiles = {"dryplants_juncus_03.png"},
inventory_image = "dryplants_juncus_inv.png",
......@@ -45,8 +48,8 @@ minetest.register_node("dryplants:juncus", {
},
on_place = function(itemstack, placer, pointed_thing)
local playername = placer:get_player_name()
if minetest.is_protected(pointed_thing.above, playername) or
minetest.is_protected(pointed_thing.under, playername) then
if minetest.is_protected(pointed_thing.above, playername) or
minetest.is_protected(pointed_thing.under, playername) then
minetest.chat_send_player(playername, "Someone else owns that spot.")
return
end
......@@ -65,9 +68,9 @@ minetest.register_node("dryplants:juncus", {
end,
})
minetest.register_node("dryplants:juncus_02", {
description = "Juncus",
description = S("Juncus"),
drawtype = "plantlike",
visual_scale = 2,
visual_scale = math.sqrt(8),
paramtype = "light",
tiles = {"dryplants_juncus_02.png"},
walkable = false,
......@@ -92,7 +95,7 @@ minetest.register_node("dryplants:juncus_02", {
-- near water or swamp
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"default:dirt_with_grass",
--"default:desert_sand",
--"default:sand",
"stoneage:grass_with_silex",
......@@ -113,7 +116,7 @@ biome_lib:register_generate_plant({
-- at dunes/beach
biome_lib:register_generate_plant({
surface = {
--"default:dirt_with_grass",
--"default:dirt_with_grass",
--"default:desert_sand",
"default:sand",
--"stoneage:grass_with_silex",
......
......@@ -4,8 +4,11 @@
-- by Mossmanikin
-- License (everything): WTFPL
-- Looked at code from: darkage, default, stairs
-- Dependencies: default
-- Dependencies: default
-----------------------------------------------------------------------------------------------
-- support for i18n
local S = plantlife_i18n.gettext
minetest.register_alias("stairs:stair_wetreed", "dryplants:wetreed_roof")
minetest.register_alias("stairs:slab_wetreed", "dryplants:wetreed_slab")
minetest.register_alias("stairs:stair_reed", "dryplants:reed_roof")
......@@ -16,7 +19,7 @@ minetest.register_alias("stairs:slab_reed", "dryplants:reed_slab")
-- Wet Reed
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed", {
description = "Wet Reed",
description = S("Wet Reed"),
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed_wet.png"},
......@@ -28,7 +31,7 @@ minetest.register_node("dryplants:wetreed", {
-- Wet Reed Slab
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_slab", {
description = "Wet Reed Slab",
description = S("Wet Reed Slab"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
......@@ -49,7 +52,7 @@ minetest.register_node("dryplants:wetreed_slab", {
-- Wet Reed Roof
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_roof", {
description = "Wet Reed Roof",
description = S("Wet Reed Roof"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
......@@ -93,7 +96,7 @@ if AUTO_ROOF_CORNER == true then
interval = 1,
chance = 1,
action = function(pos)
local node_east = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z })
local node_west = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z })
local node_north = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1})
......@@ -106,7 +109,7 @@ if AUTO_ROOF_CORNER == true then
then
minetest.set_node(pos, {name=corner, param2=0})
end
if ((node_north.name == roof and node_north.param2 == 1)
or (node_north.name == corner and node_north.param2 == 2))
and ((node_east.name == roof and node_east.param2 == 0)
......@@ -114,7 +117,7 @@ if AUTO_ROOF_CORNER == true then
then
minetest.set_node(pos, {name=corner, param2=1})
end
if ((node_east.name == roof and node_east.param2 == 2)
or (node_east.name == corner and node_east.param2 == 3))
and ((node_south.name == roof and node_south.param2 == 1)
......@@ -122,7 +125,7 @@ if AUTO_ROOF_CORNER == true then
then
minetest.set_node(pos, {name=corner, param2=2})
end
if ((node_south.name == roof and node_south.param2 == 3)
or (node_south.name == corner and node_south.param2 == 0))
and ((node_west.name == roof and node_west.param2 == 2)
......@@ -138,7 +141,7 @@ if AUTO_ROOF_CORNER == true then
then
minetest.set_node(pos, {name=corner_2, param2=0})
end
if ((node_north.name == roof and node_north.param2 == 3)
or (node_north.name == corner_2 and node_north.param2 == 2))
and ((node_east.name == roof and node_east.param2 == 2)
......@@ -146,7 +149,7 @@ if AUTO_ROOF_CORNER == true then
then
minetest.set_node(pos, {name=corner_2, param2=1})
end
if ((node_east.name == roof and node_east.param2 == 0)
or (node_east.name == corner_2 and node_east.param2 == 3))
and ((node_south.name == roof and node_south.param2 == 3)
......@@ -154,7 +157,7 @@ if AUTO_ROOF_CORNER == true then
then
minetest.set_node(pos, {name=corner_2, param2=2})
end
if ((node_south.name == roof and node_south.param2 == 1)
or (node_south.name == corner_2 and node_south.param2 == 0))
and ((node_west.name == roof and node_west.param2 == 0)
......@@ -172,7 +175,7 @@ end
-- Wet Reed Roof Corner
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_roof_corner", {
description = "Wet Reed Roof Corner",
description = S("Wet Reed Roof Corner"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
......@@ -202,7 +205,7 @@ minetest.register_node("dryplants:wetreed_roof_corner", {
-- Wet Reed Roof Corner 2
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_roof_corner_2", {
description = "Wet Reed Roof Corner 2",
description = S("Wet Reed Roof Corner 2"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
......@@ -227,7 +230,7 @@ minetest.register_node("dryplants:wetreed_roof_corner_2", {
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Wet Reed becomes (dry) Reed over time
-----------------------------------------------------------------------------------------------
......@@ -262,7 +265,7 @@ end
-- Reed
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed", {
description = "Reed",
description = S("Reed"),
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed.png"},
......@@ -274,7 +277,7 @@ minetest.register_node("dryplants:reed", {
-- Reed Slab
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_slab", {
description = "Reed Slab",
description = S("Reed Slab"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
......@@ -295,7 +298,7 @@ minetest.register_node("dryplants:reed_slab", {
-- Reed Roof
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_roof", {
description = "Reed Roof",
description = S("Reed Roof"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
......@@ -323,7 +326,7 @@ minetest.register_node("dryplants:reed_roof", {
-- Reed Roof Corner
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_roof_corner", {
description = "Reed Roof Corner",
description = S("Reed Roof Corner"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
......@@ -353,7 +356,7 @@ minetest.register_node("dryplants:reed_roof_corner", {
-- Reed Roof Corner 2
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_roof_corner_2", {
description = "Reed Roof Corner 2",
description = S("Reed Roof Corner 2"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
......
......@@ -6,7 +6,7 @@
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default, trees
-- Looked at code from: default, trees
-----------------------------------------------------------------------------------------------
-- NOTES (from wikipedia, some of this might get implemented)
......@@ -18,6 +18,9 @@
-- Typha stems and leaves can be used to make paper
-- The seed hairs were used by some Native American groups as tinder for starting fires
-- support for i18n
local S = plantlife_i18n.gettext
-----------------------------------------------------------------------------------------------
-- REEDMACE SHAPES
-----------------------------------------------------------------------------------------------
......@@ -70,7 +73,7 @@ abstract_dryplants.grow_reedmace_water = function(pos)
minetest.set_node(pos_02, {name="dryplants:reedmace_height_3_spikes"})
else
minetest.set_node(pos_02, {name="dryplants:reedmace_height_3"})
end
end
end
end
end
......@@ -79,7 +82,7 @@ end
-- REEDMACE SPIKES
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reedmace_spikes", {
description = "Reedmace",
description = S("Reedmace"),
drawtype = "plantlike",
paramtype = "light",
tiles = {"dryplants_reedmace_spikes.png"},
......@@ -101,7 +104,7 @@ minetest.register_node("dryplants:reedmace_spikes", {
-- REEDMACE height: 1
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reedmace_top", {
description = "Reedmace, height: 1",
description = S("Reedmace, height: 1"),
drawtype = "plantlike",
paramtype = "light",
tiles = {"dryplants_reedmace_top.png"},
......@@ -123,9 +126,9 @@ minetest.register_node("dryplants:reedmace_top", {
-- REEDMACE height: 2
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reedmace_height_2", {
description = "Reedmace, height: 2",
description = S("Reedmace, height: 2"),
drawtype = "plantlike",
visual_scale = 2,
visual_scale = math.sqrt(8),
paramtype = "light",
tiles = {"dryplants_reedmace_height_2.png"},
inventory_image = "dryplants_reedmace_top.png",
......@@ -146,9 +149,9 @@ minetest.register_node("dryplants:reedmace_height_2", {
-- REEDMACE height: 3
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reedmace_height_3", {
description = "Reedmace, height: 3",
description = S("Reedmace, height: 3"),
drawtype = "plantlike",
visual_scale = 2,
visual_scale = math.sqrt(8),
paramtype = "light",
tiles = {"dryplants_reedmace_height_3.png"},
inventory_image = "dryplants_reedmace_top.png",
......@@ -169,9 +172,9 @@ minetest.register_node("dryplants:reedmace_height_3", {
-- REEDMACE height: 3 & Spikes
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reedmace_height_3_spikes", {
description = "Reedmace, height: 3 & Spikes",
description = S("Reedmace, height: 3 & Spikes"),
drawtype = "plantlike",
visual_scale = 2,
visual_scale = math.sqrt(8),
paramtype = "light",
tiles = {"dryplants_reedmace_height_3_spikes.png"},
inventory_image = "dryplants_reedmace_top.png",
......@@ -192,7 +195,7 @@ minetest.register_node("dryplants:reedmace_height_3_spikes", {
-- REEDMACE STEMS
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reedmace", {
description = "Reedmace",
description = S("Reedmace"),
drawtype = "plantlike",
paramtype = "light",
tiles = {"dryplants_reedmace.png"},
......@@ -212,8 +215,8 @@ minetest.register_node("dryplants:reedmace", {
after_destruct = function(pos,oldnode)
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
if node.name == "dryplants:reedmace_top"
or node.name == "dryplants:reedmace_spikes" then
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
or node.name == "dryplants:reedmace_spikes" then
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
minetest.add_item(pos,"dryplants:reedmace_sapling")
end
end,
......@@ -222,7 +225,7 @@ minetest.register_node("dryplants:reedmace", {
-- REEDMACE BOTTOM
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reedmace_bottom", {
description = "Reedmace",
description = S("Reedmace"),
drawtype = "plantlike",
paramtype = "light",
tiles = {"dryplants_reedmace_bottom.png"},
......@@ -241,10 +244,10 @@ minetest.register_node("dryplants:reedmace_bottom", {
},
after_destruct = function(pos,oldnode)
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
if node.name == "dryplants:reedmace"
if node.name == "dryplants:reedmace"
or node.name == "dryplants:reedmace_top"
or node.name == "dryplants:reedmace_spikes" then
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
or node.name == "dryplants:reedmace_spikes" then
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
minetest.add_item(pos,"dryplants:reedmace_sapling")
end
end,
......@@ -253,7 +256,7 @@ minetest.register_node("dryplants:reedmace_bottom", {
-- REEDMACE "SAPLING" (the drop from the above)
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reedmace_sapling", {
description = "Reedmace",
description = S("Reedmace"),
drawtype = "plantlike",
paramtype = "light",
tiles = {"dryplants_reedmace_sapling.png"},
......@@ -293,7 +296,7 @@ minetest.register_abm({
-- REEDMACE WATER (for entity)
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reedmace_water", {
description = "Reedmace",
description = S("Reedmace"),
drawtype = "plantlike",
paramtype = "light",
tiles = {"dryplants_reedmace_water.png"},
......@@ -348,7 +351,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
-- near water or swamp
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"default:dirt_with_grass",
"default:desert_sand",
"stoneage:grass_with_silex",
"sumpf:peat",
......@@ -370,7 +373,7 @@ biome_lib:register_generate_plant({
biome_lib:register_generate_plant({
surface = {
"default:dirt",
"default:dirt_with_grass",
"default:dirt_with_grass",
--"default:desert_sand",
--"stoneage:grass_with_silex",
"stoneage:sand_with_silex",
......
-- support for i18n
local S = plantlife_i18n.gettext
-----------------------------------------------------------------------------------------------
-- Ferns - Crafting 0.0.5
-----------------------------------------------------------------------------------------------
-- (by Mossmanikin)
-- License (everything): WTFPL
-- License (everything): WTFPL
-----------------------------------------------------------------------------------------------
minetest.register_craft({
type = "shapeless",
......@@ -27,7 +29,7 @@ minetest.register_craft({
minetest.register_alias("archaeplantae:fiddlehead", "ferns:fiddlehead")
minetest.register_craftitem("ferns:fiddlehead", {
description = "Fiddlehead",
description = S("Fiddlehead"),
inventory_image = "ferns_fiddlehead.png",
on_use = minetest.item_eat(-1), -- slightly poisonous when raw
})
......@@ -38,7 +40,7 @@ minetest.register_craft({
cooktime = 1,
})
minetest.register_craftitem("ferns:fiddlehead_roasted", {
description = "Roasted Fiddlehead",
description = S("Roasted Fiddlehead"),
inventory_image = "ferns_fiddlehead_roasted.png",
on_use = minetest.item_eat(1), -- edible when cooked
})
......@@ -48,7 +50,7 @@ minetest.register_craftitem("ferns:fiddlehead_roasted", {
minetest.register_alias("archaeplantae:ferntuber", "ferns:ferntuber")
minetest.register_craftitem("ferns:ferntuber", {
description = "Fern Tuber",
description = S("Fern Tuber"),
inventory_image = "ferns_ferntuber.png",
})
minetest.register_craft({
......@@ -61,7 +63,7 @@ minetest.register_craft({
minetest.register_alias("archaeplantae:ferntuber_roasted", "ferns:ferntuber_roasted")
minetest.register_craftitem("ferns:ferntuber_roasted", {
description = "Roasted Fern Tuber",
description = S("Roasted Fern Tuber"),
inventory_image = "ferns_ferntuber_roasted.png",
on_use = minetest.item_eat(3),
})
......@@ -101,4 +103,3 @@ minetest.register_craft({
output = "farming:hoe_wood",
recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
})]]
default
biome_lib
\ No newline at end of file
biome_lib
plantlife_i18n