More sea changes, village changes

>Changed coral textures and added new corals
>Changed dry grass texture
>Bubbles don't appear above water
>Some plants wave that did not before
>Improved village generation, and disabled old villages
>fixed spawning of npc's
>tower fills in ground below it.
master
D00Med 2018-07-24 20:14:27 +10:00
parent 8a3493f68d
commit 3193f4e2fe
17 changed files with 158 additions and 42 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 B

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 551 B

View File

@ -76,6 +76,38 @@ minetest.register_node("hyrule_mapgen:village_npc_spawner", {
is_ground_content = false,
})
minetest.register_lbm({
name = "hyrule_mapgen:village_npc_spawner",
nodenames = {"hyrule_mapgen:village_npc_spawner"},
run_at_every_load = true,
action = function(pos, node, active_object_count, active_object_count_wider)
minetest.env:add_entity({x=pos.x,y=pos.y+0.5,z=pos.z}, "mobs_npc:npc")
minetest.remove_node(pos)
end
})
minetest.register_lbm({
name = "hyrule_mapgen:village_quest_spawner",
nodenames = {"hyrule_mapgen:village_quest_spawner"},
run_at_every_load = true,
action = function(pos, node, active_object_count, active_object_count_wider)
local obj = minetest.env:add_entity({x=pos.x,y=pos.y+0.5,z=pos.z}, "mobs_npc:npc_quest")
local npc = obj:get_luaentity()
npc.text = "D00Med hasn't finished me"
minetest.remove_node(pos)
end
})
minetest.register_lbm({
name = "hyrule_mapgen:village_shop_spawner",
nodenames = {"hyrule_mapgen:village_shop_spawner"},
run_at_every_load = true,
action = function(pos, node, active_object_count, active_object_count_wider)
minetest.env:add_entity({x=pos.x,y=pos.y+0.5,z=pos.z}, "mobs_npc:shopkeeper")
minetest.remove_node(pos)
end
})
minetest.register_node("hyrule_mapgen:village_shop_spawner", {
description = "Village Shopkeeper Spawner",
drawtype = "allfaces",
@ -898,11 +930,11 @@ minetest.override_item("default:junglegrass", {
})
minetest.override_item("default:water_source", {
post_effect_color = {a = 143, r = 25, g = 40, b = 90},
post_effect_color = {a = 113, r = 25, g = 40, b = 90},
})
minetest.override_item("default:water_flowing", {
post_effect_color = {a = 143, r = 25, g = 40, b = 90},
post_effect_color = {a = 113, r = 25, g = 40, b = 90},
})
minetest.override_item("default:book", {

View File

@ -1165,8 +1165,8 @@ minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:sand"},
noise_params = {
offset = -0.1,
scale = 0.1,
offset = -0.08,
scale = 0.08,
spread = {x = 200, y = 200, z = 200},
seed = 7013,
octaves = 3,
@ -1176,8 +1176,9 @@ minetest.register_decoration({
"desert_ocean",
"savanna_ocean",
"rainforest_ocean",
"deciduous_forest_ocean",
},
y_min = -8,
y_min = -6,
y_max = -2,
schematic = minetest.get_modpath("default") .. "/schematics/corals.mts",
flags = "place_center_x, place_center_z",
@ -1534,6 +1535,48 @@ minetest.register_ore({
y_max = -66,
})
--coral ore
minetest.register_ore({
ore_type = "blob",
ore = "hyrule_mapgen:coral",
wherein = {"default:coral_orange"},
clust_scarcity = 2 * 2 * 2,
clust_num_ores = 10,
clust_size = 8,
y_min = -100,
y_max = 30,
})
minetest.register_ore({
ore_type = "blob",
ore = "hyrule_mapgen:coral2",
wherein = {"default:coral_orange"},
clust_scarcity = 2 * 2 * 2,
clust_num_ores = 10,
clust_size = 8,
y_min = -100,
y_max = 30,
})
minetest.register_ore({
ore_type = "blob",
ore = "hyrule_mapgen:coral3",
wherein = {"default:coral_brown"},
clust_scarcity = 2 * 2 * 2,
clust_num_ores = 10,
clust_size = 8,
y_min = -100,
y_max = 30,
})
minetest.register_ore({
ore_type = "blob",
ore = "hyrule_mapgen:coral2",
wherein = {"default:coral_brown"},
clust_scarcity = 2 * 2 * 2,
clust_num_ores = 10,
clust_size = 8,
y_min = -100,
y_max = 30,
})
--ice caves
minetest.register_ore({
ore_type = "blob",
@ -1809,7 +1852,7 @@ minetest.register_on_generated(function(minp, maxp)
end
end
end)
--[[
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -1 or maxp.y > 21000 then
return
@ -1843,8 +1886,9 @@ minetest.register_on_generated(function(minp, maxp)
end
end
end
end)
end)]]
--[[
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -1 or maxp.y > 11000 then
return
@ -1908,7 +1952,7 @@ minetest.register_on_generated(function(minp, maxp)
end
end
end
end)
end)]]
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -1 or maxp.y > 11000 then
@ -1961,6 +2005,10 @@ end)
minetest.register_on_generated(function(minp, maxp)
if minp.x < 50 and 50 < maxp.x and minp.y < 10 and 10 < maxp.y and minp.z < 50 and 50 < maxp.z then
minetest.place_schematic({x=0,y=10,z=0}, minetest.get_modpath("hyrule_mapgen").."/schematics/tower_ground.mts", 0, {["hyrule_mapgen:tower_dev"] = "hyrule_mapgen:tower_spawner",}, true)
local air = minetest.find_nodes_in_area({x=-14, y=-10, z=-14}, {x=14, y=9, z=14}, {"air"})
for _, air_pos in ipairs(air) do
minetest.set_node(air_pos, {name="default:dirt"})
end
end
end)

View File

@ -1207,6 +1207,30 @@ minetest.register_node("hyrule_mapgen:nrupee", {
groups = {cracky=1, oddly_breakable_by_hand=1}
})
minetest.register_node("hyrule_mapgen:coral", {
description = "Large Purple Coral",
tiles = {
"hyrule_mapgen_coral1.png"
},
groups = {fleshy=1, choppy=1, oddly_breakable_by_hand=1}
})
minetest.register_node("hyrule_mapgen:coral2", {
description = "Large Blue Coral",
tiles = {
"hyrule_mapgen_coral2.png"
},
groups = {fleshy=1, choppy=1, oddly_breakable_by_hand=1}
})
minetest.register_node("hyrule_mapgen:coral3", {
description = "Large Yellow Coral",
tiles = {
"hyrule_mapgen_coral3.png"
},
groups = {fleshy=1, choppy=1, oddly_breakable_by_hand=1}
})
minetest.register_node("hyrule_mapgen:wood_fence", {
description = "Rough Wooden Fence",
inventory_image = "hyrule_mapgen_woodfence.png",

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

View File

@ -13,7 +13,7 @@ local regular = {
}
local function place_building(pos, name, facing)
minetest.place_schematic(pos, minetest.get_modpath("hyrule_towns").."/schems/"..name..".mts", facing, {}, true)
minetest.place_schematic({x=pos.x-4, y=pos.y, z=pos.z-4}, minetest.get_modpath("hyrule_towns").."/schems/"..name..".mts", facing, {}, true)
end
local function place_town(pos, surface_type)
@ -32,34 +32,32 @@ local function place_town(pos, surface_type)
{x=pos.x-21, y=pos.y, z=pos.z-9},
{x=pos.x-21, y=pos.y, z=pos.z+13},
}
local used_positions = {}
local schematics = {}
if surface_type == "default:dirt_with_grass" or surface_type == "default:dirt_with_grass3" then
schematics = regular
else
schematics = regular
end
for _, position in ipairs(building_positions) do
for i = 1,12 do
local position = building_positions[i]
if used_positions[i] == building_positions[i] then
--minetest.chat_send_all("can't place building (position taken)")
return end
local building_name = schematics[math.random(1,8)]
for i = -10,10 do
position.y = position.y+i
local ground = minetest.find_node_near(position, 1, {"default:dirt_with_grass", "default:dirt_with_grass3"})
minetest.chat_send_all("looking for ground")
for j = -10,10 do
position.y = position.y+j
local ground = minetest.find_node_near(position, 1, {"default:dirt_with_grass", "default:dirt_with_grass3"}, true)
if ground then
local grass_nodes = minetest.find_nodes_in_area({x=ground.x-4, y=ground.y-4, z=ground.z-4}, {x=ground.x+4, y=ground.y+3, z=ground.z+4}, {"default:dirt_with_grass", "dirt_with_grass3"})
--minetest.chat_send_all("ground has been found :)")
--This doesn't look as good as I'd hoped. I'm leaving it in in case I change my mind.
--[[local grass_nodes = minetest.find_nodes_in_area({x=ground.x-4, y=ground.y-4, z=ground.z-4}, {x=ground.x+4, y=ground.y+3, z=ground.z+4}, {"default:dirt_with_grass", "dirt_with_grass3"})
for _, grass_pos in ipairs(grass_nodes) do
minetest.set_node(grass_pos, {name="default:dirt_with_dry_grass"})
end
end]]
place_building(ground, building_name, random)
minetest.chat_send_all("building placed")
local num = nil
for i = 1,12 do
if building_positions[i] == position then
num = i
minetest.chat_send_all("num set")
end
end
table.remove(building_positions, num)
minetest.chat_send_all("removed position")
used_positions[i] = position
--minetest.chat_send_all("building placed")
end
end
end

View File

@ -153,7 +153,7 @@ local apply_weather = function(player, pos, weather_type)
player:set_sky(nil, "regular", nil, true)
elseif weather_type == "none" then
if underwater then
player:set_sky({r=10, g=20, b=75}, "plain", nil, true)
player:set_sky({r=13, g=50, b=157}, "plain", nil, true)
else
player:set_sky(nil, "regular", nil, true)
end
@ -222,7 +222,7 @@ minetest.register_globalstep(function(dtime)
if minetest.setting_get("underwater_effects") then
if minetest.get_node({x=pos.x, y=pos.y+0.5, z=pos.z}).name == "default:water_source" and minetest.get_node({x=pos.x, y=pos.y+2, z=pos.z}).name == "default:water_source" then
underwater = true
player:set_sky({r=10, g=20, b=75}, "plain", nil, true)
player:set_sky({r=13, g=50, b=157}, "plain", nil, true)
else
underwater = false
if not display_weather then

View File

@ -191,13 +191,13 @@ minetest.register_globalstep(function(dtime)
--bubbles
if math.random(1,10) == 1 then
local pos = player:getpos()
local water = minetest.find_node_near({x=pos.x+math.random(-7,7), y=pos.y+math.random(-10,-7), z=pos.z+math.random(-7,7)}, 5, {"default:water_source", "default:river_water_source"}, true)
if not water then return end
local water = minetest.find_node_near({x=pos.x+math.random(-7,7), y=pos.y+math.random(-10,-7), z=pos.z+math.random(-7,7)}, 5, {"default:water_source",}, true)
if water and minetest.get_node({x=water.x, y=water.y+6, z=water.z}).name == "default:water_source" then
minetest.add_particle({
pos = {x=water.x, y=water.y, z=water.z},
velocity = {x=math.random(-5,5)/10, y=math.random(3,5), z=math.random(-5,5)/10},
acceleration = {x=math.random(-1,1)/10, y=math.random(-10,-5)/10, z=math.random(-1,1)/10},
expirationtime = 3,
expirationtime = 2,
size = math.random(3,5),
collisiondetection = true,
collision_removal = true,
@ -211,7 +211,7 @@ minetest.register_globalstep(function(dtime)
pos = {x=water2.x, y=water2.y, z=water2.z},
velocity = {x=math.random(-5,5)/10, y=math.random(3,5), z=math.random(-5,5)/10},
acceleration = {x=math.random(-1,1)/10, y=math.random(-10,-5)/10, z=math.random(-1,1)/10},
expirationtime = 3,
expirationtime = 2,
size = math.random(3,5),
collisiondetection = true,
collision_removal = true,
@ -220,6 +220,7 @@ minetest.register_globalstep(function(dtime)
glow = 5
})
end
end
if player:get_wielded_item():get_name() == "hyruletools:sail" then
if player:get_player_control().aux1 then

View File

@ -156,6 +156,7 @@ minetest.register_node("moreplants:aliengrass", {
paramtype = "light",
is_ground_content = false,
buildable_to = true,
waving = 1,
sunlight_propagates = true,
inventory_image = "moreplants_aliengrass.png",
visual_scale = 1.54,
@ -178,6 +179,7 @@ minetest.register_node("moreplants:bulrush", {
paramtype = "light",
is_ground_content = false,
buildable_to = true,
waving = 1,
sunlight_propagates = true,
inventory_image = "moreplants_bullrush.png",
visual_scale = 1.3,
@ -197,6 +199,7 @@ minetest.register_node("moreplants:bigfern", {
tiles = {"moreplants_bigfern.png"},
paramtype = "light",
is_ground_content = false,
waving = 1,
buildable_to = true,
sunlight_propagates = true,
inventory_image = "moreplants_bigfern.png",
@ -281,6 +284,7 @@ minetest.register_node("moreplants:weed", {
is_ground_content = false,
buildable_to = true,
sunlight_propagates = true,
waving = 1,
inventory_image = "moreplants_weed.png",
visual_scale = 1.1,
wield_scale = {x=0.5, y=0.5, z=0.5},
@ -320,6 +324,7 @@ minetest.register_node("moreplants:spikefern", {
paramtype = "light",
is_ground_content = false,
buildable_to = true,
waving = 1,
sunlight_propagates = true,
inventory_image = "moreplants_spikefern.png",
visual_scale = 1,
@ -341,6 +346,7 @@ minetest.register_node("moreplants:bluespike", {
is_ground_content = false,
buildable_to = true,
sunlight_propagates = true,
waving = 1,
inventory_image = "moreplants_bluespike.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
@ -380,6 +386,7 @@ minetest.register_node("moreplants:eyeweed", {
paramtype = "light",
is_ground_content = false,
buildable_to = true,
waving = 1,
sunlight_propagates = true,
inventory_image = "moreplants_eyeweed.png",
visual_scale = 1,
@ -402,6 +409,7 @@ minetest.register_node("moreplants:fern", {
is_ground_content = false,
buildable_to = true,
sunlight_propagates = true,
waving = 1,
inventory_image = "moreplants_fern.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
@ -422,6 +430,7 @@ minetest.register_node("moreplants:bush", {
is_ground_content = false,
buildable_to = true,
sunlight_propagates = true,
waving = 1,
inventory_image = "moreplants_bush.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
@ -525,6 +534,7 @@ minetest.register_node("moreplants:moonflower", {
is_ground_content = false,
buildable_to = true,
sunlight_propagates = true,
waving = 1,
inventory_image = "moreplants_moonflower.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
@ -544,6 +554,7 @@ minetest.register_node("moreplants:fireflower", {
paramtype = "light",
is_ground_content = false,
buildable_to = true,
waving = 1,
sunlight_propagates = true,
inventory_image = "moreplants_fireflower.png",
visual_scale = 1,
@ -564,6 +575,7 @@ minetest.register_node("moreplants:deadweed", {
paramtype = "light",
is_ground_content = false,
buildable_to = true,
waving = 1,
sunlight_propagates = true,
inventory_image = "moreplants_deadweed.png",
visual_scale = 1,
@ -584,6 +596,7 @@ minetest.register_node("moreplants:taigabush", {
paramtype = "light",
is_ground_content = false,
buildable_to = true,
waving = 1,
sunlight_propagates = true,
inventory_image = "moreplants_tundrabush.png",
visual_scale = 1,
@ -811,10 +824,9 @@ minetest.register_node("moreplants:hangingplant", {
minetest.register_node("moreplants:seaweed", {
description = "Green Seaweed",
drawtype = "plantlike",
tiles = {
"moreplants_seaweed.png",
},
drawtype = "mesh",
mesh = "waterplant.obj",
tiles = {"moreplants_seaweed.png", "default_sand.png"},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
is_ground_content=true,
@ -891,7 +903,7 @@ minetest.register_node("moreplants:kelp", {
drawtype = "mesh",
mesh = "kelp_3.obj",
tiles = {{name = "moreplants_kelp.png",animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1.00},}, "default_sand.png"},
groups = {snappy=3, flammable=1, attached_node=1, flora=1, sea=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1, sea=1,},
sounds = default.node_sound_leaves_defaults(),
is_ground_content=true,
buildable_to = true,
@ -1428,11 +1440,13 @@ minetest.register_on_generated(function(minp, maxp)
local pos = {x = stone[n].x, y = stone[n].y, z = stone[n].z }
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "default:water_source" then
if math.random(1,2) == 1 then
minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name = "moreplants:seaweed1"})
minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name = "moreplants:seaweed"})
elseif math.random(1,2) == 1 then
minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name = "moreplants:seaweed2"})
elseif math.random(1,2) == 1 then
minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name = "moreplants:seaweed3"})
elseif math.random(1,2) == 1 then
minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name = "moreplants:seaweed1"})
end
end
end
@ -1457,18 +1471,17 @@ minetest.register_on_generated(function(minp, maxp)
minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name = "moreplants:coral2"})
end
end
end
if math.random(1, 25) == 1 then
elseif math.random(1, 25) == 1 then
local pos = {x = stone[n].x, y = stone[n].y, z = stone[n].z }
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "default:water_source" then
if math.random(1,4) == 1 and minetest.get_node({x=pos.x, y=pos.y+3, z=pos.z}).name == "default:water_source" then
minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name = "moreplants:kelp1"})
minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name = "moreplants:kelp"})
elseif math.random(1,2) == 1 and minetest.get_node({x=pos.x, y=pos.y+6, z=pos.z}).name == "default:water_source" then
minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name = "moreplants:kelp3"})
elseif minetest.get_node({x=pos.x, y=pos.y+4, z=pos.z}).name == "default:water_source" then
minetest.add_node({x=pos.x, y=pos.y, z=pos.z}, {name = "moreplants:kelp2"})
end
end
end
end
end
end)