mapgen and texture changes

>added ceiling icicles and icesheet caves
>icicles will be generated on ice as well as snow
>added witches huts and a witch npc.
>added custom textures to npc_custom
>added big mushrooms to swamps
>changed crack texture
master
D00Med 2017-01-18 16:04:43 +10:00
parent 7562a392a5
commit b61154b5d3
10 changed files with 148 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 494 B

View File

@ -578,6 +578,24 @@ minetest.override_item("default:stone_with_gold", {
--new nodes
minetest.register_node("hyrule_mapgen:bigmush", {
description = "Big Mushroom",
drawtype = "plantlike",
tiles = {
"hyrule_mapgen_bigmush.png"
},
wield_image = "hyrule_mapgen_bigmush.png",
inventory_image = "hyrule_mapgen_bigmush.png",
groups = {snappy=1, flammable=1, oddly_breakable_by_hand = 1,},
paramtype = "light",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.2, 0.3}
},
on_use = minetest.item_eat(-2)
})
minetest.register_node("hyrule_mapgen:big_table", {
description = "Big Table",
tiles = {
@ -2112,6 +2130,40 @@ minetest.register_node("hyrule_mapgen:stalagmite2", {
sounds = default.node_sound_stone_defaults()
})
minetest.register_node("hyrule_mapgen:cicicle", {
description = "Ceiling Icicle",
drawtype = "plantlike",
tiles = {"hyrule_mapgen_icicle.png"},
inventory_image = "hyrule_mapgen_icicle.png",
is_ground_content = false,
sunlight_propagates = true,
use_texture_alpha = true,
paramtype = "light",
selection_box = {
type = "fixed",
fixed = {{-0.3, -0.2, -0.3, 0.3, 0.5, 0.3}}
},
groups = {cracky=1, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults()
})
minetest.register_node("hyrule_mapgen:cicicle2", {
description = "Ceiling Icicle 2",
drawtype = "plantlike",
tiles = {"hyrule_mapgen_icicle2.png"},
inventory_image = "hyrule_mapgen_icicle2.png",
is_ground_content = false,
sunlight_propagates = true,
use_texture_alpha = true,
paramtype = "light",
selection_box = {
type = "fixed",
fixed = {{-0.3, -0.2, -0.3, 0.3, 0.5, 0.3}}
},
groups = {cracky=1, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults()
})
minetest.register_node("hyrule_mapgen:roots", {
description = "Hanging Roots",
drawtype = "torchlike",

View File

@ -1268,7 +1268,7 @@ minetest.register_decoration({
-- statue
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:desert_sand", "default:dirt_with_dry_grass", "default:dirt_with_grass2", "default:dirt_with_grass", "default:snowblock", "default:dirt_with_grass3"},
place_on = {"default:desert_sand", "default:dirt_with_dry_grass", "default:dirt_with_grass2", "default:dirt_with_grass", "default:snowblock", "default:dirt_with_grass3", "hyrule_mapgen:swamp_mud"},
sidelen = 200,
noise_params = {
offset = -0.0005,
@ -1283,6 +1283,23 @@ minetest.register_decoration({
decoration = "hyrule_mapgen:statue",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"hyrule_mapgen:swamp_mud",},
sidelen = 200,
noise_params = {
offset = -0.0005,
scale = 0.0015,
spread = {x = 200, y = 200, z = 200},
seed = 230,
octaves = 3,
persist = 0.6
},
y_min = 5,
y_max = 31000,
decoration = "hyrule_mapgen:bigmush",
})
-- Papyrus
minetest.register_decoration({
deco_type = "schematic",
@ -1411,6 +1428,27 @@ minetest.register_ore({
y_max = -66,
})
--ice caves
minetest.register_ore({
ore_type = "blob",
ore = "air",
wherein = {"default:ice"},
clust_scarcity = 16 * 16 * 16,
clust_size = 12,
y_min = -31000,
y_max = 31000,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,
scale = 0.2,
spread = {x = 5, y = 5, z = 5},
seed = 766,
octaves = 1,
persist = 0.0
},
})
--rupees
minetest.register_node("hyrule_mapgen:stone_with_redrupee", {
@ -1577,6 +1615,31 @@ minetest.register_on_generated(function(minp, maxp)
end
end)
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -50 or maxp.y > 30000 then
return
end
local dirt = minetest.find_nodes_in_area(minp, maxp,
{"default:ice"})
for n = 1, #dirt do
if math.random(1, 25) == 1 then
local pos = {x = dirt[n].x, y = dirt[n].y, z = dirt[n].z }
if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" then
if math.random(1,2) == 1 then
minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "hyrule_mapgen:cicicle"})
else
minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "hyrule_mapgen:cicicle2"})
end
end
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "air" then
if math.random(1,2) == 1 then
minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "hyrule_mapgen:icicle"})
end
end
end
end
end)
--place a village on singleplayer spawn on day 1
@ -1601,6 +1664,31 @@ end)
local village_rarity = 100000
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -1 or maxp.y > 21000 then
return
end
local grass = minetest.find_nodes_in_area(minp, maxp,
{"hyrule_mapgen:swamp_mud"})
for n = 1, #grass do
if math.random(1, village_rarity) == 1 then
local pos = {x = grass[n].x, y = grass[n].y, z = grass[n].z }
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "air" then
minetest.place_schematic(pos, minetest.get_modpath("hyrule_mapgen").."/schematics/witch_hut.mts", random, {}, true)
local obj = minetest.env:add_entity({x=pos.x+7, y=pos.y+7, z=pos.z+4}, "mobs_npc:npc_custom")
local npc = obj:get_luaentity()
npc.text = "I'll give you something nice if you find me a 'big mushroom'"
npc.reward_text = "Eeehaha! Thanks!"
npc.item = "witchcraft:potion_red"
npc.reward_item = "hyrule_mapgen:bigmush"
npc.xdir = -1
npc.skin = "mobs_witch.png"
npc.object:set_properties({textures = {"mobs_witch.png"}})
end
end
end
end)
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -1 or maxp.y > 21000 then
return

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

View File

@ -257,6 +257,11 @@ mobs:register_mob("mobs_npc:npc_custom", {
on_activate = function(self)
self.order = "stand"
end,
do_custom = function(self)
if self.skin ~= nil then
self.object:set_properties({textures = {self.skin}})
end
end,
on_rightclick = function(self, clicker)
local pos = self.object:getpos()
if self.reward_item ~= nil and clicker:get_wielded_item():get_name() == self.reward_item then

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -185,7 +185,7 @@ minetest.register_node("witchcraft:pot", {
local witchcraft = {}
witchcraft.pot = {
{"blue", "red", "doomshrooms:mini", "redbrown", "flowers:mushroom_brown"},
{"blue", "red", "hyrule_mapgen:bigmush", "redbrown", "flowers:mushroom_brown"},
{"blue2", "", "", "", ""},
{"green", "blue2", "default:diamond", "", ""},
{"orange", "", "", "", ""},
@ -259,7 +259,7 @@ end
--pot effects
minetest.register_abm({
nodenames = {"witchcraft:pot_water", "witchcraft:pot_red", "witchcraft:pot_redbrown", "witchcraft:pot_blue2", "witchcraft:pot_green", "witchcraft:pot_orange"},
nodenames = {"witchcraft:pot_blue", "witchcraft:pot_red", "witchcraft:pot_redbrown", "witchcraft:pot_blue2", "witchcraft:pot_green", "witchcraft:pot_orange"},
interval = 0.5,
chance = 1,
action = function(pos, node)