redwood meets gitlab

master
tchncs 2016-08-22 18:24:45 +02:00
parent dc73f3af03
commit a93139d3f7
15 changed files with 651 additions and 0 deletions

3
depends.txt Normal file
View File

@ -0,0 +1,3 @@
default
stairs
intllib?

24
init.lua Normal file
View File

@ -0,0 +1,24 @@
--
-- Redwood tree from https://github.com/tenplus1/ethereal
--
redwood = {}
-- Intllib
local S
if minetest.get_modpath("intllib") then
S = intllib.Getter()
else
S = function(s) return s end
end
redwood.intllib = S
local path = minetest.get_modpath("redwood")
dofile(path .. "/leaves.lua")
dofile(path .. "/wood.lua")
dofile(path .. "/sapling.lua")
minetest.register_alias("ethereal:redwood_trunk", "redwood:redwood_trunk")
minetest.register_alias("ethereal:redwood_leaves", "redwood:redwood_leaves")
print (S("[MOD] Redwood loaded"))

29
leaves.lua Normal file
View File

@ -0,0 +1,29 @@
local S = redwood.intllib
-- set leaftype (value inside init.lua)
local leaftype = "plantlike"
-- redwood leaves
minetest.register_node("redwood:redwood_leaves", {
description = S("Redwood Leaves"),
drawtype = leaftype,
visual_scale = 1.2,
tiles = {"redwood_leaves.png"},
inventory_image = "redwood_leaves.png",
wield_image = "redwood_leaves.png",
paramtype = "light",
walkable = redwood.leafwalk,
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
drop = {
max_items = 1,
items = {
{items = {"redwood:redwood_sapling"}, rarity = 50},
{items = {"redwood:redwood_leaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})

14
license.txt Normal file
View File

@ -0,0 +1,14 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
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.
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.

220
locale/de.txt Normal file
View File

@ -0,0 +1,220 @@
# German Translation for ethereal mod
# Deutsche Übersetzung der ethereal Mod
# last update: 2016/May/25
# Author: Xanthin
#bonemeal.lua
Bone = Knochen
Bone Meal = Knochenmehl
#crystal.lua
Crystal Spike = Kristallnadel
Crystal Ingot = Kristallbarren
Crystal Block = Kristallblock
Crystal Sword = Kristallschwert
Crystal Axe = Kristallaxt
Crystal Pickaxe = Kristallspitzhacke
Crystal (soft touch) Shovel = Kristallschaufel (Behutsamkeit)
Crystal Gilly Staff = Kristallener Gilly-Stab
#dirt.lua
Green Dirt = Grüne Erde
Dried Dirt = Vertrocknete Erde
Bamboo Dirt = Bambuserde
Jungle Dirt = Tropenerde
Grove Dirt = Hainerde
Prairie Dirt = Prärieerde
Cold Dirt = Kalte Erde
Crystal Dirt = Kristallerde
Mushroom Dirt = Pilzerde
Fiery Dirt = Feuerrote Erde
Gray Dirt = Graue Erde
Red Baked Clay = Roter gebrannter Ton
Orange Baked Clay = Oranger gebrannter Ton
Grey Baked Clay = Grauer gebrannter Ton
Quicksand = Treibsand
#extra.lua
Bamboo Floor = Bambusboden
Palm Wax = Palmwachs
Candle = Kerze
Bowl = Schale
Stone Ladder = Steinleiter
Paper Wall = Papierwand
Glo Stone = Leuchtstein
Lump of Charcoal = Holzkohlestück
Staff of Light = Stab des Lichts
#fences.lua
Scorched Fence = Verbrannter Zaun
Frost Fence = Frostzaun
Redwood Fence = Mammutbaumzaun
Willow Fence = Weidenzaun
Healing Wood Fence = Lebensholzzaun
Palm Fence = Palmzaun
Banana Wood Fence = Bananenholzzaun
Mushroom Fence = Pilzzaun
Birch Fence = Birkenzaun
#fishing.lua
Raw Fish = Roher Fisch
Cooked Fish = Gekochter Fisch
Sashimi = Sashimi
Worm = Wurm
Fishing Rod = Angelrute
Baited Fishing Rod = Angelrute mit Köder
Inventory full, Fish Got Away! = Inventar voll, Fisch entkam!
#food.lua
Banana = Banane
Banana Dough = Bananenteig
Orange = Orange
Pine Nuts = Pinienkerne
Banana Loaf = Bananenbrot
Coconut = Kokosnuss
Coconut Slice = Kokosscheibe
Golden Apple = Goldener Apfel
Hearty Stew = Deftiger Eintopf
Bucket of Cactus Pulp = Eimer Kaktusmark
#gates.lua
Scorched Wood Fence Gate = Verbranntes Holzzauntor
Frost Wood Fence Gate = Frostholzzauntor
Redwood Fence Gate = Mammutbaumzauntor
Willow Wood Fence Gate = Weidenholztor
Healing Wood Fence Gate = Lebensholzzauntor
Palm Wood Fence Gate = Palmholzzauntor
Banana Wood Fence Gate = Bananenholzzauntor
Mushroom Trunk Fence Gate = Pilzstammzauntor
Birch Wood Fence Gate = Birkenholzzauntor
#init.lua
[MOD] Ethereal loaded = [MOD] Ethereal geladen
#leaves.lua
Willow Twig = Weidenrute
Redwood Leaves = Mammutbaumlaub
Orange Leaves = Orangenlaub
Banana Leaves = Bananenblätter
Healing Tree Leaves = Lebensbaumlaub
Palm Leaves = Palmenblätter
Birch Leaves = Birkenlaub
Frost Leaves = Frostlaub
Bamboo Leaves = Bambuslaub
Mushroom Cap = Pilzkappe
Mushroom Pore = Pilzpore
Bush = Busch
Bush #2 = Busch #2
Bush #3 = Busch #3
#mushroom.lua
Mushroom Soup = Pilzsuppe
#onion.lua
Wild Onion = Wilde Zwiebel
#plantlife.lua
Fire Flower = Feuerblume
Fire Dust = Feuerstaub
Vine = Weinrebe
Light String Vine = Leuchtschnurrebe
Fern = Farn
Fern Tubers = Farnsporenkapseln
Fiery Dry Shrub = Feuerroter vertrockneter Strauch
Snowy Grass = Verschneites Gras
Crystal Grass = Kristallgras
Crystal Moss = Kristallmoos
Mushroom Moss = Pilzmoos
Fiery Moss = Feuerrotes Moos
Gray Moss = Graues Moos
Green Moss = Grünes Moos
Red Illumishroom = Roter Leuchtpilz
Green Illumishroom = Grüner Leuchtpilz
Cyan Illumishroom = Türkiser Leuchtpilz
#sapling.lua
Bamboo Sprout = Bambussprosse
Willow Tree Sapling = Weidenbaumsetzling
Healing Tree Sapling = Lebensbaumsetzling
Apple Tree Sapling = Apfelbaumsetzling
Jungle Tree Sapling = Tropenbaumsetzling
Pine Tree Sapling = Piniensetzling
Big Tree Sapling = Großer-Baum-Setzling
Banana Tree Sapling = Bananensetzling
Frost Tree Sapling = Frostbaumsetzling
Mushroom Tree Sapling = Pilzbaumsetzling
Palm Tree Sapling = Palmensetzling
Redwood Tree Sapling = Mammutbaumsetzling
Orange Tree Sapling = Orangenbaumsetzling
Acacia Tree Sapling = Akaziensetzling
Birch Tree Sapling = Birkensetzling
Schematic not found = Schema nicht gefunden
#sealife.lua
Seaweed = Seetang
Blue Coral = Blaue Koralle
Orange Coral = Orange Koralle
Pink Coral = Rosa Koralle
Green Coral = Grüne Koralle
Sandy = Sandy
#stairs.lua
Crystal Block Stair = Kristallblocktreppe
Crystal Block Slab = Kristallblockplatte
Ice Brick Stair = Eisziegeltreppe
Ice Brick Slab = Eisziegelplatte
Snow Brick Stair = Schneeziegeltreppe
Snow Brick Slab = Schneeziegelplatte
Dry Dirt Stair = Vertrocknete Erdtreppe
Dry Dirt Slab = vertrocknete Erdplatte
Mushroom Trunk Stair = Pilzstammtreppe
Mushroom Trunk Slab = Pilzstammplatte
Mushroom Top Stair = Pilzkappentreppe
Mushroom Top Slab = Pilzkappenplatte
Frost Wood Stair = Frostholztreppe
Frost Wood Slab = Frostholzplatte
Healing Wood Stair = Lebensholztreppe
Healing Wood Slab = Lebensholzplatte
Palm Wood Stair = Palmholztreppe
Palm Wood Slab = Palmholzplatte
Birch Wood Stair = Birkenholztreppe
Birch Wood Slab = Birkenholzplatte
Banana Wood Stair = Bananenholztreppe
Banana Wood Slab = Bananenholzplatte
Willow Wood Stair = Weidenholztreppe
Willow Wood Slab = Weidenholzplatte
Redwood Stair = Mammutbaumtreppe
Redwood Slab = Mammutbaumplatte
Bamboo Stair = Bambustreppe
Bamboo Slab = Bambusplatte
Dry Dirt = Vertrocknete Erde
Mushroom Trunk = Pilzstamm
Mushroom Top = Pilzkappe
Healing Wood = Lebensholz
Redwood = Mammutbaum
#strawberry.lua
Strawberry = Erdbeere
#water.lua
Ice Brick = Eisziegel
Snow Brick = Schneeziegel
#wood.lua
Willow Trunk = Weidenstamm
Willow Wood = Weidenholz
Redwood Trunk = Mammutbaumstamm
Redwood Wood = Mammutbaumholz
Frost Tree = Frostbaum
Frost Wood = Frostholz
Healing Tree Trunk = Lebensbaumstamm
Healing Tree Wood = Lebensbaumholz
Palm Trunk = Palmstamm
Palm Wood = Palmholz
Banana Trunk = Bananenstamm
Banana Wood = Bananenholz
Scorched Tree = Verbrannter Baum
Mushroom = Pilz
Birch Trunk = Birkenstamm
Birch Wood = Birkenholz
Bamboo = Bambus

218
locale/template.txt Normal file
View File

@ -0,0 +1,218 @@
# Template for translations of ethereal mod
# last update: 2016/May/25
#bonemeal.lua
Bone =
Bone Meal =
#crystal.lua
Crystal Spike =
Crystal Ingot =
Crystal Block =
Crystal Sword =
Crystal Axe =
Crystal Pickaxe =
Crystal (soft touch) Shovel =
Crystal Gilly Staff =
#dirt.lua
Green Dirt =
Dried Dirt =
Bamboo Dirt =
Jungle Dirt =
Grove Dirt =
Prairie Dirt =
Cold Dirt =
Crystal Dirt =
Mushroom Dirt =
Fiery Dirt =
Gray Dirt =
Red Baked Clay =
Orange Baked Clay =
Grey Baked Clay =
Quicksand =
#extra.lua
Bamboo Floor =
Palm Wax =
Candle =
Bowl =
Stone Ladder =
Paper Wall =
Glo Stone =
Lump of Charcoal =
Staff of Light =
#fences.lua
Scorched Fence =
Frost Fence =
Redwood Fence =
Willow Fence =
Healing Wood Fence =
Palm Fence =
Banana Wood Fence =
Mushroom Fence =
Birch Fence =
#fishing.lua
Raw Fish =
Cooked Fish =
Sashimi =
Worm =
Fishing Rod =
Baited Fishing Rod =
Inventory full, Fish Got Away! =
#food.lua
Banana =
Banana Dough =
Orange =
Pine Nuts =
Banana Loaf =
Coconut =
Coconut Slice =
Golden Apple =
Hearty Stew =
Bucket of Cactus Pulp =
#gates.lua
Scorched Wood Fence Gate =
Frost Wood Fence Gate =
Redwood Fence Gate =
Willow Wood Fence Gate =
Healing Wood Fence Gate =
Palm Wood Fence Gate =
Banana Wood Fence Gate =
Mushroom Trunk Fence Gate =
Birch Wood Fence Gate =
#init.lua
[MOD] Ethereal loaded =
#leaves.lua
Willow Twig =
Redwood Leaves =
Orange Leaves =
Banana Leaves =
Healing Tree Leaves =
Palm Leaves =
Birch Leaves =
Frost Leaves =
Bamboo Leaves =
Mushroom Cap =
Mushroom Pore =
Bush =
Bush #2 =
Bush #3 =
#mushroom.lua
Mushroom Soup =
#onion.lua
Wild Onion =
#plantlife.lua
Fire Flower =
Fire Dust =
Vine =
Light String Vine =
Fern =
Fern Tubers =
Fiery Dry Shrub =
Snowy Grass =
Crystal Grass =
Crystal Moss =
Mushroom Moss =
Fiery Moss =
Gray Moss =
Green Moss =
Red Illumishroom =
Green Illumishroom =
Cyan Illumishroom =
#sapling.lua
Bamboo Sprout =
Willow Tree Sapling =
Healing Tree Sapling =
Apple Tree Sapling =
Jungle Tree Sapling =
Pine Tree Sapling =
Big Tree Sapling =
Banana Tree Sapling =
Frost Tree Sapling =
Mushroom Tree Sapling =
Palm Tree Sapling =
Redwood Tree Sapling =
Orange Tree Sapling =
Acacia Tree Sapling =
Birch Tree Sapling =
Schematic not found =
#sealife.lua
Seaweed =
Blue Coral =
Orange Coral =
Pink Coral =
Green Coral =
Sandy =
#stairs.lua
Crystal Block Stair =
Crystal Block Slab =
Ice Brick Stair =
Ice Brick Slab =
Snow Brick Stair =
Snow Brick Slab =
Dry Dirt Stair =
Dry Dirt Slab =
Mushroom Trunk Stair =
Mushroom Trunk Slab =
Mushroom Top Stair =
Mushroom Top Slab =
Frost Wood Stair =
Frost Wood Slab =
Healing Wood Stair =
Healing Wood Slab =
Palm Wood Stair =
Palm Wood Slab =
Birch Wood Stair =
Birch Wood Slab =
Banana Wood Stair =
Banana Wood Slab =
Willow Wood Stair =
Willow Wood Slab =
Redwood Stair =
Redwood Slab =
Bamboo Stair =
Bamboo Slab =
Dry Dirt =
Mushroom Trunk =
Mushroom Top =
Healing Wood =
Redwood =
#strawberry.lua
Strawberry =
#water.lua
Ice Brick =
Snow Brick =
#wood.lua
Willow Trunk =
Willow Wood =
Redwood Trunk =
Redwood Wood =
Frost Tree =
Frost Wood =
Healing Tree Trunk =
Healing Tree Wood =
Palm Trunk =
Palm Wood =
Banana Trunk =
Banana Wood =
Scorched Tree =
Mushroom =
Birch Trunk =
Birch Wood =
Bamboo =

112
sapling.lua Normal file
View File

@ -0,0 +1,112 @@
local S = redwood.intllib
-- Register Saplings
redwood.register_sapling = function(name, desc, texture, height)
minetest.register_node(name .. "_sapling", {
description = S(desc .. " Tree Sapling"),
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {texture .. ".png"},
inventory_image = texture .. ".png",
wield_image = texture .. ".png",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
},
groups = {
snappy = 2, dig_immediate = 3, flammable = 2,
redwood_sapling = 1, sapling = 1, attached_node = 1
},
sounds = default.node_sound_defaults(),
grown_height = height,
})
end
redwood.register_sapling("redwood:redwood", "Redwood", "redwood_sapling", 31)
redwood.add_tree = function (pos, ofx, ofy, ofz, schem)
-- check for schematic
if not schem then
print (S("Schematic not found"))
return
end
-- remove sapling and place schematic
minetest.swap_node(pos, {name = "air"})
minetest.place_schematic(
{x = pos.x - ofx, y = pos.y - ofy, z = pos.z - ofz},
schem, 0, nil, false)
end
local path = minetest.get_modpath("redwood").."/schematics/"
-- grow tree functions
function redwood.grow_redwood_tree(pos)
if math.random(1, 2) == 1 then
redwood.add_tree(pos, 9, 3, 9, path .. "redwood.mts") -- shinji
else
redwood.add_tree(pos, 8, 6, 8, path .. "redwood_tree.mts") -- iska
end
end
-- check if sapling has enough height room to grow
local function enough_height(pos, height)
local nod = minetest.line_of_sight(
{x = pos.x, y = pos.y + 1, z = pos.z},
{x = pos.x, y = pos.y + height, z = pos.z})
if not nod then
return false -- obstructed
else
return true -- can grow
end
end
redwood.grow_sapling = function (pos, node)
local under = minetest.get_node({
x = pos.x,
y = pos.y - 1,
z = pos.z
}).name
if not minetest.registered_nodes[node.name] then
return
end
local height = minetest.registered_nodes[node.name].grown_height
-- do we have enough height to grow sapling into tree?
if not height or not enough_height(pos, height) then
return
end
-- Check if Ethereal Sapling is growing on correct substrate
if node.name == "redwood:redwood_sapling" then
redwood.grow_redwood_tree(pos)
end
end
-- Grow saplings
minetest.register_abm({
label = "Redwood grow sapling",
nodenames = {"group:redwood_sapling"},
interval = 10,
chance = 50,
catch_up = false,
action = function(pos, node)
local light_level = minetest.get_node_light(pos)
if not light_level or light_level < 13 then
return
end
redwood.grow_sapling(pos, node)
end,
})

BIN
schematics/redwood.mts Normal file

Binary file not shown.

BIN
schematics/redwood_tree.mts Normal file

Binary file not shown.

BIN
textures/redwood_leaves.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

BIN
textures/redwood_trunk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

BIN
textures/redwood_wood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

31
wood.lua Normal file
View File

@ -0,0 +1,31 @@
local S = redwood.intllib
-- redwood trunk
minetest.register_node("redwood:redwood_trunk", {
description = S("Redwood Trunk"),
tiles = {
"redwood_trunk_top.png",
"redwood_trunk_top.png",
"redwood_trunk.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
-- redwood wood
minetest.register_node("redwood:redwood_wood", {
description = S("Redwood Wood"),
tiles = {"redwood_wood.png"},
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "redwood:redwood_wood 4",
recipe = {{"redwood:redwood_trunk"}},
})