diff --git a/README.md b/README.md index 6d7f8e2..8493d35 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,11 @@ Ethereal Mapgen mod for Minetest (works on all except v6) ## Changelog +### 1.28 + + - Added new Meditteranean biome with Lemon and Olive trees (thanks Felfa) + - Added Candied Lemon and Olive Oil items and recipe + ### 1.27 - Added Etherium ore and dust diff --git a/biomes.lua b/biomes.lua index fd39604..e0883b1 100644 --- a/biomes.lua +++ b/biomes.lua @@ -143,9 +143,6 @@ end add_biome("grayness", 2, 41, 15, 30, ethereal.grayness, nil, "ethereal:gray_dirt", 1, "default:dirt", 3) ---add_biome("grayness_ocean", -192, 1, 15, 30, ethereal.grayness, --- nil, tmp, 2, "default:sand", 2) - add_biome("grayness_ocean", -28, 1, 15, 30, ethereal.grayness, nil, tmp, 2, "default:sand", 2, "ethereal:blue_marble") @@ -190,6 +187,10 @@ add_biome("grove_ocean", -192, 2, 45, 35, ethereal.grove, nil, "default:sand", 1, "default:sand", 2) +add_biome("mediterranean", 3, 50, 20, 45, ethereal.mediterranean, + nil, "ethereal:grove_dirt", 1, "default:dirt", 3) + + add_biome("mushroom", 3, 50, 45, 55, ethereal.mushroom, nil, "ethereal:mushroom_dirt", 1, "default:dirt", 3) diff --git a/decor.lua b/decor.lua index f62789d..7512624 100644 --- a/decor.lua +++ b/decor.lua @@ -255,6 +255,10 @@ add_node({"ethereal:grove_dirt"}, 0.35, {"grove"}, 1, 100, {"default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5"}, nil, nil, nil, ethereal.grove) +add_node({"ethereal:grove_dirt"}, 0.35, {"mediterranean"}, 1, 100, + {"default:grass_2", "default:grass_3", "default:grass_4", + "default:grass_5"}, nil, nil, nil, ethereal.mediterranean) + add_node({"ethereal:bamboo_dirt"}, 0.35, {"bamboo"}, 1, 100, {"default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5"}, nil, nil, nil, ethereal.bamboo) diff --git a/food.lua b/food.lua index c4ddb51..0ae529a 100644 --- a/food.lua +++ b/food.lua @@ -272,3 +272,102 @@ minetest.register_craft({ }, }) end + + +-- Lemon +minetest.register_node("ethereal:lemon", { + description = S("Lemon"), + drawtype = "plantlike", + tiles = {"lemon.png"}, + inventory_image = "lemon_fruit.png", + wield_image = "lemon_fruit.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.27, -0.37, -0.27, 0.27, 0.44, 0.27} + }, + groups = { + food_lemon = 1, fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1 + }, + drop = "ethereal:lemon", + on_use = minetest.item_eat(3), + sounds = default.node_sound_leaves_defaults(), + after_place_node = function(pos, placer) + if placer:is_player() then + minetest.set_node(pos, {name = "ethereal:lemon", param2 = 1}) + end + end, +}) + +-- Candied Lemon +minetest.register_craftitem("ethereal:candied_lemon", { + description = S("Candied Lemon"), + inventory_image = "ethereal_candied_lemon.png", + wield_image = "ethereal_candied_lemon.png", + groups = {food_candied_lemon = 1}, + on_use = minetest.item_eat(5), +}) + +minetest.register_craft({ + type = "shapeless", + output = "ethereal:candied_lemon", + recipe = { + "farming:baking_tray", "ethereal:lemon", "group:food_sugar" + }, + replacements = { + {"farming:baking_tray", "farming:baking_tray"} + }, +}) + +-- Olive +minetest.register_node("ethereal:olive", { + description = S("Olive"), + drawtype = "plantlike", + tiles = {"olive.png"}, + inventory_image = "olive_fruit.png", + wield_image = "olive_fruit.png", + visual_scale = 0.2, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.5, -0.1, 0.1, -0.3, 0.1} + }, + groups = { + fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1 + }, + drop = "ethereal:olive", + on_use = minetest.item_eat(1), + sounds = default.node_sound_leaves_defaults(), + after_place_node = function(pos, placer) + if placer:is_player() then + minetest.set_node(pos, {name = "ethereal:olive", param2 = 1}) + end + end, +}) + +-- Olive Oil +minetest.register_craftitem("ethereal:olive_oil", { + description = S("Olive Oil"), + inventory_image = "ethereal_olive_oil.png", + wield_image = "ethereal_olive_oil.png", + groups = {food_oil = 1, food_olive_oil = 1, vessel = 1}, +}) + +minetest.register_craft({ + type = "shapeless", + output = "ethereal:olive_oil", + recipe = { + "farming:juicer", "vessels:glass_bottle", + "ethereal:olive", "ethereal:olive", "ethereal:olive", + "ethereal:olive", "ethereal:olive", "ethereal:olive" + }, + replacements = { + {"farming:juicer", "farming:juicer"} + }, +}) diff --git a/init.lua b/init.lua index 2f57ce5..c44415d 100644 --- a/init.lua +++ b/init.lua @@ -48,6 +48,7 @@ ethereal = { reefs = minetest.settings:get('ethereal.reefs') or 1, sakura = minetest.settings:get('ethereal.sakura') or 1, tundra = minetest.settings:get('ethereal.tundra') or 1, + mediterranean = minetest.settings:get('ethereal.mediterranean') or 1 } local path = minetest.get_modpath("ethereal") diff --git a/leaves.lua b/leaves.lua index a0f8902..af49b57 100644 --- a/leaves.lua +++ b/leaves.lua @@ -325,6 +325,52 @@ minetest.register_node("ethereal:sakura_leaves2", { after_place_node = default.after_place_leaves, }) +-- lemon tree leaves +minetest.register_node("ethereal:lemon_leaves", { + description = S("Lemon Tree Leaves"), + drawtype = leaftype, + visual_scale = leafscale, + tiles = {"lemon_leaves.png"}, + inventory_image = "lemon_leaves.png", + wield_image = "lemon_leaves.png", + paramtype = "light", + walkable = ethereal.leafwalk, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"ethereal:lemon_tree_sapling"}, rarity = 25}, + {items = {"ethereal:lemon_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- olive tree leaves +minetest.register_node("ethereal:olive_leaves", { + description = S("Olive Tree Leaves"), + drawtype = leaftype, + visual_scale = leafscale, + tiles = {"olive_leaves.png"}, + inventory_image = "olive_leaves.png", + wield_image = "olive_leaves.png", + paramtype = "light", + walkable = ethereal.leafwalk, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"ethereal:olive_tree_sapling"}, rarity = 25}, + {items = {"ethereal:olive_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + -- mushroom tops minetest.register_node("ethereal:mushroom", { description = S("Mushroom Cap"), @@ -446,8 +492,11 @@ if minetest.registered_nodes["default:dirt_with_rainforest_litter"] then default.register_leafdecay({ trunks = {"default:tree"}, leaves = { - "default:apple", "default:leaves", "ethereal:orange", - "ethereal:orange_leaves", "ethereal:vine"}, + "default:apple", "default:leaves", + "ethereal:orange", "ethereal:orange_leaves", + "ethereal:lemon", "ethereal:lemon_leaves", + "ethereal:vine" + }, radius = 3 }) @@ -505,6 +554,12 @@ default.register_leafdecay({ radius = 3 }) +default.register_leafdecay({ + trunks = {"ethereal:olive_trunk"}, + leaves = {"ethereal:olive_leaves", "ethereal:olive"}, + radius = 3 +}) + default.register_leafdecay({ trunks = {"ethereal:mushroom_trunk"}, leaves = {"ethereal:mushroom", "ethereal:mushroom_pore"}, diff --git a/license.txt b/license.txt index fec6f6a..161940a 100644 --- a/license.txt +++ b/license.txt @@ -19,3 +19,11 @@ 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. + + +Textures by Felfa: + olive*.png + lemon*.png + +Notice: Most texture authors are written inside code as comments, anything with no name +I have more than likely created myself :) diff --git a/lucky_block.lua b/lucky_block.lua index 5a70694..604c0d1 100644 --- a/lucky_block.lua +++ b/lucky_block.lua @@ -66,6 +66,8 @@ lucky_block:add_blocks({ {name = "ethereal:frost_tree_sapling", max = 10}, {name = "ethereal:sakura_sapling", max = 10}, {name = "ethereal:willow_sapling", max = 10}, + {name = "ethereal:lemon_tree_sapling", max = 10}, + {name = "ethereal:olive_tree_sapling", max = 10}, }}, {"flo", 5, {"ethereal:blue_marble_tile"}, 2}, {"dro", {"ethereal:blue_marble", "ethereal:blue_marble_tile"}, 8}, diff --git a/sapling.lua b/sapling.lua index 69e0201..e1ac952 100644 --- a/sapling.lua +++ b/sapling.lua @@ -61,6 +61,9 @@ register_sapling("ethereal:redwood", "Redwood", "redwood_sapling", 31) register_sapling("ethereal:orange_tree", "Orange", "orange_tree_sapling", 6) register_sapling("ethereal:birch", "Birch", "moretrees_birch_sapling", 7) register_sapling("ethereal:sakura", "Sakura", "ethereal_sakura_sapling", 10) +register_sapling("ethereal:lemon_tree", "Lemon", "lemon_tree_sapling", 7) +register_sapling("ethereal:olive_tree", "Olive", "olive_tree_sapling", 10) + local add_tree = function (pos, ofx, ofy, ofz, schem, replace) -- check for schematic @@ -137,6 +140,14 @@ function ethereal.grow_sakura_tree(pos) end end +function ethereal.grow_lemon_tree(pos) + add_tree(pos, 2, 0, 2, ethereal.lemontree) +end + +function ethereal.grow_olive_tree(pos) + add_tree(pos, 3, 0, 3, ethereal.olivetree) +end + -- check if sapling has enough height room to grow local enough_height = function(pos, height) @@ -218,6 +229,14 @@ local grow_sapling = function(pos, node) elseif node.name == "ethereal:sakura_sapling" and under == "ethereal:bamboo_dirt" then ethereal.grow_sakura_tree(pos) + + elseif node.name == "ethereal:olive_tree_sapling" + and under == "ethereal:grove_dirt" then + ethereal.grow_olive_tree(pos) + + elseif node.name == "ethereal:lemon_tree_sapling" + and under == "ethereal:grove_dirt" then + ethereal.grow_lemon_tree(pos) end end diff --git a/schematics/lemon_tree.lua b/schematics/lemon_tree.lua new file mode 100644 index 0000000..859161d --- /dev/null +++ b/schematics/lemon_tree.lua @@ -0,0 +1,65 @@ + +local _ = {name = "air", param1 = 0} +local L = {name = "ethereal:lemon_leaves", param1 = 255} +local l = {name = "ethereal:lemon_leaves", param1 = 127} +local T = {name = "default:tree", param1 = 255} +local e = {name = "ethereal:lemon", param1 = 100} + +ethereal.lemontree = { + + size = {x = 5, y = 8, z = 5}, + + yslice_prob = { + {ypos = 0, prob = 127}, + {ypos = 3, prob = 127}, + }, + + data = { + + _,_,_,_,_, + _,_,_,_,_, + _,_,_,_,_, + _,_,e,_,_, + _,L,L,L,e, + e,L,L,l,_, + _,l,L,L,_, + _,_,l,_,_, + + _,_,_,_,_, + _,_,_,_,_, + _,_,_,_,_, + _,L,L,l,_, + l,L,l,L,L, + L,l,L,L,L, + L,L,L,l,L, + _,L,L,L,_, + + _,_,T,_,_, + _,_,T,_,_, + _,_,T,_,_, + l,e,T,l,l, + L,L,T,L,l, + l,L,T,L,L, + L,L,L,l,L, + l,L,L,L,l, + + _,_,_,_,_, + _,_,_,_,_, + _,_,_,_,_, + _,L,L,L,_, + L,l,L,L,L, + L,L,L,L,L, + L,L,L,L,l, + _,l,L,L,_, + + _,_,_,_,_, + _,_,_,_,_, + _,_,_,_,_, + _,_,l,_,_, + e,L,L,l,_, + _,l,L,L,_, + _,L,L,L,e, + _,_,l,_,_, + + } +} diff --git a/schematics/olive_tree.lua b/schematics/olive_tree.lua new file mode 100644 index 0000000..fe6d672 --- /dev/null +++ b/schematics/olive_tree.lua @@ -0,0 +1,88 @@ + +local _ = {name = "air", param1 = 0} +local L = {name = "ethereal:olive_leaves", param1 = 255} +local T = {name = "ethereal:olive_trunk", param1 = 255} +local o = {name = "ethereal:olive", param1 = 150} + +ethereal.olivetree = { + + size = {x = 8, y = 9, z = 7}, + + + + data = { + + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,L,_,_,_,_,L,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,L,_,L,L,o,_, + L,T,L,L,o,L,T,L, + _,L,_,_,_,_,L,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + + _,_,_,T,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,L,T,L,_,T,L,_, + _,L,L,_,L,L,L,_, + _,_,_,L,L,_,_,_, + _,_,o,L,L,_,_,_, + _,_,_,_,_,_,_,_, + + _,_,_,T,T,_,_,_, + _,_,_,T,T,_,_,_, + _,_,_,T,T,_,_,_, + _,_,L,T,T,_,_,_, + _,o,L,T,T,T,L,_, + _,L,L,T,T,L,o,_, + _,_,L,T,T,L,_,_, + _,_,L,T,T,L,_,_, + _,_,_,L,L,_,_,_, + + _,_,_,_,T,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,L,_,_,_, + _,_,L,T,L,L,_,_, + _,_,L,L,T,L,_,_, + _,_,_,L,L,L,_,_, + _,_,L,L,L,_,_,_, + _,_,_,_,_,_,_,_, + + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,o,L,_,_,_,_, + _,L,T,L,L,o,_,_, + _,_,L,_,L,T,L,_, + _,_,o,_,_,L,_,_, + _,_,_,_,_,_,_,_, + + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + _,_,L,_,_,_,_,_, + _,_,_,_,_,L,_,_, + _,_,_,_,_,_,_,_, + _,_,_,_,_,_,_,_, + + + + } +} diff --git a/schems.lua b/schems.lua index 5a2651b..5221004 100644 --- a/schems.lua +++ b/schems.lua @@ -23,6 +23,8 @@ dofile(path .. "redwood_tree.lua") dofile(path .. "vinetree.lua") dofile(path .. "sakura.lua") dofile(path .. "igloo.lua") +dofile(path .. "lemon_tree.lua") +dofile(path .. "olive_tree.lua") -- helper function @@ -149,6 +151,14 @@ add_schem({"ethereal:bamboo_dirt"}, 0.08, {"bamboo"}, 1, 100, ethereal.bush, add_schem({"default:dirt_with_grass"}, 0.02, {"swamp"}, 1, 100, ethereal.vinetree, ethereal.swamp) +-- lemon tree +add_schem({"ethereal:grove_dirt"}, 0.002, {"mediterranean"}, 5, 50, + ethereal.lemontree, ethereal.mediterranean) + +-- olive tree +add_schem({"ethereal:grove_dirt"}, 0.002, {"mediterranean"}, 5, 35, + ethereal.olivetree, ethereal.mediterranean) + -- default large cactus if ethereal.desert == 1 then diff --git a/settings.conf_example b/settings.conf_example index 6b74a2a..83cf5fc 100644 --- a/settings.conf_example +++ b/settings.conf_example @@ -40,3 +40,4 @@ ethereal.swamp = 1 -- Swamp areas with vines on tree's, mushrooms, lilly's a ethereal.sealife = 1 -- Enable coral and seaweed ethereal.reefs = 1 -- Enable new coral reefs in default ethereal.sakura = 1 -- Enable sakura biomes with trees +ethereal.mediterranean = 1 -- Enable Mediterranean biome diff --git a/settingtypes.txt b/settingtypes.txt index 004943a..1cc37de 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -35,3 +35,4 @@ ethereal.sealife (Coral and Seaweed biome, 1 = Enable / 0 = Disable) int 1 ethereal.reefs (MT5 Coral biome, 1 = Enable / 0 = Disable) int 1 ethereal.sakura (Sakura biome, 1 = Enable / 0 = Disable) int 1 ethereal.tundra (Tundra biome, 1 = Enable / 0 = Disable) int 1 +ethereal.mediterranean (Mediterranean biome, 1 = Enable / 0 = Disable) int 1 diff --git a/stairs.lua b/stairs.lua index 790b569..22be62d 100644 --- a/stairs.lua +++ b/stairs.lua @@ -103,6 +103,13 @@ stairs.register_all("sakura_wood", "ethereal:sakura_wood", S("Sakura Wood"), default.node_sound_wood_defaults()) +stairs.register_all("olive_wood", "ethereal:olive_wood", + {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + {"olive_wood.png"}, + S("Olive Wood stair"), + S("Olive Wood Slab"), + default.node_sound_wood_defaults()) + -- Stairs Plus (in More Blocks) elseif minetest.global_exists("stairsplus") then @@ -221,6 +228,13 @@ stairsplus:register_all("ethereal", "sakura_wood", "ethereal:sakura_wood", { sounds = default.node_sound_wood_defaults(), }) +stairsplus:register_all("ethereal", "olive_wood", "ethereal:olive_wood", { + description = S("Olive"), + tiles = {"olive_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + -- Default Stairs else @@ -339,4 +353,12 @@ stairs.register_stair_and_slab("sakura_wood", "ethereal:sakura_wood", S("Sakura Wood Stair"), S("Sakura Wood Slab"), default.node_sound_wood_defaults()) + +stairs.register_stair_and_slab("olive_wood", "ethereal:olive_wood", + {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + {"olive_wood.png"}, + S("Olive Wood Stair"), + S("Olive Wood Slab"), + default.node_sound_wood_defaults()) + end diff --git a/textures/ethereal_candied_lemon.png b/textures/ethereal_candied_lemon.png new file mode 100644 index 0000000..6138b5b Binary files /dev/null and b/textures/ethereal_candied_lemon.png differ diff --git a/textures/ethereal_olive_oil.png b/textures/ethereal_olive_oil.png new file mode 100644 index 0000000..1b5931b Binary files /dev/null and b/textures/ethereal_olive_oil.png differ diff --git a/textures/lemon.png b/textures/lemon.png new file mode 100644 index 0000000..f13a31e Binary files /dev/null and b/textures/lemon.png differ diff --git a/textures/lemon_fruit.png b/textures/lemon_fruit.png new file mode 100644 index 0000000..45a1336 Binary files /dev/null and b/textures/lemon_fruit.png differ diff --git a/textures/lemon_leaves.png b/textures/lemon_leaves.png new file mode 100644 index 0000000..94c4c46 Binary files /dev/null and b/textures/lemon_leaves.png differ diff --git a/textures/lemon_tree_sapling.png b/textures/lemon_tree_sapling.png new file mode 100644 index 0000000..28b257a Binary files /dev/null and b/textures/lemon_tree_sapling.png differ diff --git a/textures/olive.png b/textures/olive.png new file mode 100644 index 0000000..d83c94f Binary files /dev/null and b/textures/olive.png differ diff --git a/textures/olive_fruit.png b/textures/olive_fruit.png new file mode 100644 index 0000000..1b038df Binary files /dev/null and b/textures/olive_fruit.png differ diff --git a/textures/olive_leaves.png b/textures/olive_leaves.png new file mode 100644 index 0000000..6f450c8 Binary files /dev/null and b/textures/olive_leaves.png differ diff --git a/textures/olive_tree_sapling.png b/textures/olive_tree_sapling.png new file mode 100644 index 0000000..1b7f0f4 Binary files /dev/null and b/textures/olive_tree_sapling.png differ diff --git a/textures/olive_trunk.png b/textures/olive_trunk.png new file mode 100644 index 0000000..4ac03d6 Binary files /dev/null and b/textures/olive_trunk.png differ diff --git a/textures/olive_trunk_top.png b/textures/olive_trunk_top.png new file mode 100644 index 0000000..bff6b7e Binary files /dev/null and b/textures/olive_trunk_top.png differ diff --git a/textures/olive_wood.png b/textures/olive_wood.png new file mode 100644 index 0000000..4fb173b Binary files /dev/null and b/textures/olive_wood.png differ diff --git a/wood.lua b/wood.lua index e955ade..37c53a9 100644 --- a/wood.lua +++ b/wood.lua @@ -288,3 +288,31 @@ minetest.register_craft({ recipe = "ethereal:bamboo", burntime = 1, }) + +-- olive trunk +minetest.register_node("ethereal:olive_trunk", { + description = S("Olive Trunk"), + tiles = { + "olive_trunk_top.png", + "olive_trunk_top.png", + "olive_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, +}) + +-- olive wood +minetest.register_node("ethereal:olive_wood", { + description = S("Olive Wood"), + tiles = {"olive_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 = "ethereal:olive_wood 4", + recipe = {{"ethereal:olive_trunk"}} +})