Commit 09f5dac5 authored by Milan's avatar Milan
Browse files

solve mergeconflicts

parents 5c5d2b00 2c249619
# This is not the original ethereal mod. Things may be broken on your setup. Please use [the original](https://github.com/tenplus1/ethereal) ethereal mod!
......@@ -76,6 +76,7 @@ local crops = {
{"ethereal:strawberry_", 8},
{"ethereal:onion_", 5},
{"farming:barley_", 7},
{"farming:hemp_", 8},
}
-- check if sapling has enough height room to grow
......@@ -92,6 +93,25 @@ local function enough_height(pos, height)
end
end
-- moretrees specific function
local function more_tree(pos, object)
if type(object) == "table" and object.axiom then
-- grow L-system tree
minetest.remove_node(pos)
minetest.spawn_tree(pos, object)
elseif type(object) == "string" and minetest.registered_nodes[object] then
-- place node
minetest.set_node(pos, {name = object})
elseif type(object) == "function" then
-- function
object(pos)
end
end
-- growing routine
local function growth(pointed_thing)
......@@ -185,6 +205,41 @@ local function growth(pointed_thing)
elseif node.name == "ethereal:birch_sapling" then
ethereal.grow_birch_tree(pos)
-- grow moretree's sapling
elseif node.name == "moretrees:beech_sapling" then
more_tree(pos, moretrees.spawn_beech_object)
elseif node.name == "moretrees:apple_tree_sapling" then
more_tree(pos, moretrees.spawn_apple_tree_object)
elseif node.name == "moretrees:oak_sapling" then
more_tree(pos, moretrees.spawn_oak_object)
elseif node.name == "moretrees:sequoia_sapling" then
more_tree(pos, moretrees.spawn_sequoia_object)
elseif node.name == "moretrees:birch_sapling" then
--more_tree(pos, moretrees.spawn_birch_object)
moretrees.grow_birch(pos)
elseif node.name == "moretrees:palm_sapling" then
more_tree(pos, moretrees.spawn_palm_object)
elseif node.name == "moretrees:date_palm_sapling" then
more_tree(pos, moretrees.spawn_date_palm_object)
elseif node.name == "moretrees:spruce_sapling" then
--more_tree(pos, moretrees.spawn_spruce_object)
moretrees.grow_spruce(pos)
elseif node.name == "moretrees:cedar_sapling" then
more_tree(pos, moretrees.spawn_cedar_object)
elseif node.name == "moretrees:poplar_sapling" then
more_tree(pos, moretrees.spawn_poplar_object)
elseif node.name == "moretrees:willow_sapling" then
more_tree(pos, moretrees.spawn_willow_object)
elseif node.name == "moretrees:rubber_tree_sapling" then
more_tree(pos, moretrees.spawn_rubber_tree_object)
elseif node.name == "moretrees:fir_sapling" then
--more_tree(pos, moretrees.spawn_fir_object)
if minetest.find_node_near(pos, 1, {"default:snow"}) then
moretrees.grow_fir_snow(pos)
else
moretrees.grow_fir(pos)
end
-- grow default tree
elseif node.name == "default:sapling"
and enough_height(pos, 7) then
......
......@@ -13,11 +13,11 @@ minetest.register_node("ethereal:crystal_spike", {
sunlight_propagates = true,
walkable = false,
damage_per_second = 1,
groups = {cracky = 1, falling_node = 1, puts_out_fire = 1},
groups = {cracky = 1, falling_node = 1, puts_out_fire = 1, cools_lava = 1},
sounds = default.node_sound_glass_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
fixed = {-5 / 16, -0.5, -5 / 16, 5 / 16, 0.41, 5 / 16},
},
})
......@@ -50,7 +50,7 @@ minetest.register_node("ethereal:crystal_block", {
tiles = {"crystal_block.png"},
light_source = 9,
is_ground_content = false,
groups = {cracky = 1, level = 2, puts_out_fire = 1},
groups = {cracky = 1, level = 2, puts_out_fire = 1, cools_lava = 1},
sounds = default.node_sound_glass_defaults(),
})
......@@ -110,8 +110,8 @@ minetest.register_tool("ethereal:axe_crystal", {
groupcaps = {
choppy = {
times = {[1] = 2.00, [2] = 0.80, [3] = 0.40},
uses = 30,
maxlevel = 2
uses = 40,
maxlevel = 3
},
},
damage_groups = {fleshy = 7},
......@@ -152,7 +152,7 @@ minetest.register_tool("ethereal:pick_crystal", {
maxlevel = 3
},
},
damage_groups = {fleshy = 7},
damage_groups = {fleshy = 6},
},
sound = {breaks = "default_tool_breaks"},
})
......@@ -193,15 +193,20 @@ minetest.register_tool("ethereal:shovel_crystal", {
minetest.remove_node(pointed_thing.under)
nodeupdate(pos)
ethereal.check_falling(pos)
if minetest.setting_getbool("creative_mode") then
inv:add_item("main", {name = nn})
if not inv:contains_item("main", {name = nn}) then
inv:add_item("main", {name = nn})
end
else
if not minetest.setting_getbool("creative_mode") then
inv:add_item("main", {name = nn})
itemstack:add_wear(65535 / 100) -- 111 uses
end
minetest.sound_play("default_dirt_footstep", {pos = pos, gain = 0.35})
minetest.sound_play("default_dig_crumbly", {pos = pos, gain = 0.4})
return itemstack
end
......
......@@ -8,4 +8,6 @@ mobs_slimes
caverealms?
bakedclay?
moreblocks?
moretrees?
intllib?
lucky_block?
......@@ -4,7 +4,7 @@ local S = ethereal.intllib
-- override default dirt (to stop caves cutting away dirt)
minetest.override_item("default:dirt", {is_ground_content = ethereal.cavedirt})
-- green dirt
--[[ green dirt
minetest.register_node("ethereal:green_dirt", {
description = S("Green Dirt"),
tiles = {
......@@ -23,7 +23,8 @@ minetest.register_node("ethereal:green_dirt", {
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.25},
}),
})
})]]
minetest.register_alias("ethereal:green_dirt", "default:dirt_with_grass")
-- dry dirt
minetest.register_node("ethereal:dry_dirt", {
......@@ -68,7 +69,9 @@ for n = 1, #dirts do
wet = "farming:soil_wet"
},
drop = "default:dirt",
sounds = default.node_sound_dirt_defaults()
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.25},
}),
})
end
......@@ -107,8 +110,9 @@ local grass_spread = function(pos, node)
local positions, grasses = minetest.find_nodes_in_area(
{x = pos.x - 1, y = pos.y - 2, z = pos.z - 1},
{x = pos.x + 1, y = pos.y + 2, z = pos.z + 1},
{"group:ethereal_grass", "default:dirt_with_grass",
"default:dirt_with_dry_grass", "default:dirt_with_snow"})
-- {"group:ethereal_grass", "default:dirt_with_grass",
-- "default:dirt_with_dry_grass", "default:dirt_with_snow"})
dirts)
-- count new grass nodes
for n = 1, #dirts do
......@@ -159,7 +163,12 @@ local flower_spread = function(pos, node)
local pos0 = {x = pos.x - 4, y = pos.y - 2, z = pos.z - 4}
local pos1 = {x = pos.x + 4, y = pos.y + 2, z = pos.z + 4}
local num = #minetest.find_nodes_in_area_under_air(pos0, pos1, "group:flora")
local num = #minetest.find_nodes_in_area(pos0, pos1, "group:flora")
-- stop flowers spreading too much just below top of map block
if minetest.find_node_near(pos, 2, "ignore") then
return
end
if num > 3
and node.name == "ethereal:crystalgrass" then
......@@ -404,3 +413,16 @@ minetest.register_node("ethereal:quicksand2", {
groups = {crumbly = 3, sand = 1, liquid = 3, disable_jump = 1},
sounds = default.node_sound_sand_defaults(),
})
-- craft quicksand
minetest.register_craft({
output = "ethereal:quicksand2",
recipe = {
{"group:sand", "group:sand", "group:sand"},
{"group:sand", "group:water_bucket", "group:sand"},
{"group:sand", "group:sand", "group:sand"},
},
replacements = {
{"group:water_bucket", "bucket:bucket_empty"}
}
})
......@@ -42,6 +42,8 @@ minetest.register_craft({
}
})
if ethereal.xcraft == true then
-- X pattern craft recipes (5x 'a' in X pattern gives 5 of 'b')
local cheat = {
{"default:cobble", "default:gravel", 5},
......@@ -63,6 +65,8 @@ for n = 1, #cheat do
})
end
end -- END if
-- Paper (2x3 string = 4 paper)
minetest.register_craft({
output = "default:paper 4",
......@@ -112,7 +116,7 @@ minetest.register_node("ethereal:candle", {
sounds = default.node_sound_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 }
fixed = { -0.15, -0.5, -0.15, 0.15, 0, 0.15 }
},
})
......@@ -215,10 +219,9 @@ minetest.register_node("ethereal:glostone", {
})
minetest.register_craft({
type = "shapeless",
output = "ethereal:glostone",
recipe = {
{"default:torch", "default:stone", "dye:yellow"},
}
recipe = {"default:torch", "default:stone", "dye:yellow"}
})
-- Charcoal Lump
......
......@@ -71,14 +71,14 @@ minetest.register_craft({
})
-- default ethereal fish
local fish = {
ethereal.fish = {
{"ethereal:fish_raw"},
}
-- xanadu server additional fish
if minetest.get_modpath("xanadu") then
fish[2] = {"mobs:clownfish_raw"}
fish[3] = {"mobs:bluefish_raw"}
ethereal.fish[2] = {"mobs:clownfish_raw"}
ethereal.fish[3] = {"mobs:bluefish_raw"}
end
-- Fishing Rod (Baited)
......@@ -101,7 +101,7 @@ minetest.register_craftitem("ethereal:fishing_rod_baited", {
or node == "default:river_water_source")
and math.random(1, 100) < 5 then
local type = fish[math.random(1, #fish)][1]
local type = ethereal.fish[math.random(1, #ethereal.fish)][1]
local inv = user:get_inventory()
if inv:room_for_item("main", {name = type}) then
......
local S = ethereal.intllib
-- fix apples hanging in sky when no tree around
minetest.override_item("default:apple", {
drop = "default:apple",
})
-- Banana (Heals one heart when eaten)
minetest.register_node("ethereal:banana", {
description = S("Banana"),
drawtype = "torchlike",
visual_scale = 1.0,
tiles = {"banana_single.png"},
inventory_image = "banana_single.png",
wield_image = "banana_single.png",
......@@ -19,7 +13,7 @@ minetest.register_node("ethereal:banana", {
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2}
fixed = {-0.31, -0.5, -0.31, 0.31, 0.5, 0.31}
},
groups = {
fleshy = 3, dig_immediate = 3, flammable = 2,
......@@ -58,7 +52,6 @@ minetest.register_craft({
minetest.register_node("ethereal:orange", {
description = S("Orange"),
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"farming_orange.png"},
inventory_image = "farming_orange.png",
wield_image = "farming_orange.png",
......@@ -67,7 +60,7 @@ minetest.register_node("ethereal:orange", {
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2}
fixed = {-0.27, -0.37, -0.27, 0.27, 0.44, 0.27}
},
groups = {
fleshy = 3, dig_immediate = 3, flammable = 2,
......@@ -111,7 +104,7 @@ minetest.register_node("ethereal:coconut", {
wield_image = "moretrees_coconut.png",
selection_box = {
type = "fixed",
fixed = {-0.35, -0.35, -0.35, 0.35, 0.35, 0.35}
fixed = {-0.31, -0.43, -0.31, 0.31, 0.44, 0.31}
},
groups = {
snappy = 1, oddly_breakable_by_hand = 1, cracky = 1,
......@@ -133,7 +126,6 @@ minetest.register_craftitem("ethereal:coconut_slice", {
minetest.register_node("ethereal:golden_apple", {
description = S("Golden Apple"),
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"default_apple_gold.png"},
inventory_image = "default_apple_gold.png",
wield_image = "default_apple_gold.png",
......@@ -142,7 +134,7 @@ minetest.register_node("ethereal:golden_apple", {
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2}
fixed = {-0.2, -0.37, -0.2, 0.2, 0.31, 0.2}
},
groups = {
fleshy = 3, dig_immediate = 3,
......
--[[
Minetest Ethereal Mod (1st December 2016)
Minetest Ethereal Mod (1st March 2017)
Created by ChinChow
......@@ -8,14 +8,15 @@
]]
ethereal = {}
ethereal = {} -- DO NOT change settings below, use the settings.conf file
ethereal.version = "1.22"
ethereal.leaftype = 0 -- 0 for 2D plantlike, 1 for 3D allfaces
ethereal.leafwalk = true -- true for walkable leaves, false to fall through
ethereal.cavedirt = true -- caves chop through dirt when true
ethereal.torchdrop = true -- torches drop when touching water
ethereal.papyruswalk = true -- papyrus can be walked on
-- Set following to 1 to enable biome or 0 to disable
ethereal.lilywalk = true -- waterlilies can be walked on
ethereal.xcraft = true -- allow cheat crafts for cobble->gravel->dirt->sand, ice->snow, dry dirt->desert sand
ethereal.glacier = 1 -- Ice glaciers with snow
ethereal.bamboo = 1 -- Bamboo with sprouts
ethereal.mesa = 1 -- Mesa red and orange clay with giant redwood
......@@ -40,6 +41,18 @@ ethereal.savannah = 1 -- Dry yellow grass with acacia tree's
ethereal.fiery = 1 -- Red grass with lava craters
ethereal.sandclay = 1 -- Sand areas with clay underneath
ethereal.swamp = 1 -- Swamp areas with vines on tree's, mushrooms, lilly's and clay sand
ethereal.sealife = 1 -- Enable coral and seaweed
ethereal.reefs = 1 -- Enable new 0.4.15 coral reefs in default
local path = minetest.get_modpath("ethereal")
-- Load new settings if found
local input = io.open(path.."/settings.conf", "r")
if input then
dofile(path .. "/settings.conf")
input:close()
input = nil
end
-- Intllib
local S
......@@ -50,7 +63,8 @@ else
end
ethereal.intllib = S
local path = minetest.get_modpath("ethereal")
-- Falling node function
ethereal.check_falling = minetest.check_for_falling or nodeupdate
dofile(path .. "/plantlife.lua")
dofile(path .. "/mushroom.lua")
......@@ -58,8 +72,9 @@ dofile(path .. "/onion.lua")
dofile(path .. "/crystal.lua")
dofile(path .. "/water.lua")
dofile(path .. "/dirt.lua")
dofile(path .. "/leaves.lua")
dofile(path .. "/food.lua")
dofile(path .. "/wood.lua")
dofile(path .. "/leaves.lua")
dofile(path .. "/sapling.lua")
dofile(path .. "/strawberry.lua")
dofile(path .. "/fishing.lua")
......@@ -68,10 +83,17 @@ dofile(path .. "/sealife.lua")
dofile(path .. "/fences.lua")
dofile(path .. "/gates.lua")
dofile(path .. "/mapgen.lua")
dofile(path .. "/food.lua")
dofile(path .. "/bonemeal.lua")
dofile(path .. "/compatibility.lua")
dofile(path .. "/stairs.lua")
dofile(path .. "/lucky_block.lua")
-- Use bonemeal mod instead of ethereal's own if found
if minetest.get_modpath("bonemeal") then
minetest.register_alias("ethereal:bone", "bonemeal:bone")
minetest.register_alias("ethereal:bonemeal", "bonemeal:bonemeal")
else
dofile(path .. "/bonemeal.lua")
end
if minetest.get_modpath("xanadu") then
dofile(path .. "/plantpack.lua")
......
......@@ -11,7 +11,7 @@ end
-- default apple tree leaves
minetest.override_item("default:leaves", {
drawtype = leaftype,
visual_scale = 1.2,
visual_scale = 1.4,
inventory_image = "default_leaves.png",
wield_image = "default_leaves.png",
walkable = ethereal.leafwalk,
......@@ -28,7 +28,7 @@ minetest.override_item("default:leaves", {
-- default jungle tree leaves
minetest.override_item("default:jungleleaves", {
drawtype = leaftype,
visual_scale = 1.2,
visual_scale = 1.4,
inventory_image = "default_jungleleaves.png",
wield_image = "default_jungleleaves.png",
walkable = ethereal.leafwalk,
......@@ -45,7 +45,7 @@ minetest.override_item("default:jungleleaves", {
-- default pine tree leaves
minetest.override_item("default:pine_needles", {
drawtype = leaftype,
visual_scale = 1.2,
visual_scale = 1.4,
inventory_image = "default_pine_needles.png",
wield_image = "default_pine_needles.png",
walkable = ethereal.leafwalk,
......@@ -63,10 +63,9 @@ minetest.override_item("default:pine_needles", {
-- default acacia tree leaves
minetest.override_item("default:acacia_leaves", {
drawtype = leaftype,
-- tiles = {"moretrees_acacia_leaves.png"},
inventory_image = "default_acacia_leaves.png",
wield_image = "default_acacia_leaves.png",
visual_scale = 1.2,
visual_scale = 1.4,
walkable = ethereal.leafwalk,
drop = {
max_items = 1,
......@@ -84,7 +83,7 @@ minetest.override_item("default:aspen_leaves", {
drawtype = leaftype,
inventory_image = "default_aspen_leaves.png",
wield_image = "default_aspen_leaves.png",
visual_scale = 1.2,
visual_scale = 1.4,
walkable = ethereal.leafwalk,
drop = {
max_items = 1,
......@@ -105,7 +104,7 @@ minetest.register_node("ethereal:willow_twig", {
wield_image = "willow_twig.png",
paramtype = "light",
walkable = ethereal.leafwalk,
visual_scale = 1.2,
visual_scale = 1.4,
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
drop = {
......@@ -124,7 +123,7 @@ minetest.register_node("ethereal:willow_twig", {
minetest.register_node("ethereal:redwood_leaves", {
description = S("Redwood Leaves"),
drawtype = leaftype,
visual_scale = 1.2,
visual_scale = 1.4,
tiles = {"redwood_leaves.png"},
inventory_image = "redwood_leaves.png",
wield_image = "redwood_leaves.png",
......@@ -148,7 +147,7 @@ minetest.register_node("ethereal:redwood_leaves", {
minetest.register_node("ethereal:orange_leaves", {
description = S("Orange Leaves"),
drawtype = leaftype,
visual_scale = 1.2,
visual_scale = 1.4,
tiles = {"orange_leaves.png"},
inventory_image = "orange_leaves.png",
wield_image = "orange_leaves.png",
......@@ -172,7 +171,7 @@ minetest.register_node("ethereal:orange_leaves", {
minetest.register_node("ethereal:bananaleaves", {
description = S("Banana Leaves"),
drawtype = leaftype,
visual_scale = 1.2,
visual_scale = 1.4,
tiles = {"banana_leaf.png"},
inventory_image = "banana_leaf.png",
wield_image = "banana_leaf.png",
......@@ -196,7 +195,7 @@ minetest.register_node("ethereal:bananaleaves", {
minetest.register_node("ethereal:yellowleaves", {
description = S("Healing Tree Leaves"),
drawtype = leaftype,
visual_scale = 1.2,
visual_scale = 1.4,
tiles = {"yellow_leaves.png"},
inventory_image = "yellow_leaves.png",
wield_image = "yellow_leaves.png",
......@@ -223,7 +222,7 @@ minetest.register_node("ethereal:yellowleaves", {
minetest.register_node("ethereal:palmleaves", {
description = S("Palm Leaves"),
drawtype = leaftype,
visual_scale = 1.2,
visual_scale = 1.4,
tiles = {"moretrees_palm_leaves.png"},
inventory_image = "moretrees_palm_leaves.png",
wield_image = "moretrees_palm_leaves.png",
......@@ -247,7 +246,7 @@ minetest.register_node("ethereal:palmleaves", {
minetest.register_node("ethereal:birch_leaves", {
description = S("Birch Leaves"),
drawtype = leaftype,
visual_scale = 1.2,
visual_scale = 1.4,
tiles = {"moretrees_birch_leaves.png"},
inventory_image = "moretrees_birch_leaves.png",
wield_image = "moretrees_birch_leaves.png",
......@@ -271,7 +270,7 @@ minetest.register_node("ethereal:birch_leaves", {
minetest.register_node("ethereal:frost_leaves", {
description = S("Frost Leaves"),
drawtype = leaftype,
visual_scale = 1.2,
visual_scale = 1.4,
tiles = {"ethereal_frost_leaves.png"},
inventory_image = "ethereal_frost_leaves.png",
wield_image = "ethereal_frost_leaves.png",
......@@ -296,7 +295,7 @@ minetest.register_node("ethereal:frost_leaves", {
minetest.register_node("ethereal:bamboo_leaves", {
description = S("Bamboo Leaves"),
drawtype = leaftype,
visual_scale = 1.2,
visual_scale = 1.4,
tiles = {"bamboo_leaves.png"},
inventory_image = "bamboo_leaves.png",
wield_image = "bamboo_leaves.png",
......@@ -348,6 +347,12 @@ minetest.register_node("ethereal:mushroom_pore", {
sounds = default.node_sound_dirt_defaults(),
})
minetest.register_craft({
type = "fuel",
recipe = "ethereal:mushroom_pore",
burntime = 3,
})
-- hedge block
minetest.register_node("ethereal:bush", {
description = S("Bush"),
......@@ -366,6 +371,12 @@ minetest.register_craft({
}
})
minetest.register_craft({
type = "fuel",
recipe = "ethereal:bush",
burntime = 1,
})
-- bush block #2
minetest.register_node("ethereal:bush2", {
drawtype = "allfaces_optional",
......@@ -386,6 +397,12 @@ minetest.register_craft({
}
})
minetest.register_craft({
type = "fuel",
recipe = "ethereal:bush2",
burntime = 1,
})
-- bush block #3
minetest.register_node("ethereal:bush3", {
drawtype = "allfaces_optional",
......@@ -405,3 +422,68 @@ minetest.register_craft({
{"group:leaves", "group:leaves", "group:leaves"},
}
})
minetest.register_craft({
type = "fuel",
recipe = "ethereal:bush3",
burntime = 1,
})
-- compatibility check for new mt version with leafdecay function
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"},
radius = 3
})
default.register_leafdecay({
trunks = {"ethereal:willow_trunk"},
leaves = {"ethereal:willow_twig"},
radius = 3
})