add wildlands, and some changes to mapgen
BIN
blends/character2.blend
Normal file
BIN
blends/character2.blend1
Normal file
@ -22,10 +22,27 @@ minetest.register_abm({
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"core:dirt"},
|
||||
neighbors = {"core:grass_wildland"},
|
||||
interval = 180,
|
||||
chance = 3,
|
||||
action = function(pos)
|
||||
pos.y = pos.y + 1
|
||||
if not minetest.get_node_light(pos) then
|
||||
return
|
||||
end
|
||||
if minetest.get_node_light(pos) > 9 then
|
||||
pos.y = pos.y - 1
|
||||
minetest.add_node(pos,{name="core:grass_wildland"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- grass decay
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"core:grass"},
|
||||
nodenames = {"core:grass", "core:grass_wildland"},
|
||||
interval = 120,
|
||||
chance = 2,
|
||||
action = function(pos)
|
||||
@ -54,7 +71,7 @@ minetest.register_abm({
|
||||
|
||||
if minetest.get_node_or_nil(pos).name ~= "core:snow" then
|
||||
pos.y = pos.y - 1
|
||||
minetest.add_node(pos,{name="core:dirt"})
|
||||
minetest.add_node(pos,{name="core:grass"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
@ -116,6 +133,24 @@ minetest.register_abm({
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"core:acacia_sapling"},
|
||||
interval = 80, --70
|
||||
chance = 3,
|
||||
action = function(pos, node)
|
||||
|
||||
local nu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
|
||||
local is_soil = minetest.get_item_group(nu, "soil")
|
||||
|
||||
if is_soil == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
minetest.remove_node({x=pos.x, y=pos.y, z=pos.z})
|
||||
mcore.create_acacia_tree(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"core:pine_sapling"},
|
||||
interval = 70, --70
|
||||
|
@ -27,6 +27,15 @@ minetest.register_node("core:grass", {
|
||||
sounds = mcore.sound_grass,
|
||||
})
|
||||
|
||||
minetest.register_node("core:grass_wildland", {
|
||||
tiles = {"core_grass_wild.png", "core_dirt.png", "core_dirt.png^core_grass_wild_side.png"},
|
||||
description = "Dirt with Grass",
|
||||
is_ground_content = true,
|
||||
drop = "core:dirt",
|
||||
groups = {crumbly=3, soil=1, solid=1},
|
||||
sounds = mcore.sound_grass,
|
||||
})
|
||||
|
||||
minetest.register_node("core:grasstest", {
|
||||
tiles = {"core_grass.png"},
|
||||
description = "Dirt with Grass",
|
||||
@ -221,8 +230,9 @@ minetest.register_node("core:ice", {
|
||||
tiles = {"core_ice.png"},
|
||||
is_ground_content = true,
|
||||
paramtype = "light",
|
||||
drawtype = "glasslike",
|
||||
groups = {cracky=2, puts_out_fire=1, solid=1},
|
||||
sounds = mcore.sound_glass;
|
||||
sounds = mcore.sound_glass,
|
||||
})
|
||||
|
||||
--
|
||||
@ -261,7 +271,7 @@ minetest.register_node("core:water_source", {
|
||||
aspect_h = 16,
|
||||
length = 2,
|
||||
},
|
||||
backface_culling = false,
|
||||
backface_culling = true,
|
||||
},
|
||||
},
|
||||
--alpha = 153,
|
||||
@ -289,7 +299,7 @@ minetest.register_node("core:water_flowing", {
|
||||
special_tiles = {
|
||||
{
|
||||
name = "core_water_flowing_animated.png",
|
||||
backface_culling = false,
|
||||
backface_culling = true,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
@ -731,7 +741,60 @@ minetest.register_node("core:cherry_sapling", {
|
||||
sounds = mcore.sound_plants,
|
||||
})
|
||||
|
||||
-- acacia
|
||||
|
||||
minetest.register_node("core:acacia_log", {
|
||||
description = "Acacia Log",
|
||||
tiles = {"core_acacia_log_top.png", "core_acacia_log_top.png", "core_acacia_log.png"},
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {tree=1, choppy=3, flammable=2, solid=1},
|
||||
on_place = mcore.sensible_facedir,
|
||||
sounds = mcore.sound_wood,
|
||||
})
|
||||
|
||||
minetest.register_node("core:acacia_log_grassy", {
|
||||
description = "Acacia Log (Grassy)",
|
||||
tiles = {"core_acacia_log_top.png", "core_acacia_log_top.png", "core_acacia_log.png^core_long_grass_wild_1.png"},
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {tree=1, choppy=3, flammable=2, solid=1, nodec=1},
|
||||
on_place = mcore.sensible_facedir,
|
||||
sounds = mcore.sound_wood,
|
||||
})
|
||||
|
||||
minetest.register_node("core:acacia_leaves", {
|
||||
description = "Acacia Leaves",
|
||||
tiles = {"core_acacia_leaves.png"},
|
||||
special_tiles = {"core_acacia_leaves.png"},
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
visual_scale = 1.3,
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {snappy=3, leafdecay=3, flammable=2},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {"core:acacia_sapling"},
|
||||
rarity = 16,
|
||||
},
|
||||
{
|
||||
items = {"core:acacia_leaves"},
|
||||
}
|
||||
}
|
||||
},
|
||||
after_place_node = mcore.after_place_leaves,
|
||||
sounds = mcore.sound_plants,
|
||||
})
|
||||
|
||||
minetest.register_node("core:acacia_planks", {
|
||||
description = "Acacia Planks",
|
||||
tiles = {"core_acacia_planks.png"},
|
||||
groups = {choppy=3, flammable=2, solid=1, planks=1},
|
||||
sounds = mcore.sound_wood,
|
||||
})
|
||||
|
||||
|
||||
-- cacti
|
||||
@ -775,10 +838,37 @@ minetest.register_node("core:grass_1", {
|
||||
|
||||
})
|
||||
|
||||
minetest.register_node("core:grass_wild_1", {
|
||||
description = "Wildlands Long Grass",
|
||||
tiles = {"core_long_grass_wild_1.png"},
|
||||
waving = 1,
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
paramtype2 = "meshoptions",
|
||||
visual_scale = 1.0,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
sunlight_propagates = true,
|
||||
groups = {attached_node=1, snappy=3},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
sounds = mcore.sound_plants,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local nname = "core:grass_wild_" .. math.random(1,3)
|
||||
local stack = ItemStack(nname)
|
||||
local ret = minetest.item_place_node(stack, placer, pointed_thing, mcore.options("cross", true, true, false))
|
||||
return ItemStack("core:grass_wild_1 "..itemstack:get_count() - (1 - ret:get_count()))
|
||||
end,
|
||||
|
||||
})
|
||||
|
||||
|
||||
for i=2, 3 do
|
||||
|
||||
minetest.register_node("core:grass_"..i, {
|
||||
description = "Long grass",
|
||||
description = "Long Grass",
|
||||
tiles = {"core_long_grass_"..i..".png"},
|
||||
waving = 1,
|
||||
drawtype = "plantlike",
|
||||
@ -796,6 +886,27 @@ for i=2, 3 do
|
||||
},
|
||||
sounds = mcore.sound_plants,
|
||||
})
|
||||
|
||||
minetest.register_node("core:grass_wild_"..i, {
|
||||
description = "Wildlands Long Grass",
|
||||
tiles = {"core_long_grass_wild_"..i..".png"},
|
||||
waving = 1,
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
paramtype2 = "meshoptions",
|
||||
visual_scale = 1.0,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "core:grass_wild_1",
|
||||
sunlight_propagates = true,
|
||||
groups = {not_in_creative_inventory=1, attached_node=1, snappy=3},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
sounds = mcore.sound_plants,
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
-- plants
|
||||
|
@ -347,6 +347,22 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "core:acacia_planks 6",
|
||||
recipe = {
|
||||
"core:acacia_log",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "core:acacia_planks 6",
|
||||
recipe = {
|
||||
"core:acacia_log_grassy",
|
||||
},
|
||||
})
|
||||
|
||||
-- craft some grassy versions of logs
|
||||
|
||||
minetest.register_craft({
|
||||
|
@ -90,6 +90,14 @@ minetest.register_node("core:mg_cherry_sapling", {
|
||||
groups = {not_in_creative_inventory=1},
|
||||
})
|
||||
|
||||
minetest.register_node("core:mg_acacia_sapling", {
|
||||
description = "Impossible to get node.",
|
||||
drawtype = "airlike",
|
||||
paramtype = "light",
|
||||
--tiles = {"xfences_space.png"},
|
||||
groups = {not_in_creative_inventory=1},
|
||||
})
|
||||
|
||||
-- vmanip on generate
|
||||
|
||||
local c_mg_birch_sap = minetest.get_content_id("core:mg_birch_sapling")
|
||||
@ -99,6 +107,7 @@ local c_mg_pine_sap = minetest.get_content_id("core:mg_pine_sapling")
|
||||
local c_mg_pine_snowy_sap = minetest.get_content_id("core:mg_pine_snowy_sapling")
|
||||
local c_mg_grass = minetest.get_content_id("core:mg_grass")
|
||||
local c_mg_grass_snowy = minetest.get_content_id("core:mg_grass_snowy")
|
||||
local c_mg_aca_sap = minetest.get_content_id("core:mg_acacia_sapling")
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local timer = os.clock()
|
||||
@ -131,6 +140,11 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
elseif content_id == c_mg_pine_snowy_sap then
|
||||
mcore.grow_pine({x=x, y=y, z=z}, true)
|
||||
trees_grown = trees_grown + 1
|
||||
|
||||
elseif content_id == c_mg_aca_sap then
|
||||
mcore.create_acacia_tree({x=x, y=y, z=z})
|
||||
trees_grown = trees_grown + 1
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -355,6 +369,248 @@ local function add_trunk_and_leaves(data, a, pos, tree_cid, leaves_cid,
|
||||
end
|
||||
end
|
||||
|
||||
function mcore.create_acacia_tree(pos)
|
||||
|
||||
local c_air = minetest.get_content_id("air")
|
||||
local c_dirt = minetest.get_content_id("core:dirt")
|
||||
local c_leaves = minetest.get_content_id("core:acacia_leaves")
|
||||
local c_trunk = minetest.get_content_id("core:acacia_log")
|
||||
local c_trunk_grassy = minetest.get_content_id("core:acacia_log_grassy")
|
||||
|
||||
local x2, y2, z2 = pos.x, pos.y, pos.z
|
||||
|
||||
local mid_point = math.random(4,6)
|
||||
|
||||
local vm = minetest.get_voxel_manip()
|
||||
|
||||
local minp, maxp = vm:read_from_map(
|
||||
{x = pos.x - 5, y = pos.y, z = pos.z - 5},
|
||||
{x = pos.x + 5, y = pos.y + mid_point*2 + 1, z = pos.z + 5}
|
||||
)
|
||||
|
||||
local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
|
||||
local data = vm:get_data()
|
||||
|
||||
local tree_model = math.random(1,3) -- three models currently.
|
||||
|
||||
for i=0, mid_point-1 do
|
||||
|
||||
local vi = a:index(x2, y2 + i, z2)
|
||||
|
||||
if i == 0 then
|
||||
|
||||
data[vi] = c_trunk_grassy
|
||||
|
||||
elseif data[vi] == c_air or data[vi] == c_ignore or data[vi] == c_leaves then
|
||||
|
||||
data[vi] = c_trunk
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if tree_model == 1 then
|
||||
|
||||
-- lets make the tree fork on the x-axis since the sun goes east to west;
|
||||
|
||||
local h_rand = math.random(0,1)
|
||||
|
||||
local vi = a:index(x2 - 1, y2 + math.floor((mid_point - h_rand) / 2), z2)
|
||||
data[vi] = c_trunk
|
||||
|
||||
vi = a:index(x2 - 2, (y2 + 1) + math.floor((mid_point - h_rand) / 2), z2)
|
||||
data[vi] = c_trunk
|
||||
|
||||
vi = a:index(x2 + 1, y2 + mid_point, z2)
|
||||
data[vi] = c_trunk
|
||||
|
||||
vi = a:index(x2 + 2, y2 + mid_point + 1, z2)
|
||||
data[vi] = c_trunk
|
||||
|
||||
vi = nil
|
||||
|
||||
-- leaf me alone
|
||||
|
||||
for xl=-2, 2 do -- top part of the top fork
|
||||
|
||||
for zl=-2, 2 do
|
||||
|
||||
local vi = a:index((x2 + 2) + xl, (y2 + mid_point) + 2, z2 + zl)
|
||||
|
||||
if xl == -2 and zl == -2 then
|
||||
elseif xl == -2 and zl == 2 then
|
||||
elseif xl == 2 and zl == -2 then
|
||||
elseif xl == 2 and zl == 2 then
|
||||
elseif data[vi] == c_air then
|
||||
if math.random (1,100) < 85 then
|
||||
data[vi] = c_leaves
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
for xl=-3, 3 do -- second part of the top fork
|
||||
|
||||
for zl=-3, 3 do
|
||||
|
||||
local vi = a:index((x2 + 2) + xl, (y2 + mid_point) + 1, z2 + zl)
|
||||
|
||||
if xl == -3 and zl == -3 then
|
||||
elseif xl == -3 and zl == 3 then
|
||||
elseif xl == 3 and zl == -3 then
|
||||
elseif xl == 3 and zl == 3 then
|
||||
elseif data[vi] == c_air then
|
||||
if math.random (1,100) < 85 then
|
||||
data[vi] = c_leaves
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
for xl=-2, 2 do -- top part of the lower fork
|
||||
|
||||
for zl=-2, 2 do
|
||||
|
||||
local vi = a:index((x2 - 2) + xl, (y2 + 2) + math.floor((mid_point - h_rand) / 2), z2 + zl)
|
||||
|
||||
if xl == -2 and zl == -2 then
|
||||
elseif xl == -2 and zl == 2 then
|
||||
elseif xl == 2 and zl == -2 then
|
||||
elseif xl == 2 and zl == 2 then
|
||||
elseif data[vi] == c_air then
|
||||
if math.random (1,100) < 85 then
|
||||
data[vi] = c_leaves
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
for xl=-3, 3 do -- lower part of the bottom fork
|
||||
|
||||
for zl=-3, 3 do
|
||||
|
||||
local vi = a:index((x2 - 2) + xl, (y2 + 1) + math.floor((mid_point - h_rand) / 2), z2 + zl)
|
||||
|
||||
if xl == -3 and zl == -3 then
|
||||
elseif xl == -3 and zl == 3 then
|
||||
elseif xl == 3 and zl == -3 then
|
||||
elseif xl == 3 and zl == 3 then
|
||||
elseif data[vi] == c_air then
|
||||
if math.random (1,100) < 85 then
|
||||
data[vi] = c_leaves
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
elseif tree_model == 2 then -- simple oak like tree
|
||||
|
||||
for xl=-2, 2 do -- top part
|
||||
|
||||
for zl=-2, 2 do
|
||||
|
||||
local vi = a:index(x2 + xl, y2 + mid_point + 1, z2 + zl)
|
||||
|
||||
if xl == -2 and zl == -2 then
|
||||
elseif xl == -2 and zl == 2 then
|
||||
elseif xl == 2 and zl == -2 then
|
||||
elseif xl == 2 and zl == 2 then
|
||||
elseif data[vi] == c_air then
|
||||
if math.random (1,100) < 85 then
|
||||
data[vi] = c_leaves
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
for xl=-3, 3 do -- lower part
|
||||
|
||||
for zl=-3, 3 do
|
||||
|
||||
local vi = a:index(x2 + xl, y2 + mid_point, z2 + zl)
|
||||
|
||||
if xl == -3 and zl == -3 then
|
||||
elseif xl == -3 and zl == 3 then
|
||||
elseif xl == 3 and zl == -3 then
|
||||
elseif xl == 3 and zl == 3 then
|
||||
elseif data[vi] == c_air then
|
||||
if math.random (1,100) < 85 then
|
||||
data[vi] = c_leaves
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
elseif tree_model == 3 then
|
||||
|
||||
local vi = a:index(x2 - 1, y2 + mid_point, z2)
|
||||
data[vi] = c_trunk
|
||||
|
||||
vi = a:index(x2 - 2, y2 + mid_point + 1, z2)
|
||||
data[vi] = c_trunk
|
||||
|
||||
for xl=-2, 2 do -- top part of the top fork
|
||||
|
||||
for zl=-2, 2 do
|
||||
|
||||
local vi = a:index((x2 - 2) + xl, (y2 + mid_point) + 2, z2 + zl)
|
||||
|
||||
if xl == -2 and zl == -2 then
|
||||
elseif xl == -2 and zl == 2 then
|
||||
elseif xl == 2 and zl == -2 then
|
||||
elseif xl == 2 and zl == 2 then
|
||||
elseif data[vi] == c_air then
|
||||
if math.random (1,100) < 85 then
|
||||
data[vi] = c_leaves
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
for xl=-3, 3 do -- second part of the top fork
|
||||
|
||||
for zl=-3, 3 do
|
||||
|
||||
local vi = a:index((x2 - 2) + xl, (y2 + mid_point) + 1, z2 + zl)
|
||||
|
||||
if xl == -3 and zl == -3 then
|
||||
elseif xl == -3 and zl == 3 then
|
||||
elseif xl == 3 and zl == -3 then
|
||||
elseif xl == 3 and zl == 3 then
|
||||
elseif data[vi] == c_air then
|
||||
if math.random (1,100) < 85 then
|
||||
data[vi] = c_leaves
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
vm:set_data(data)
|
||||
vm:calc_lighting()
|
||||
vm:write_to_map()
|
||||
vm:update_map()
|
||||
|
||||
end
|
||||
|
||||
|
||||
local function place_leaves_on_ground(pos, chance, fallen_leaves_node)
|
||||
|
||||
local x2, y2, z2 = pos.x, pos.y, pos.z
|
||||
@ -433,6 +689,9 @@ minetest.register_biome({
|
||||
y_min = 1,
|
||||
y_max = 120,
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
|
||||
@ -451,6 +710,9 @@ minetest.register_biome({
|
||||
y_min = 4,
|
||||
y_max = 80,
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
heat_point = 40,
|
||||
humidity_point = 55,
|
||||
|
||||
@ -458,9 +720,9 @@ minetest.register_biome({
|
||||
|
||||
minetest.register_biome({
|
||||
|
||||
name = "plains_bamboo_forest",
|
||||
name = "wildlands",
|
||||
|
||||
node_top = "core:grass",
|
||||
node_top = "core:grass_wildland",
|
||||
depth_top = 1,
|
||||
|
||||
node_filler = "core:dirt",
|
||||
@ -469,6 +731,9 @@ minetest.register_biome({
|
||||
y_min = 4,
|
||||
y_max = 120,
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
heat_point = 60,
|
||||
humidity_point = 75,
|
||||
|
||||
@ -488,6 +753,9 @@ minetest.register_biome({
|
||||
y_min = 0,
|
||||
y_max = 4,
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
heat_point = 45,
|
||||
humidity_point = 45,
|
||||
|
||||
@ -508,6 +776,12 @@ minetest.register_biome({
|
||||
y_min = 0,
|
||||
y_max = 4,
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
node_water_top = "core:ice",
|
||||
depth_water_top = 1,
|
||||
|
||||
heat_point = 10,
|
||||
humidity_point = 55,
|
||||
|
||||
@ -525,14 +799,43 @@ minetest.register_biome({
|
||||
node_filler = "core:dirt",
|
||||
depth_filler = 3,
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
node_water_top = "core:ice",
|
||||
depth_water_top = 1,
|
||||
|
||||
y_min = 4,
|
||||
y_max = 300,
|
||||
y_max = 150,
|
||||
|
||||
heat_point = 10,
|
||||
humidity_point = 55,
|
||||
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
|
||||
name = "snowy_mountain",
|
||||
|
||||
node_dust = "core:snow",
|
||||
|
||||
node_top = "core:snowblock",
|
||||
depth_top = 1,
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
node_water_top = "core:ice",
|
||||
depth_water_top = 1,
|
||||
|
||||
y_min = 150,
|
||||
y_max = 1000,
|
||||
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
|
||||
name = "snowy_forest",
|
||||
@ -546,7 +849,13 @@ minetest.register_biome({
|
||||
depth_filler = 3,
|
||||
|
||||
y_min = 4,
|
||||
y_max = 200,
|
||||
y_max = 150,
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
node_water_top = "core:ice",
|
||||
depth_water_top = 1,
|
||||
|
||||
heat_point = 25,
|
||||
humidity_point = 75,
|
||||
@ -567,8 +876,11 @@ minetest.register_biome({
|
||||
|
||||
node_stone = "core:sandstone",
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
y_min = 4,
|
||||
y_max = 150,
|
||||
y_max = 1000,
|
||||
|
||||
heat_point = 75,
|
||||
humidity_point = 25,
|
||||
@ -585,6 +897,9 @@ minetest.register_biome({
|
||||
node_filler = "core:sand",
|
||||
depth_filler = 3,
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
y_min = 0,
|
||||
y_max = 4,
|
||||
|
||||
@ -603,6 +918,9 @@ minetest.register_biome({
|
||||
node_filler = "core:sandstone",
|
||||
depth_filler = 3,
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
y_min = 4,
|
||||
y_max = 120,
|
||||
|
||||
@ -615,18 +933,19 @@ minetest.register_biome({
|
||||
|
||||
minetest.register_biome({
|
||||
name = "ocean",
|
||||
--node_dust = "",
|
||||
|
||||
node_top = "core:sand",
|
||||
depth_top = 1,
|
||||
|
||||
node_filler = "core:sand",
|
||||
depth_filler = 3,
|
||||
--node_stone = "",
|
||||
--node_water_top = "",
|
||||
--depth_water_top = ,
|
||||
--node_water = "",
|
||||
--node_river_water = "",
|
||||
|
||||
node_water = "core:water_source",
|
||||
node_river_water = "core:water_source",
|
||||
|
||||
y_min = -112,
|
||||
y_max = 0,
|
||||
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
})
|
||||
@ -637,8 +956,8 @@ minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:grass_snow",
|
||||
decoration = {"core:mg_pine_snowy_sapling"},
|
||||
sidelen = 8,
|
||||
fill_ratio = 0.025,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.01,
|
||||
biomes = {"snowy_forest"},
|
||||
height = 1,
|
||||
})
|
||||
@ -647,8 +966,8 @@ minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:grass",
|
||||
decoration = {"core:mg_oak_sapling"},
|
||||
sidelen = 8,
|
||||
fill_ratio = 0.012,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.009,
|
||||
biomes = {"plains_forest"},
|
||||
height = 1,
|
||||
})
|
||||
@ -657,8 +976,8 @@ minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:grass",
|
||||
decoration = {"core:mg_birch_sapling"},
|
||||
sidelen = 8,
|
||||
fill_ratio = 0.003,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.007,
|
||||
biomes = {"plains_forest"},
|
||||
height = 1,
|
||||
})
|
||||
@ -667,27 +986,17 @@ minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:grass",
|
||||
decoration = {"core:mg_cherry_sapling"},
|
||||
sidelen = 8,
|
||||
fill_ratio = 0.002,
|
||||
biomes = {"plains_forest"},
|
||||
height = 1,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:grass",
|
||||
decoration = {"core:mg_birch_sapling"},
|
||||
sidelen = 4,
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.001,
|
||||
biomes = {"plains"},
|
||||
biomes = {"plains_forest"},
|
||||
height = 1,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:grass",
|
||||
decoration = {"core:mg_cherry_sapling"},
|
||||
sidelen = 4,
|
||||
decoration = {"core:mg_oak_sapling", "core:mg_cherry_sapling", "core:mg_birch_sapling"},
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.0001,
|
||||
biomes = {"plains"},
|
||||
height = 1,
|
||||
@ -696,53 +1005,31 @@ minetest.register_decoration({
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:grass",
|
||||
decoration = {"core:mg_oak_sapling"},
|
||||
sidelen = 4,
|
||||
fill_ratio = 0.0003,
|
||||
biomes = {"plains"},
|
||||
height = 1,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:grass",
|
||||
decoration = {"core:bamboo"},
|
||||
decoration = {"core:grass_1", "core:grass_2", "core:grass_3"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.2,
|
||||
biomes = {"plains_bamboo_forest"},
|
||||
height = 2,
|
||||
y_max = 5,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:grass",
|
||||
decoration = {"core:grass_1"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.006,
|
||||
biomes = {"plains", "plains_forest", "plains_floral", "plains_bamboo_forest"},
|
||||
biomes = {"plains", "plains_forest", "plains_floral"},
|
||||
height = 1,
|
||||
param2 = mcore.options("cross", true, true, false),
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:grass",
|
||||
decoration = {"core:grass_2"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.06,
|
||||
biomes = {"plains", "plains_forest", "plains_floral", "plains_bamboo_forest"},
|
||||
place_on = "core:grass_wildland",
|
||||
decoration = {"core:mg_acacia_sapling"},
|
||||
sidelen = 40,
|
||||
fill_ratio = 0.0002,
|
||||
biomes = {"wildlands"},
|
||||
height = 1,
|
||||
param2 = mcore.options("cross", true, true, false),
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:grass",
|
||||
decoration = {"core:grass_3"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.06,
|
||||
biomes = {"plains", "plains_forest", "plains_floral", "plains_bamboo_forest"},
|
||||
place_on = "core:grass_wildland",
|
||||
decoration = {"core:grass_wild_1", "core:grass_wild_2", "core:grass_wild_3"},
|
||||
sidelen = 20,
|
||||
fill_ratio = 0.002,
|
||||
biomes = {"wildlands"},
|
||||
height = 1,
|
||||
param2 = mcore.options("cross", true, true, false),
|
||||
})
|
||||
@ -754,8 +1041,8 @@ minetest.register_decoration({
|
||||
place_on = "core:grass",
|
||||
decoration = {"plants:daisy"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.12,
|
||||
biomes = {"plains", "plains_forest", "plains_floral", "plains_bamboo_forest"},
|
||||
fill_ratio = 0.02,
|
||||
biomes = {"plains", "plains_floral"},
|
||||
height = 1,
|
||||
})
|
||||
|
||||
@ -765,8 +1052,8 @@ minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "core:sand",
|
||||
decoration = {"core:cactus"},
|
||||
sidelen = 8,
|
||||
fill_ratio = 0.004,
|
||||
sidelen = 20,
|
||||
fill_ratio = 0.0004,
|
||||
biomes = {"desert", "desert_cacti_forest"},
|
||||
height = 3,
|
||||
y_max = 4,
|
||||
|
16419
mods/core/models/character1.x
Normal file
BIN
mods/core/models/character_ext.b3d
Normal file
@ -154,7 +154,7 @@ minetest.register_on_joinplayer(function(player)
|
||||
visual_size = {x=1, y=1},
|
||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.77, 0.3},
|
||||
stepheight = 0.6,
|
||||
eye_height = 1.64
|
||||
eye_height = 1.64,
|
||||
})
|
||||
end)
|
||||
|
||||
|
BIN
mods/core/textures/core_acacia_leaves.png
Normal file
After Width: | Height: | Size: 469 B |
BIN
mods/core/textures/core_acacia_log.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
mods/core/textures/core_acacia_log_top.png
Normal file
After Width: | Height: | Size: 538 B |
BIN
mods/core/textures/core_acacia_planks.png
Normal file
After Width: | Height: | Size: 296 B |
BIN
mods/core/textures/core_acacia_sapling.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
mods/core/textures/core_grass_wild.png
Normal file
After Width: | Height: | Size: 342 B |
BIN
mods/core/textures/core_grass_wild_side.png
Normal file
After Width: | Height: | Size: 497 B |
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 256 B |
BIN
mods/core/textures/core_long_grass_wild_1.png
Normal file
After Width: | Height: | Size: 312 B |
BIN
mods/core/textures/core_long_grass_wild_2.png
Normal file
After Width: | Height: | Size: 326 B |
BIN
mods/core/textures/core_long_grass_wild_3.png
Normal file
After Width: | Height: | Size: 279 B |
@ -359,6 +359,14 @@ minetest.register_craftitem("core:clay_lump", {
|
||||
description = "Clay Lump",
|
||||
inventory_image = "core_clay_lump.png",
|
||||
wield_image = "core_clay_lump.png",
|
||||
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
|
||||
mcore.create_acacia_tree(pointed_thing.under)
|
||||
|
||||
return itemstack
|
||||
|
||||
end
|
||||
})
|
||||
|
||||
-- wood tier
|
||||
|
@ -4,7 +4,7 @@ local function register_plant(name, min, max, spawnby, num)
|
||||
deco_type = "simple",
|
||||
place_on = {"core:grass"},
|
||||
param2=mcore.options("croplike", true, true, false),
|
||||
sidelen = 16,
|
||||
sidelen = 80,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.006,
|
||||
|
@ -74,9 +74,9 @@ function hudclock.update_calendar()
|
||||
-- print (totalyears)
|
||||
|
||||
hudclock.day = totaldays
|
||||
hudclock.month = totalmonths
|
||||
hudclock.month = 1--totalmonths
|
||||
hudclock.year = totalyears
|
||||
minetest.after(30, hudclock.update_calendar)
|
||||
--minetest.after(30, hudclock.update_calendar)
|
||||
|
||||
print ("[Hudclock] Recalculating calendar.\n[Hudclock] The date is: " .. hudclock.day .. " / " .. hudclock.month .. " / " .. hudclock.year)
|
||||
end
|
||||
@ -105,7 +105,7 @@ minetest.register_chatcommand("yeartest", {
|
||||
return false, "You are not allowed to control time, you shitlord. \n \n This incident WILL be reported."
|
||||
end
|
||||
|
||||
hudclock.year = param
|
||||
hudclock.month = tonumber(param)
|
||||
|
||||
return true, "Current year updated."
|
||||
end,
|
||||
|
@ -1 +1,2 @@
|
||||
atmos
|
||||
hudclock
|
@ -30,9 +30,8 @@ local np_humid = {
|
||||
|
||||
local nobj_temp = nil
|
||||
local nobj_humid = nil
|
||||
local nobj_prec = nil
|
||||
|
||||
local function player_env_data(player)
|
||||
function hudinfo.player_env_data(player)
|
||||
|
||||
local pos = player:get_pos()
|
||||
|
||||
@ -90,7 +89,7 @@ local function player_env_data(player)
|
||||
|
||||
some notes on temparature scaling in Solar Plains:
|
||||
|
||||
temparature grading goes from 10 (-20C) to 75 (45C) 50 sits at a cool 20C
|
||||
temparature grading goes from 10 (-25C) to 75 (40C) 50 sits at a cool 20C
|
||||
|
||||
humidity modifies the actual "feel" of the temparature.
|
||||
|
||||
@ -115,7 +114,33 @@ local function player_env_data(player)
|
||||
|
||||
end
|
||||
|
||||
nval_temp = ((nval_temp / 2) - 10) + (nval_humid * 0.02)
|
||||
nval_temp = ((nval_temp / 2) - 12) + (nval_humid * 0.02)
|
||||
|
||||
if hudclock.month == 1 then
|
||||
nval_temp = nval_temp - 20
|
||||
elseif hudclock.month == 2 then
|
||||
nval_temp = nval_temp - 15
|
||||
elseif hudclock.month == 3 then
|
||||
nval_temp = nval_temp - 10
|
||||
elseif hudclock.month == 4 then
|
||||
nval_temp = nval_temp - 5
|
||||
elseif hudclock.month == 5 then
|
||||
nval_temp = nval_temp + 0
|
||||
elseif hudclock.month == 6 then
|
||||
nval_temp = nval_temp + 5
|
||||
elseif hudclock.month == 7 then
|
||||
nval_temp = nval_temp + 5
|
||||
elseif hudclock.month == 8 then
|
||||
nval_temp = nval_temp + 0
|
||||
elseif hudclock.month == 9 then
|
||||
nval_temp = nval_temp - 5
|
||||
elseif hudclock.month == 10 then
|
||||
nval_temp = nval_temp - 10
|
||||
elseif hudclock.month == 11 then
|
||||
nval_temp = nval_temp - 15
|
||||
elseif hudclock.month == 12 then
|
||||
nval_temp = nval_temp - 20
|
||||
end
|
||||
|
||||
if pos.y >= 10000 then
|
||||
|
||||
@ -163,12 +188,21 @@ local function update_huds()
|
||||
|
||||
local name = player:get_player_name()
|
||||
|
||||
local locale, temparature, humid, weather_str = player_env_data(player)
|
||||
local locale, temparature, humid, weather_str = hudinfo.player_env_data(player)
|
||||
|
||||
player:hud_change(hudinfo.player_data[name].temp, "text", tonumber(string.format("%.1f", temparature)) .. " C,")
|
||||
player:hud_change(hudinfo.player_data[name].humid, "text", tonumber(string.format("%.1f", humid)) .. "% RH.")
|
||||
player:hud_change(hudinfo.player_data[name].locale, "text", locale)
|
||||
player:hud_change(hudinfo.player_data[name].weather_str, "text", weather_str)
|
||||
if hudinfo.player_data[name].temp == nil then
|
||||
--fail
|
||||
elseif hudinfo.player_data[name].humid == nil then -- fail prevention
|
||||
elseif hudinfo.player_data[name].locale == nil then
|
||||
elseif hudinfo.player_data[name].weather_str == nil then
|
||||
else
|
||||
|
||||
player:hud_change(hudinfo.player_data[name].temp, "text", tonumber(string.format("%.1f", temparature)) .. " C,")
|
||||
player:hud_change(hudinfo.player_data[name].humid, "text", tonumber(string.format("%.1f", humid)) .. "% RH.")
|
||||
player:hud_change(hudinfo.player_data[name].locale, "text", locale)
|
||||
player:hud_change(hudinfo.player_data[name].weather_str, "text", weather_str)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -180,7 +214,7 @@ function hudinfo.display_hud_text(player)
|
||||
|
||||
if player:get_attribute("core_display_hud") == "true" then
|
||||
|
||||
local locale, temparature, humid, weather_str = player_env_data(player)
|
||||
local locale, temparature, humid, weather_str = hudinfo.player_env_data(player)
|
||||
|
||||
local name = player:get_player_name()
|
||||
|
||||
@ -189,7 +223,7 @@ function hudinfo.display_hud_text(player)
|
||||
local temp = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = {x=1, y=0},
|
||||
text = tonumber(string.format("%.1f", temparature)) .. "C,",
|
||||
text = tonumber(string.format("%.1f", temparature)) .. " C,",
|
||||
number = 0xFFFFFF,
|
||||
alignment = {x=1, y=0},
|
||||
offset = {x=-233, y=50},
|
||||
@ -198,7 +232,7 @@ function hudinfo.display_hud_text(player)
|
||||
local hum = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = {x=1, y=0},
|
||||
text = tonumber(string.format("%.1f", humid)) .. "% Humidity",
|
||||
text = tonumber(string.format("%.1f", humid)) .. "% RH.",
|
||||
number = 0xFFFFFF,
|
||||
alignment = {x=1, y=0},
|
||||
offset = {x=-233, y=70},
|
||||
@ -231,4 +265,4 @@ function hudinfo.display_hud_text(player)
|
||||
|
||||
end
|
||||
|
||||
minetest.after(1, update_huds)
|
||||
update_huds()
|
@ -856,7 +856,7 @@ function wardrobe.close_eyes(player)
|
||||
|
||||
player:set_properties({
|
||||
textures = {
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"(wardrobe_skin".. ".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][1].. ")^"..
|
||||
"(beds_eyes_white_".. wardrobe.formspec_selections[pname][1] ..".png^[opacity:0^beds_eyes_white_".. wardrobe.formspec_selections[pname][1] .. "_ovl.png)^"..
|
||||
"(beds_eyes_pupil_".. wardrobe.formspec_selections[pname][2] ..".png^[opacity:0)^"..
|
||||
@ -880,11 +880,11 @@ function wardrobe.close_eyes(player)
|
||||
"(wardrobe_acc_".. wardrobe.formspec_selections[pname][20] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][20].. ")^"..
|
||||
"(wardrobe_acc_".. wardrobe.formspec_selections[pname][21] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][21].. ")^"..
|
||||
"(wardrobe_acc_".. wardrobe.formspec_selections[pname][22] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][22].. ")",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png"
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
}
|
||||
})
|
||||
|
||||
@ -909,7 +909,7 @@ function wardrobe.apply_to_player(player, fields)
|
||||
|
||||
player:set_properties({
|
||||
textures = {
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"(wardrobe_skin".. ".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][1].. ")^"..
|
||||
"(wardrobe_eyes_white_".. wardrobe.formspec_selections[pname][1] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][2].. ")^"..
|
||||
"(wardrobe_eyes_pupil_".. wardrobe.formspec_selections[pname][2] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][3].. ")^"..
|
||||
@ -933,11 +933,11 @@ function wardrobe.apply_to_player(player, fields)
|
||||
"(wardrobe_acc_".. wardrobe.formspec_selections[pname][20] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][20].. ")^"..
|
||||
"(wardrobe_acc_".. wardrobe.formspec_selections[pname][21] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][21].. ")^"..
|
||||
"(wardrobe_acc_".. wardrobe.formspec_selections[pname][22] ..".png^[multiply:#".. wardrobe.formspec_selections_rgb[pname][22].. ")",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png"
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
"ptextures_transparent.png",
|
||||
}
|
||||
})
|
||||
|
||||
|