Stuff
|
@ -18,3 +18,4 @@ weather_allow_abm = true
|
|||
enable_moreplants = true
|
||||
twilight = false
|
||||
3d_leaves = false
|
||||
mob_show_health = false
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 664 B |
Before Width: | Height: | Size: 896 B After Width: | Height: | Size: 353 B |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 877 B |
Before Width: | Height: | Size: 810 B After Width: | Height: | Size: 384 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 875 B |
|
@ -102,12 +102,31 @@ minetest.register_entity("bows:arrow",{
|
|||
bows.arrow_remove(self)
|
||||
end
|
||||
local pos = self.object:getpos()
|
||||
local objs = minetest.get_objects_inside_radius(pos, 1.3)
|
||||
local objs = minetest.get_objects_inside_radius(pos, 2)
|
||||
for _, obj in ipairs(objs) do
|
||||
if obj:is_player() then
|
||||
local pos2 = self.object:getpos()
|
||||
local pos1 = obj:getpos()
|
||||
if pos1 ~= nil and pos2 ~= nil then
|
||||
--pos1.y = pos1.y+1
|
||||
local vec = {x=pos1.x-pos2.x, y=pos1.y-pos2.y, z=pos1.z-pos2.z}
|
||||
vec.x = vec.x/0.15
|
||||
vec.y = vec.y/0.15
|
||||
vec.z = vec.z/0.15
|
||||
self.object:setvelocity(vec)
|
||||
end
|
||||
end
|
||||
end
|
||||
local objs = minetest.get_objects_inside_radius(pos, 0.3)
|
||||
for _, obj in ipairs(objs) do
|
||||
if obj:is_player() then
|
||||
local pname = obj:get_player_name()
|
||||
local inv = minetest.get_inventory({type="player", name=pname});
|
||||
if math.random(1,7) == 1 then
|
||||
local remov = inv:add_item("main", self.name)
|
||||
else
|
||||
local remov = inv:add_item("main", "default:stick")
|
||||
end
|
||||
bows.arrow_remove(self)
|
||||
minetest.sound_play("item_drop_pickup", {pos = pos, gain = 0.3, max_hear_distance = 16})
|
||||
end
|
||||
|
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 461 B |
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 227 B |
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 277 B |
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 375 B |
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 370 B |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 734 B |
Before Width: | Height: | Size: 165 B After Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 649 B |
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 340 B |
After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 531 B |
Before Width: | Height: | Size: 974 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 134 B After Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 384 B |
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 363 B |
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 281 B |
Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 358 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 683 B |
|
@ -8,7 +8,7 @@ level1 = 50
|
|||
level1_drop = "bucket:bucket_empty 1"
|
||||
|
||||
level2 = 100
|
||||
level2_drop = "default:steelblock 5"
|
||||
level2_drop = "default:steel_sword 1"
|
||||
|
||||
level3 = 150
|
||||
level3_drop = "default:goldblock 1"
|
||||
|
@ -32,7 +32,19 @@ level9 = 450
|
|||
level9_drop = "default:mese 1"
|
||||
|
||||
level10 = 500
|
||||
level10_drop = "default:sword_mese 1"
|
||||
level10_drop = "hyruletools:dungeon_spawner 1"
|
||||
|
||||
level11 = 650
|
||||
level11_drop = "default:sword_mese 1"
|
||||
|
||||
level11 = 80
|
||||
level11_drop = "hyruletools:dungeon_spawner2 1"
|
||||
|
||||
level12 = 900
|
||||
level12_drop = "default:sword_mese 1"
|
||||
|
||||
level13 = 1000
|
||||
level13_drop = "hyruletools:crest 1"
|
||||
|
||||
|
||||
|
||||
|
|
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 591 B After Width: | Height: | Size: 334 B |
Before Width: | Height: | Size: 159 B After Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 270 B |
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 274 B |
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 566 B After Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 392 B |
|
@ -141,7 +141,7 @@ minetest.register_lbm({
|
|||
nodenames = {"moreplants:tallgrass", "moreplants:bulrush"},
|
||||
run_at_every_load = true,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
if math.random(1,3) == 3 then
|
||||
if math.random(1,6) == 3 then
|
||||
minetest.env:add_entity({x=pos.x,y=pos.y+0.5,z=pos.z}, "hyrule_mapgen:dragonfly")
|
||||
end
|
||||
end
|
||||
|
@ -240,22 +240,22 @@ minetest.register_abm({
|
|||
interval = 5,
|
||||
chance = 5,
|
||||
action = function(pos, node)
|
||||
minetest.add_particlespawner({
|
||||
amount = 10,
|
||||
time = 4,
|
||||
minpos = {x=pos.x-0.5, y=pos.y+0.3, z=pos.z-0.5},
|
||||
maxpos = {x=pos.x+0.5, y=pos.y+0.5, z=pos.z+0.5},
|
||||
minvel = {x=-0, y=0.5, z=-0},
|
||||
maxvel = {x=0, y=0.5, z=0},
|
||||
minacc = {x=0, y=0.5, z=0},
|
||||
maxacc = {x=0, y=0.5, z=0},
|
||||
minexptime = 0.5,
|
||||
maxexptime = 2,
|
||||
minsize = 1,
|
||||
maxsize = 2,
|
||||
for i=1,10 do
|
||||
minetest.after(i*0.4, function()
|
||||
minetest.add_particle({
|
||||
pos = {x=pos.x+math.random(-5,5)/10, y=pos.y+0.3, z=pos.z+math.random(-5,5)/10},
|
||||
velocity = {x=0, y=0.5, z=0},
|
||||
acceleration = {x=0, y=0.5, z=0},
|
||||
expirationtime = math.random(5,20)/10,
|
||||
size = math.random(1,2),
|
||||
collisiondetection = false,
|
||||
texture = "mobs_fairy_spark.png"
|
||||
collisionremoval = false,
|
||||
vertical = false,
|
||||
texture = "mobs_fairy_spark.png",
|
||||
glow = 9
|
||||
})
|
||||
end)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -315,12 +315,12 @@ minetest.register_entity("hyrule_mapgen:dragonfly", {
|
|||
visual_size = {x=0.3, y=0.3},
|
||||
on_activate = function(self)
|
||||
num = math.random(1,4)
|
||||
--self.object:set_properties({textures = {"hyrule_mapgen_butterfly"..num..".png",},})
|
||||
self.object:set_properties({textures = {"hyrule_mapgen_dragonfly"..num..".png",},})
|
||||
self.object:set_animation({x=1, y=10}, 40, 0)
|
||||
self.object:setyaw(math.pi+num)
|
||||
--minetest.after(10, function()
|
||||
--self.object:remove()
|
||||
--end)
|
||||
minetest.after(60, function()
|
||||
self.object:remove()
|
||||
end)
|
||||
if math.random(1,100) == 1 then
|
||||
self.object:remove()
|
||||
end
|
||||
|
@ -340,6 +340,40 @@ minetest.register_entity("hyrule_mapgen:dragonfly", {
|
|||
|
||||
--overrides
|
||||
|
||||
local dirt_treasure = {
|
||||
{"hyruletools:green_rupee", 10},
|
||||
{"fishing:bait_worm", 10},
|
||||
{"hyruletools:blue_rupee", 20},
|
||||
{"hyruletools:red_rupee", 40},
|
||||
}
|
||||
|
||||
local shovels = {
|
||||
{"default:shovel_steel"},
|
||||
{"default:shovel_wood"},
|
||||
{"default:shovel_bronze"},
|
||||
{"default:shovel_diamond"},
|
||||
{"default:shovel_mese"},
|
||||
{"default:shovel_stone"},
|
||||
}
|
||||
|
||||
for _, row in ipairs(shovels) do
|
||||
minetest.override_item(row[1], {
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if minetest.get_node(pointed_thing.under).name == "default:dirt" or minetest.get_node(pointed_thing.under).name == "default:dirt_with_grass" or minetest.get_node(pointed_thing.under).name == "default:dirt_with_grass2" or minetest.get_node(pointed_thing.under).name == "default:dirt_with_grass3" then
|
||||
minetest.set_node(pointed_thing.under, {name="hyrule_mapgen:packed_dirt"})
|
||||
for _, row in ipairs(dirt_treasure) do
|
||||
local item = row[1]
|
||||
local chance = row[2]
|
||||
local pos = pointed_thing.under
|
||||
if math.random(1, chance) == 1 then
|
||||
minetest.add_item({x=pos.x, y=pos.y+1.2,z=pos.z}, item)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
minetest.override_item("flowers:waterlily", {
|
||||
drawtype = "mesh",
|
||||
tiles = {"waterlily.png"},
|
||||
|
@ -500,6 +534,24 @@ minetest.override_item("default:furnace", {
|
|||
},
|
||||
})
|
||||
|
||||
minetest.override_item("default:furnace_active", {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, -- NodeBox1
|
||||
{-0.4375, 0.375, -0.5, 0.4375, 0.4375, 0.5}, -- NodeBox2
|
||||
{-0.375, 0.4375, -0.5, 0.375, 0.5, 0.5}, -- NodeBox3
|
||||
{-0.5, 0.3125, -0.5, 0.5, 0.375, 0.5}, -- NodeBox4
|
||||
{-0.5, -0.5, -0.5, -0.3125, 0.3125, 0.5}, -- NodeBox5
|
||||
{0.3125, -0.5, -0.5, 0.5, 0.375, 0.5}, -- NodeBox6
|
||||
{-0.5, -0.0625, -0.5, 0.5, 0.0625, 0.5}, -- NodeBox7
|
||||
{-0.5, -0.5, -0.375, 0.5, 0.3125, 0.5}, -- NodeBox8
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.override_item("default:chest_locked", {
|
||||
paramtype = "light",
|
||||
drawtype = "nodebox",
|
||||
|
@ -594,6 +646,124 @@ minetest.override_item("default:stone_with_gold", {
|
|||
|
||||
--new nodes
|
||||
|
||||
minetest.register_node("hyrule_mapgen:chillshroom", {
|
||||
description = "Chillshroom",
|
||||
tiles = {"hyrule_mapgen_chillshroom.png"},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.1, -0.5, -0.1, 0.1, -0.1, 0.1}
|
||||
}
|
||||
},
|
||||
groups = {fleshy=1, oddly_breakable_by_hand=1, dig_immediate=3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = "hyrule_mapgen:chillshroom 3",
|
||||
walkable = false,
|
||||
on_use = minetest.item_eat(1)
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:chillshroom_2", {
|
||||
description = "Chillshroom (ceiling)",
|
||||
tiles = {"hyrule_mapgen_chillshroom.png^[transformFY"},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.1, 0.1, -0.1, 0.1, 0.5, 0.1}
|
||||
}
|
||||
},
|
||||
groups = {fleshy=1, oddly_breakable_by_hand=1, dig_immediate=3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = "hyrule_mapgen:chillshroom 3",
|
||||
walkable = false,
|
||||
on_use = minetest.item_eat(1)
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:sunshroom", {
|
||||
description = "Sunshroom",
|
||||
tiles = {"hyrule_mapgen_sunshroom.png"},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.1, -0.5, -0.1, 0.1, -0.1, 0.1}
|
||||
}
|
||||
},
|
||||
groups = {fleshy=1, oddly_breakable_by_hand=1, dig_immediate=3, flammable=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = "hyrule_mapgen:sunshroom 3",
|
||||
walkable = false,
|
||||
on_use = minetest.item_eat(1)
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:zapshroom", {
|
||||
description = "Zapshroom",
|
||||
tiles = {"hyrule_mapgen_zapshroom.png"},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.1, -0.5, -0.1, 0.1, -0.1, 0.1}
|
||||
}
|
||||
},
|
||||
groups = {fleshy=1, oddly_breakable_by_hand=1, dig_immediate=3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = "hyrule_mapgen:zapshroom 3",
|
||||
walkable = false,
|
||||
on_use = minetest.item_eat(1)
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:rushroom", {
|
||||
description = "Rushroom",
|
||||
tiles = {"hyrule_mapgen_rushroom.png"},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.1, -0.5, -0.1, 0.1, -0.1, 0.1}
|
||||
}
|
||||
},
|
||||
groups = {fleshy=1, oddly_breakable_by_hand=1, dig_immediate=3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = "hyrule_mapgen:rushroom 3",
|
||||
walkable = false,
|
||||
on_use = minetest.item_eat(1)
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:berry_bush", {
|
||||
description = "Wildberry Bush",
|
||||
tiles = {"hyrule_mapgen_wildberry_bush.png"},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.1, -0.5, -0.1, 0.1, 0, 0.1}
|
||||
}
|
||||
},
|
||||
groups = {snappy=1, oddly_breakable_by_hand=1, dig_immediate=3},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
walkable = false,
|
||||
on_rightclick = function(pos, node)
|
||||
minetest.add_item(pos, "hyrule_mapgen:wildberry")
|
||||
minetest.add_item(pos, "hyrule_mapgen:wildberry")
|
||||
minetest.add_item(pos, "hyrule_mapgen:wildberry")
|
||||
minetest.remove_node(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("hyrule_mapgen:wildberry", {
|
||||
description = "Wild Berry",
|
||||
inventory_image = "hyrule_mapgen_wildberry.png",
|
||||
on_use = minetest.item_eat(1)
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:logpile", {
|
||||
description = "Log Pile",
|
||||
tiles = {
|
||||
|
@ -622,6 +792,14 @@ minetest.register_node("hyrule_mapgen:logpile", {
|
|||
drop = "default:tree 3",
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "hyrule_mapgen:logpile 1",
|
||||
recipe = {
|
||||
{ "", "default:tree", "" },
|
||||
{ "default:tree", "", "default:tree" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:bigmush", {
|
||||
description = "Big Mushroom",
|
||||
drawtype = "plantlike",
|
||||
|
@ -773,6 +951,28 @@ minetest.register_node("hyrule_mapgen:dungeon_seed", {
|
|||
drop = "default:stone"
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:moldorm_stone", {
|
||||
description = "Moldorm Stone",
|
||||
tiles = {"hyrule_mapgen_moldorm_stone.png"},
|
||||
groups = {},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_rightclick = function(pos, node, clicker, itemstack)
|
||||
minetest.env:add_entity({x=pos.x, y=pos.y+1, z=pos.z}, "mobs_loz:great_moldorm")
|
||||
minetest.remove_node(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:octorock_stone", {
|
||||
description = "Octorock Stone",
|
||||
tiles = {"hyrule_mapgen_octorock_stone.png"},
|
||||
groups = {},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_rightclick = function(pos, node, clicker, itemstack)
|
||||
minetest.env:add_entity({x=pos.x, y=pos.y+1, z=pos.z}, "mobs_loz:octorock_boss")
|
||||
minetest.remove_node(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:ice_brick", {
|
||||
description = "Ice Brick",
|
||||
tiles = {"hyrule_mapgen_ice_brick.png"},
|
||||
|
@ -910,7 +1110,7 @@ minetest.register_node("hyrule_mapgen:beamos", {
|
|||
|
||||
minetest.register_abm({
|
||||
nodenames = {"hyrule_mapgen:beamos"},
|
||||
interval = 1,
|
||||
interval = 0.8,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
local x = 0
|
||||
|
@ -925,33 +1125,20 @@ minetest.register_abm({
|
|||
x = 1
|
||||
end
|
||||
--minetest.chat_send_all(node.param2)
|
||||
local numbers = {
|
||||
{1},
|
||||
{2},
|
||||
{3},
|
||||
{4},
|
||||
}
|
||||
for _, number in ipairs(numbers) do
|
||||
local num = number[1]
|
||||
local objs = minetest.get_objects_inside_radius({x=pos.x+x*num, y=pos.y, z=pos.z+z*num}, 1)
|
||||
for num=1,5 do
|
||||
local objs = minetest.get_objects_inside_radius({x=pos.x+x*num, y=pos.y-0.5, z=pos.z+z*num}, 1)
|
||||
for _, obj in ipairs(objs) do
|
||||
if obj:is_player() then
|
||||
local name = obj:get_player_name()
|
||||
minetest.sound_play("Laser", {to_player=obj, gain=0.5})
|
||||
local ent = minetest.env:add_entity(pos, "hyrule_mapgen:laser")
|
||||
ent:setvelocity({x=7*x, y=0, z=7*z})
|
||||
minetest.after(0.1, function()
|
||||
ent:setvelocity({x=12*x, y=0, z=12*z})
|
||||
for i=1,5 do
|
||||
minetest.after(i/10, function()
|
||||
local ent = minetest.env:add_entity(pos, "hyrule_mapgen:laser")
|
||||
ent:setvelocity({x=7*x, y=0, z=7*z})
|
||||
end)
|
||||
minetest.after(0.2, function()
|
||||
local ent = minetest.env:add_entity(pos, "hyrule_mapgen:laser")
|
||||
ent:setvelocity({x=7*x, y=0, z=7*z})
|
||||
end)
|
||||
minetest.after(0.3, function()
|
||||
local ent = minetest.env:add_entity(pos, "hyrule_mapgen:laser")
|
||||
ent:setvelocity({x=7*x, y=0, z=7*z})
|
||||
ent:setvelocity({x=12*x, y=0, z=12*z})
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1002,18 +1189,18 @@ minetest.register_node("hyrule_mapgen:sinkingsand", {
|
|||
|
||||
|
||||
chest_items = {
|
||||
{"clawshot:clawshot", 20},
|
||||
{"hyruletools:eye", 20},
|
||||
{"hyruletools:boomerang", 20},
|
||||
{"hyruletools:flame_rod", 50},
|
||||
{"hyruletools:wand", 50},
|
||||
{"hyruletools:medallion", 50},
|
||||
{"hyruletools:medallion2", 50},
|
||||
{"hyruletools:medallion3", 50},
|
||||
{"hyruletools:green_rupee 5", 10},
|
||||
{"hyruletools:blue_rupee 2", 10},
|
||||
{"hyruletools:red_rupee", 10},
|
||||
{"hyruletools:nyan_rupee", 50},
|
||||
{"clawshot:clawshot", 5},
|
||||
{"hyruletools:eye", 5},
|
||||
{"hyruletools:boomerang", 5},
|
||||
{"hyruletools:flame_rod", 10},
|
||||
{"hyruletools:wand", 10},
|
||||
{"hyruletools:medallion", 10},
|
||||
{"hyruletools:medallion2", 10},
|
||||
{"hyruletools:medallion3", 10},
|
||||
{"hyruletools:ice_rod 1", 5},
|
||||
{"hyruletools:blue_rupee 20", 5},
|
||||
{"hyruletools:red_rupee 10", 5},
|
||||
{"hyruletools:nyan_rupee", 5},
|
||||
}
|
||||
|
||||
minetest.register_node("hyrule_mapgen:chest", {
|
||||
|
@ -1042,7 +1229,8 @@ minetest.register_node("hyrule_mapgen:chest", {
|
|||
local rarity = row[2]
|
||||
if math.random(1,rarity) == 1 then
|
||||
meta:set_string("item", item)
|
||||
else
|
||||
return
|
||||
else
|
||||
meta:set_string("item", "hyruletools:green_rupee 20")
|
||||
end
|
||||
end
|
||||
|
@ -1387,23 +1575,22 @@ minetest.register_abm({
|
|||
interval = 1,
|
||||
chance = 2,
|
||||
action = function(pos, node)
|
||||
minetest.add_particlespawner({
|
||||
amount = 30,
|
||||
time = 4,
|
||||
minpos = {x=pos.x-0.2, y=pos.y, z=pos.z-0.2},
|
||||
maxpos = {x=pos.x+0.2, y=pos.y+1, z=pos.z+0.2},
|
||||
minvel = {x=-0.1, y=1, z=-0.1},
|
||||
maxvel = {x=0.1, y=2, z=0.1},
|
||||
minacc = {x=0, y=-0.5, z=0},
|
||||
maxacc = {x=0, y=-1, z=0},
|
||||
minexptime = 1,
|
||||
maxexptime = 2,
|
||||
minsize = 3,
|
||||
maxsize = 5,
|
||||
for i=1,30 do
|
||||
minetest.after(i*0.13, function()
|
||||
minetest.add_particle({
|
||||
pos = {x=pos.x, y=pos.y+math.random(0,3)/10, z=pos.z},
|
||||
velocity = {x=math.random(-1,1)/10, y=math.random(1,2), z=math.random(-1,1)/10},
|
||||
acceleration = {x=math.random(-1,1)/10, y=math.random(-5,-10)/10, z=math.random(-1,1)/10},
|
||||
expirationtime = math.random(5,10)/10,
|
||||
size = math.random(3,5),
|
||||
collisiondetection = false,
|
||||
collisionremoval = false,
|
||||
vertical = false,
|
||||
texture = "hyrule_mapgen_fire.png",
|
||||
glow = 14
|
||||
glow = 9
|
||||
})
|
||||
end)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -1814,6 +2001,15 @@ minetest.register_node("hyrule_mapgen:floorbrick", {
|
|||
groups = {cracky=1}
|
||||
})
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"floortile",
|
||||
"hyrule_mapgen:floortile",
|
||||
{cracky = 3, cools_lava = 1},
|
||||
{"hyrule_mapgen_floortile.png"},
|
||||
"Floor Tile Stair",
|
||||
"Floor Tile Slab",
|
||||
default.node_sound_stone_defaults()
|
||||
)
|
||||
|
||||
minetest.register_node("hyrule_mapgen:carpet", {
|
||||
description = "Carpet Block",
|
||||
|
@ -1955,22 +2151,22 @@ minetest.register_abm({
|
|||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos, node)
|
||||
local part = minetest.add_particlespawner(
|
||||
5, --amount
|
||||
1, --time
|
||||
{x=pos.x-0.1, y=pos.y, z=pos.z-0.1}, --minpos
|
||||
{x=pos.x+0.1, y=pos.y+0.2, z=pos.z+0.1}, --maxpos
|
||||
{x=-0, y=0.5, z=-0}, --minvel
|
||||
{x=0, y=1, z=0}, --maxvel
|
||||
{x=0,y=0.5,z=0}, --minacc
|
||||
{x=0.5,y=0.5,z=0.5}, --maxacc
|
||||
0.2, --minexptime
|
||||
0.5, --maxexptime
|
||||
4, --minsize
|
||||
8, --maxsize
|
||||
false, --collisiondetection
|
||||
"hyrule_mapgen_flame.png" --texture
|
||||
)
|
||||
for i=1,5 do
|
||||
minetest.after(i*0.2, function()
|
||||
minetest.add_particle({
|
||||
pos = {x=pos.x+math.random(-2,2)/10, y=pos.y, z=pos.z+math.random(-2,2)/10},
|
||||
velocity = {x=0, y=math.random(5,10)/10, z=0},
|
||||
acceleration = {x=math.random(0,5)/10, y=0.5, z=math.random(0,5)/10},
|
||||
expirationtime = math.random(2,5)/10,
|
||||
size = math.random(4,8),
|
||||
collisiondetection = false,
|
||||
collisionremoval = false,
|
||||
vertical = false,
|
||||
texture = "hyruletools_flame.png",
|
||||
glow = 9
|
||||
})
|
||||
end)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -2108,6 +2304,16 @@ minetest.register_node("hyrule_mapgen:dungeon_brick", {
|
|||
groups = {cracky=3},
|
||||
})
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"dungeon_brick",
|
||||
"hyrule_mapgen:dungeon_brick",
|
||||
{cracky = 3, cools_lava = 1},
|
||||
{"hyrule_mapgen_dungeon_brick.png"},
|
||||
"Retro Dungeon Stair",
|
||||
"Retro Dungeon Slab",
|
||||
default.node_sound_stone_defaults()
|
||||
)
|
||||
|
||||
minetest.register_node("hyrule_mapgen:dungeon_barrier2", {
|
||||
description = "Retro Dungeon Barrier 2",
|
||||
tiles = {
|
||||
|
@ -2132,6 +2338,16 @@ minetest.register_node("hyrule_mapgen:dungeon_brick2", {
|
|||
groups = {cracky=3},
|
||||
})
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"dungeon_brick2",
|
||||
"hyrule_mapgen:dungeon_brick2",
|
||||
{cracky = 3, cools_lava = 1},
|
||||
{"hyrule_mapgen_dungeon_brick2.png"},
|
||||
"Retro Dungeon Stair 2",
|
||||
"Retro Dungeon Slab 2",
|
||||
default.node_sound_stone_defaults()
|
||||
)
|
||||
|
||||
minetest.register_node("hyrule_mapgen:dungeon_torch", {
|
||||
description = "Dungeon Torch",
|
||||
drawtype = "plantlike",
|
||||
|
@ -2600,7 +2816,7 @@ minetest.register_craft({
|
|||
minetest.register_node("hyrule_mapgen:boulder", {
|
||||
description = "Boulder",
|
||||
tiles = {
|
||||
"default_stone.png",
|
||||
"hyrule_mapgen_boulder.png",
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
|
@ -2674,7 +2890,7 @@ minetest.register_node("hyrule_mapgen:magic_tree", {
|
|||
"hyrule_mapgen_magic_tree.png"
|
||||
},
|
||||
paramtype = "facedir",
|
||||
groups = {tree=1, choppy=2, flammable=2, oddly_breakable_by_hand = 1, not_in_creative_inventory=1},
|
||||
groups = {tree=1, choppy=2, flammable=2, oddly_breakable_by_hand = 1,},
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
|
@ -2684,7 +2900,7 @@ minetest.register_node("hyrule_mapgen:magic_leaves", {
|
|||
tiles = {
|
||||
"hyrule_mapgen_magic_leaves.png"
|
||||
},
|
||||
groups = {snappy=3, flammable=1, leafdecay=3, oddly_breakable_by_hand = 1, leaves=1, not_in_creative_inventory=1},
|
||||
groups = {snappy=3, flammable=1, leafdecay=3, oddly_breakable_by_hand = 1, leaves=1,},
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
})
|
||||
|
@ -2731,7 +2947,7 @@ minetest.register_node("hyrule_mapgen:palm_leaves", {
|
|||
"hyrule_mapgen_palm_leaf.png"
|
||||
},
|
||||
inventory_image = "hyrule_mapgen_palm_leaf.png",
|
||||
visual_scale = 3,
|
||||
visual_scale = 6,
|
||||
wield_scale = {x=0.5, y=0.5, z=0.5},
|
||||
groups = {snappy=3, flammable=1, leafdecay=3, oddly_breakable_by_hand = 1, leaves=1, not_in_creative_inventory=1},
|
||||
paramtype = "light",
|
||||
|
@ -2753,6 +2969,10 @@ minetest.register_node("hyrule_mapgen:coconut", {
|
|||
groups = {snappy=3, flammable=1, oddly_breakable_by_hand = 1, not_in_creative_inventory=1},
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.2, -0.3, -0.2, 0.2, 0.3, 0.2}
|
||||
},
|
||||
on_use = minetest.item_eat(2)
|
||||
})
|
||||
|
||||
|
@ -2767,7 +2987,7 @@ minetest.register_node("hyrule_mapgen:wild_tree", {
|
|||
"hyrule_mapgen_wild_tree.png"
|
||||
},
|
||||
paramtype = "facedir",
|
||||
groups = {tree=1, choppy=2, oddly_breakable_by_hand = 1, flammable=2, not_in_creative_inventory=1},
|
||||
groups = {tree=1, choppy=2, oddly_breakable_by_hand = 1, flammable=2,},
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
|
@ -2779,7 +2999,7 @@ minetest.register_node("hyrule_mapgen:wild_leaves", {
|
|||
},
|
||||
wield_image = "hyrule_mapgen_wild_leaves.png",
|
||||
inventory_image = "hyrule_mapgen_wild_leaves.png",
|
||||
groups = {snappy=3, flammable=1, oddly_breakable_by_hand = 1, leafdecay=3, leaves=1, not_in_creative_inventory=1},
|
||||
groups = {snappy=3, flammable=1, oddly_breakable_by_hand = 1, leafdecay=3, leaves=1,},
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
})
|
||||
|
|
|
@ -881,6 +881,52 @@ minetest.register_decoration({
|
|||
y_min = 0,
|
||||
y_max = 50,
|
||||
})
|
||||
--berry bushes and mushrooms
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:snowblock", "default:dirt_with_snow"},
|
||||
sidelen = 26,
|
||||
fill_ratio = 0.002,
|
||||
biomes = {"taiga"},
|
||||
decoration = "hyrule_mapgen:berry_bush",
|
||||
height = 1,
|
||||
})
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:snowblock", "default:dirt_with_snow"},
|
||||
sidelen = 26,
|
||||
fill_ratio = 0.002,
|
||||
biomes = {"taiga"},
|
||||
decoration = "hyrule_mapgen:chillshroom",
|
||||
height = 1,
|
||||
})
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:desert_sand", "default:desert_stone"},
|
||||
sidelen = 26,
|
||||
fill_ratio = 0.002,
|
||||
biomes = {"desert"},
|
||||
decoration = "hyrule_mapgen:sunshroom",
|
||||
height = 1,
|
||||
})
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass2"},
|
||||
sidelen = 26,
|
||||
fill_ratio = 0.002,
|
||||
biomes = {"lost_woods"},
|
||||
decoration = "hyrule_mapgen:zapshroom",
|
||||
height = 1,
|
||||
})
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_dry_grass"},
|
||||
sidelen = 26,
|
||||
fill_ratio = 0.002,
|
||||
biomes = {"savanna"},
|
||||
decoration = "hyrule_mapgen:rushroom",
|
||||
height = 1,
|
||||
})
|
||||
|
||||
-- Jungle tree
|
||||
minetest.register_decoration({
|
||||
|
@ -1624,6 +1670,22 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp)
|
||||
if maxp.y > -3 or maxp.y < -500 then
|
||||
return
|
||||
end
|
||||
local stone = minetest.find_nodes_in_area(minp, maxp,
|
||||
{"default:ice"})
|
||||
for n = 1, #stone do
|
||||
if math.random(1, 50) == 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 == "air" then
|
||||
minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "hyrule_mapgen:chillshroom_2"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp)
|
||||
if maxp.y < -150 or maxp.y > 20 then
|
||||
return
|
||||
|
@ -1715,6 +1777,7 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
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", 0, {}, true)
|
||||
minetest.after(0.1, function()
|
||||
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'"
|
||||
|
@ -1724,6 +1787,7 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
npc.xdir = -1
|
||||
npc.skin = "mobs_witch.png"
|
||||
npc.object:set_properties({textures = {"mobs_witch.png"}})
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1740,6 +1804,7 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
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/pine_village.mts", 0, {}, true)
|
||||
minetest.after(0.1, function()
|
||||
local obj = minetest.env:add_entity({x=pos.x+4, y=pos.y+7, z=pos.z+5}, "mobs_npc:shopkeeper")
|
||||
local obj = minetest.env:add_entity({x=pos.x+6, y=pos.y+3, z=pos.z+18}, "mobs_npc:npc_custom")
|
||||
local npc = obj:get_luaentity()
|
||||
|
@ -1757,6 +1822,7 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
npc2.reward_item = "witchcraft:potion_herbal"
|
||||
npc2.skin = "mobs_witch.png"
|
||||
npc2.zdir = -1
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1773,6 +1839,7 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
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/savanna_village.mts", 0, {}, true)
|
||||
minetest.after(0.1, function()
|
||||
local shopkeeper = minetest.env:add_entity({x=pos.x+6, y=pos.y+6, z=pos.z+2}, "mobs_npc:shopkeeper")
|
||||
local windmill = minetest.env:add_entity({x=pos.x+23, y=pos.y+13, z=pos.z+29}, "hyrule_mapgen:windmill")
|
||||
local obj = minetest.env:add_entity({x=pos.x+9, y=pos.y+9, z=pos.z+33}, "mobs_npc:npc_custom")
|
||||
|
@ -1783,6 +1850,7 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
npc.reward_item = "hyruletools:green_rupee"
|
||||
npc.item_count = 500
|
||||
npc.zdir = -1
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1797,6 +1865,7 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
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/world"..num..".mts", 0, {}, true)
|
||||
if num == 1 then
|
||||
minetest.after(0.1, function()
|
||||
local obj = minetest.env:add_entity({x=pos.x+5, y=pos.y+3, z=pos.z+4}, "mobs_npc:npc_custom")
|
||||
local npc = obj:get_luaentity()
|
||||
npc.text = "Deku Scrubs have been scaring my animals..."
|
||||
|
@ -1806,15 +1875,18 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
npc.skin = "mobs_farmer.png"
|
||||
npc.item_count = 10
|
||||
npc.zdir = -1
|
||||
end)
|
||||
end
|
||||
|
||||
if num == 5 then
|
||||
minetest.after(0.1, function()
|
||||
local obj = minetest.env:add_entity({x=pos.x+3, y=pos.y+3, z=pos.z+3}, "mobs_npc:npc_custom")
|
||||
local npc = obj:get_luaentity()
|
||||
npc.skin = "mobs_npc_old.png"
|
||||
npc.text = "It's dangerous to travel in darkness"
|
||||
npc.item = "hyruletools:lantern"
|
||||
npc.xdir = 1
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1858,7 +1930,7 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
else
|
||||
local number = math.random(1,5)
|
||||
if math.random(1,5) == 1 then
|
||||
minetest.place_schematic(pos, minetest.get_modpath("hyrule_mapgen").."/schematics/dungeon"..number..".mts", 0, {{["hyrule_mapgen:chest"] = "hyrule_mapgen:chest_key",}}, true)
|
||||
minetest.place_schematic(pos, minetest.get_modpath("hyrule_mapgen").."/schematics/dungeon"..number..".mts", 0, {["hyrule_mapgen:chest"] = "hyrule_mapgen:chest_key",}, true)
|
||||
minetest.add_node({x=pos.x+math.random(1,12), y=pos.y+1, z=pos.z+math.random(1,12)}, {name = "mobs_loz:mimic_chest"})
|
||||
else
|
||||
minetest.place_schematic(pos, minetest.get_modpath("hyrule_mapgen").."/schematics/dungeon"..number..".mts", 0, {}, true)
|
||||
|
|
Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 749 B |
After Width: | Height: | Size: 637 B |
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 484 B |
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 500 B |
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 547 B |
After Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 370 B |
After Width: | Height: | Size: 322 B |
After Width: | Height: | Size: 328 B |
After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 283 B After Width: | Height: | Size: 283 B |
After Width: | Height: | Size: 354 B |
After Width: | Height: | Size: 375 B |
After Width: | Height: | Size: 374 B |
After Width: | Height: | Size: 348 B |
After Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 591 B After Width: | Height: | Size: 358 B |
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 487 B |
After Width: | Height: | Size: 353 B |
After Width: | Height: | Size: 341 B |
After Width: | Height: | Size: 306 B |
|
@ -0,0 +1,208 @@
|
|||
if minetest.setting_get("enable_weather") then
|
||||
local weathers = {
|
||||
{"snow", "rain", "storm", "pollen", "dust", "insects", "none"},
|
||||
}
|
||||
|
||||
local nodes = {
|
||||
{{"default:snow", "default:snowblock"}, nil, nil, {"default:dirt"}, {"default:desert_sand"}, {"group:flower", "moreplants:tallgrass"}, nil}
|
||||
}
|
||||
|
||||
hyrule_weather = {}
|
||||
|
||||
minetest.register_node("hyrule_weather:ice", {
|
||||
description = "ice sheet",
|
||||
tiles = {
|
||||
"hyrule_weather_ice.png",
|
||||
},
|
||||
use_texture_alpha = true,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, -- NodeBox1
|
||||
}
|
||||
},
|
||||
drop = "hyruletools:ice_fragment",
|
||||
groups = {cracky=1, oddly_breakable_by_hand=1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
local apply_weather = function(player, pos, weather_type)
|
||||
if weather_type == nil then return end
|
||||
--weather effects
|
||||
if weather_type == "snow" then
|
||||
if minetest.get_timeofday()*24000 >= 6000 and minetest.get_timeofday()*24000 <= 19000 then
|
||||
player:set_sky({r=208, g=223, b=238}, "plain", nil, true)
|
||||
end
|
||||
for i=1,8 do
|
||||
local water = minetest.find_node_near({x=pos.x+math.random(-7,7), y=pos.y+math.random(-4,4), z=pos.z+math.random(-7,7)}, 10, {"default:water_source", "default:river_water_source"}, true)
|
||||
water.y = water.y+1
|
||||
if minetest.get_node(water).name == "air" then
|
||||
minetest.set_node(water, {name="hyrule_weather:ice"})
|
||||
end
|
||||
minetest.add_particle({
|
||||
pos = {x=pos.x+math.random(-10,10), y=pos.y+math.random(12,17), z=pos.z+math.random(-10,10)},
|
||||
velocity = {x=math.random(-5,5)/10, y=math.random(-4,-6), z=math.random(-5,5)/10},
|
||||
acceleration = {x=math.random(-1,1)/10, y=math.random(-5,-10)/10, z=math.random(-1,1)/10},
|
||||
expirationtime = 3,
|
||||
size = math.random(3,5),
|
||||
collisiondetection = true,
|
||||
collision_removal = true,
|
||||
vertical = false,
|
||||
texture = "hyrule_weather_snow_"..math.random(1,2)..".png",
|
||||
glow = 0
|
||||
})
|
||||
end
|
||||
elseif weather_type == "rain" then
|
||||
if minetest.get_timeofday()*24000 >= 6000 and minetest.get_timeofday()*24000 <= 19000 then
|
||||
player:set_sky({r=177, g=177, b=177}, "plain", nil, true)
|
||||
end
|
||||
for i=1,12 do
|
||||
minetest.add_particle({
|
||||
pos = {x=pos.x+math.random(-10,10), y=pos.y+math.random(12,17), z=pos.z+math.random(-10,10)},
|
||||
velocity = {x=0, y=math.random(-15,-20), z=0},
|
||||
acceleration = {x=0, y=-1, z=0},
|
||||
expirationtime = 2,
|
||||
size = math.random(3,5),
|
||||
collisiondetection = true,
|
||||
collision_removal = true,
|
||||
vertical = true,
|
||||
texture = "hyrule_weather_rain_"..math.random(1,2)..".png",
|
||||
glow = 0
|
||||
})
|
||||
end
|
||||
elseif weather_type == "storm" then
|
||||
if minetest.get_timeofday()*24000 >= 6000 and minetest.get_timeofday()*24000 <= 19000 then
|
||||
player:set_sky({r=101, g=101, b=101}, "plain", nil, true)
|
||||
end
|
||||
for i=1,25 do
|
||||
minetest.add_particle({
|
||||
pos = {x=pos.x+math.random(-10,10), y=pos.y+math.random(12,17), z=pos.z+math.random(-10,10)},
|
||||
velocity = {x=0, y=math.random(-25,-30), z=0},
|
||||
acceleration = {x=0, y=-1, z=0},
|
||||
expirationtime = 2,
|
||||
size = math.random(3,5),
|
||||
collisiondetection = true,
|
||||
collision_removal = true,
|
||||
vertical = true,
|
||||
texture = "hyrule_weather_rain_3.png",
|
||||
glow = 0
|
||||
})
|
||||
if math.random(1,2000) == 1 then
|
||||
lightning.strike()
|
||||
end
|
||||
end
|
||||
elseif weather_type == "pollen" then
|
||||
if minetest.get_timeofday()*24000 >= 6000 and minetest.get_timeofday()*24000 <= 19000 then
|
||||
player:set_sky({r=158, g=220, b=119}, "plain", nil, true)
|
||||
end
|
||||
for i=1,12 do
|
||||
minetest.add_particle({
|
||||
pos = {x=pos.x+math.random(-5,5), y=pos.y+math.random(0,5), z=pos.z+math.random(-5,5)},
|
||||
velocity = {x = math.random(-2,2)/10, y = math.random(2,3)/10, z = math.random(-2,2)/10},
|
||||
acceleration = {x = math.random(-2,2)/10, y=0.2, z = math.random(-2,2)/10},
|
||||
expirationtime = 0.6,
|
||||
size = math.random(12,15)/10,
|
||||
collisiondetection = true,
|
||||
collision_removal = true,
|
||||
vertical = false,
|
||||
texture = "hyrule_weather_pollen_"..math.random(1,2)..".png",
|
||||
glow = 5
|
||||
})
|
||||
end
|
||||
elseif weather_type == "dust" then
|
||||
if minetest.get_timeofday()*24000 >= 6000 and minetest.get_timeofday()*24000 <= 19000 then
|
||||
player:set_sky({r=215, g=156, b=91}, "plain", nil, true)
|
||||
end
|
||||
for i=1,12 do
|
||||
minetest.add_particle({
|
||||
pos = {x=pos.x+math.random(-10,10), y=pos.y+math.random(1,3)/10, z=pos.z+math.random(-10,10)},
|
||||
velocity = {x=1, y=math.random(1,2), z=1},
|
||||
acceleration = {x=4, y=math.random(2,3)/10, z=4},
|
||||
expirationtime = 0.5,
|
||||
size = math.random(3,5),
|
||||
collisiondetection = true,
|
||||
collision_removal = true,
|
||||
vertical = false,
|
||||
texture = "hyrule_weather_dust_1.png",
|
||||
glow = 0
|
||||
})
|
||||
end
|
||||
elseif weather_type == "insects" then
|
||||
player:set_sky(nil, "regular", nil, true)
|
||||
elseif weather_type == "none" then
|
||||
player:set_sky(nil, "regular", nil, true)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function()
|
||||
if math.random(1,500) == 1 then
|
||||
for _, row in ipairs(weathers) do
|
||||
local num = math.random(1,7)
|
||||
hyrule_weather.current = num
|
||||
hyrule_weather.weather = row[num]
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_globalstep(function(dtime)
|
||||
if math.random(1,4) ~= 4 or hyrule_weather.weather == "twilight" then return end
|
||||
--select random weather (serverwide)
|
||||
if math.random(1,5000) == 1 then
|
||||
for _, row in ipairs(weathers) do
|
||||
local num = math.random(1,7)
|
||||
hyrule_weather.current = num
|
||||
hyrule_weather.weather = row[num]
|
||||
end
|
||||
end
|
||||
if minetest.get_day_count() <= 2 then
|
||||
hyrule_weather.current = 3
|
||||
hyrule_weather.weather = "storm"
|
||||
end
|
||||
--player specific
|
||||
for _, player in ipairs(minetest.get_connected_players()) do
|
||||
local pos = player:getpos()
|
||||
--check if weather should occur at current location
|
||||
local display_weather = false
|
||||
for _, row in ipairs(nodes) do
|
||||
if row[hyrule_weather.current] ~= nil and minetest.find_node_near(pos, 5, row[hyrule_weather.current]) then
|
||||
display_weather = true
|
||||
elseif row[hyrule_weather.current] == nil then
|
||||
display_weather = true
|
||||
else
|
||||
display_weather = false
|
||||
end
|
||||
end
|
||||
--apply weather effect
|
||||
if display_weather then
|
||||
apply_weather(player, pos, hyrule_weather.weather)
|
||||
else
|
||||
apply_weather(player, pos, "none")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
minetest.register_privilege("weather", {
|
||||
description = "Allows control of weather",
|
||||
give_to_singleplayer = false
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("change_weather", {
|
||||
params = "<weather_type>",
|
||||
description = "Sets weather to the given type",
|
||||
privs = {weather = true},
|
||||
func = function(name, param)
|
||||
hyrule_weather.weather = param
|
||||
for _, row in ipairs(weathers) do
|
||||
for i=1,7 do
|
||||
if row[i] == param then
|
||||
hyrule_weather.current = i
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
After Width: | Height: | Size: 127 B |
After Width: | Height: | Size: 843 B |
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 349 B |
Before Width: | Height: | Size: 801 B After Width: | Height: | Size: 801 B |
After Width: | Height: | Size: 119 B |
After Width: | Height: | Size: 113 B |
After Width: | Height: | Size: 112 B |
After Width: | Height: | Size: 137 B |
After Width: | Height: | Size: 161 B |
|
@ -1,4 +1,5 @@
|
|||
default
|
||||
weather_pack
|
||||
3d_armor
|
||||
playereffects
|
||||
playereffects
|
||||
hyrule_weather
|
||||
lightning
|
After Width: | Height: | Size: 526 B |
After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 527 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 471 B |
After Width: | Height: | Size: 347 B |