hud item counters, rupee sounds, dodongo sound
parent
c7be93802a
commit
d4e3cc8617
|
@ -2582,6 +2582,72 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:boulder", {
|
||||
description = "Boulder",
|
||||
tiles = {
|
||||
"default_stone.png",
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 1.0625, 0.5}, -- NodeBox1
|
||||
{-0.5, -0.375, -0.625, 0.5, 0.9375, 0.625}, -- NodeBox2
|
||||
{-0.625, -0.375, -0.5, 0.625, 0.9375, 0.5}, -- NodeBox3
|
||||
{-0.5, -0.25, -0.6875, 0.5, 0.8125, 0.6875}, -- NodeBox4
|
||||
{-0.6875, -0.25, -0.5, 0.6875, 0.8125, 0.5}, -- NodeBox5
|
||||
{-0.5625, -0.25, -0.5625, 0.5625, 0.8125, 0.5625}, -- NodeBox6
|
||||
}
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 1.0625, 0.5}, -- NodeBox1
|
||||
{-0.5, -0.375, -0.625, 0.5, 0.9375, 0.625}, -- NodeBox2
|
||||
{-0.625, -0.375, -0.5, 0.625, 0.9375, 0.5}, -- NodeBox3
|
||||
{-0.5, -0.25, -0.6875, 0.5, 0.8125, 0.6875}, -- NodeBox4
|
||||
{-0.6875, -0.25, -0.5, 0.6875, 0.8125, 0.5}, -- NodeBox5
|
||||
{-0.5625, -0.25, -0.5625, 0.5625, 0.8125, 0.5625}, -- NodeBox6
|
||||
}
|
||||
},
|
||||
groups = {explody=1},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:snowball", {
|
||||
description = "Snow Boulder",
|
||||
tiles = {
|
||||
"default_snow.png",
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 1.0625, 0.5}, -- NodeBox1
|
||||
{-0.5, -0.375, -0.625, 0.5, 0.9375, 0.625}, -- NodeBox2
|
||||
{-0.625, -0.375, -0.5, 0.625, 0.9375, 0.5}, -- NodeBox3
|
||||
{-0.5, -0.25, -0.6875, 0.5, 0.8125, 0.6875}, -- NodeBox4
|
||||
{-0.6875, -0.25, -0.5, 0.6875, 0.8125, 0.5}, -- NodeBox5
|
||||
{-0.5625, -0.25, -0.5625, 0.5625, 0.8125, 0.5625}, -- NodeBox6
|
||||
}
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 1.0625, 0.5}, -- NodeBox1
|
||||
{-0.5, -0.375, -0.625, 0.5, 0.9375, 0.625}, -- NodeBox2
|
||||
{-0.625, -0.375, -0.5, 0.625, 0.9375, 0.5}, -- NodeBox3
|
||||
{-0.5, -0.25, -0.6875, 0.5, 0.8125, 0.6875}, -- NodeBox4
|
||||
{-0.6875, -0.25, -0.5, 0.6875, 0.8125, 0.5}, -- NodeBox5
|
||||
{-0.5625, -0.25, -0.5625, 0.5625, 0.8125, 0.5625}, -- NodeBox6
|
||||
}
|
||||
},
|
||||
groups = {explody=1},
|
||||
sounds = default.node_sound_dirt_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node("hyrule_mapgen:magic_tree", {
|
||||
description = "magic tree trunk",
|
||||
tiles = {
|
||||
|
|
|
@ -844,6 +844,44 @@ minetest.register_decoration({
|
|||
y_max = 50,
|
||||
})
|
||||
|
||||
--boulders and snow boulders
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"hyrule_mapgen:lavabiome_dirt", "default:dirt_with_dry_grass", "default:desert_sand"},
|
||||
sidelen = 80,
|
||||
noise_params = {
|
||||
offset = 0.002,
|
||||
scale = 0.003,
|
||||
spread = {x = 50, y = 50, z = 50},
|
||||
seed = 329,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"lavabiome", "desert", "savanna"},
|
||||
decoration = "hyrule_mapgen:boulder",
|
||||
y_min = 0,
|
||||
y_max = 50,
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:snow", "default:dirt_with_snow"},
|
||||
sidelen = 80,
|
||||
noise_params = {
|
||||
offset = 0.002,
|
||||
scale = 0.003,
|
||||
spread = {x = 50, y = 50, z = 50},
|
||||
seed = 329,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"icesheet", "taiga"},
|
||||
decoration = "hyrule_mapgen:snowball",
|
||||
y_min = 0,
|
||||
y_max = 50,
|
||||
})
|
||||
|
||||
-- Jungle tree
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
|
|
|
@ -1,7 +1,54 @@
|
|||
if minetest.setting_getbool("loz_mode") then
|
||||
|
||||
--hud (rupee counter)
|
||||
--[[
|
||||
--
|
||||
local count = 0
|
||||
local count2 = 0
|
||||
local count3 = 0
|
||||
local counter1 = nil
|
||||
local counter2 = nil
|
||||
local counter3 = nil
|
||||
|
||||
minetest.register_globalstep(function()
|
||||
for _, player in ipairs(minetest.get_connected_players()) do
|
||||
count = 0
|
||||
count2 = 0
|
||||
count3 = 0
|
||||
local number = 0
|
||||
local number2 = 0
|
||||
local number3 = 0
|
||||
local playername = player:get_player_name()
|
||||
local inv = minetest.get_inventory({type="player", name=playername});
|
||||
for num=1,32,1 do
|
||||
local stack = inv:get_stack("main", num)
|
||||
if stack:get_name() == "hyruletools:green_rupee" then
|
||||
number = stack:get_count()
|
||||
count = count+number
|
||||
end
|
||||
if stack:get_name() == "hyruletools:blue_rupee" then
|
||||
number = stack:get_count()
|
||||
count = count+number*2
|
||||
end
|
||||
if stack:get_name() == "hyruletools:red_rupee" then
|
||||
number = stack:get_count()
|
||||
count = count+number*3
|
||||
end
|
||||
if stack:get_name() == "tnt:tnt" then
|
||||
number2 = stack:get_count()
|
||||
count2 = count2+number2
|
||||
end
|
||||
if stack:get_name() == "hyruletools:key" then
|
||||
number3 = stack:get_count()
|
||||
count3 = count3+number3
|
||||
end
|
||||
end
|
||||
player:hud_change(counter1, "text", count)
|
||||
player:hud_change(counter2, "text", count2)
|
||||
player:hud_change(counter3, "text", count3)
|
||||
return count
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local rupee = player:hud_add({
|
||||
hud_elem_type = "image",
|
||||
|
@ -13,19 +60,28 @@ local rupee = player:hud_add({
|
|||
text = "hyruletools_green_rupee.png"
|
||||
})
|
||||
|
||||
local arrow = player:hud_add({
|
||||
local bomb = player:hud_add({
|
||||
hud_elem_type = "image",
|
||||
position = {x = 0.05, y = 0.8},
|
||||
position = {x = 0.05, y = 0.825},
|
||||
scale = {
|
||||
x = 3,
|
||||
y = 3
|
||||
},
|
||||
text = "bows_arrow_wood.png"
|
||||
text = "hyruletools_bombico.png"
|
||||
})
|
||||
local key = player:hud_add({
|
||||
hud_elem_type = "image",
|
||||
position = {x = 0.05, y = 0.75},
|
||||
scale = {
|
||||
x = 3,
|
||||
y = 3
|
||||
},
|
||||
text = "hyruletools_key.png"
|
||||
})
|
||||
|
||||
local text1 = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = {x = 0.1, y = 0.8},
|
||||
position = {x = 0.075, y = 0.825},
|
||||
scale = {
|
||||
x = 3,
|
||||
y = 3
|
||||
|
@ -35,35 +91,57 @@ local text1 = player:hud_add({
|
|||
})
|
||||
|
||||
local text1 = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = {x = 0.075, y = 0.9},
|
||||
scale = {
|
||||
x = 3,
|
||||
y = 3
|
||||
},
|
||||
text = "x ",
|
||||
number = 0xFFFFFF
|
||||
})
|
||||
local text1 = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = {x = 0.075, y = 0.75},
|
||||
scale = {
|
||||
x = 3,
|
||||
y = 3
|
||||
},
|
||||
text = "x ",
|
||||
number = 0xFFFFFF
|
||||
})
|
||||
counter1 = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = {x = 0.09, y = 0.9},
|
||||
scale = {
|
||||
x = 3,
|
||||
y = 3
|
||||
},
|
||||
text = "x ",
|
||||
text = count,
|
||||
number = 0xFFFFFF
|
||||
})
|
||||
counter2 = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = {x = 0.09, y = 0.825},
|
||||
scale = {
|
||||
x = 3,
|
||||
y = 3
|
||||
},
|
||||
text = count2,
|
||||
number = 0xFFFFFF
|
||||
})
|
||||
counter3 = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = {x = 0.09, y = 0.75},
|
||||
scale = {
|
||||
x = 3,
|
||||
y = 3
|
||||
},
|
||||
text = count3,
|
||||
number = 0xFFFFFF
|
||||
})
|
||||
end)
|
||||
--]]
|
||||
|
||||
--[[
|
||||
minetest.register_globalstep(function()
|
||||
for _, player in ipairs(minetest.get_connected_players()) do
|
||||
local playername = player:get_player_name()
|
||||
local inv = minetest.get_inventory({type="player", name=playername});
|
||||
if inv:contains_item("main", "hyruletools:green_rupee") then
|
||||
for num=1,10,1 do
|
||||
local stack = inv:get_stack("main", num)
|
||||
if stack:get_name() == "hyruletools:green_rupee" then
|
||||
number = stack:get_count()
|
||||
end
|
||||
end
|
||||
minetest.chat_send_all(number)
|
||||
end
|
||||
end
|
||||
end)
|
||||
]]
|
||||
--
|
||||
|
||||
--player effects
|
||||
|
||||
|
@ -717,24 +795,28 @@ minetest.register_craftitem("hyruletools:red_rupee", {
|
|||
description = "Red Rupee",
|
||||
inventory_image = "hyruletools_red_rupee.png",
|
||||
stack_max = 1000,
|
||||
groups = {rupee = 1}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("hyruletools:green_rupee", {
|
||||
description = "Green Rupee",
|
||||
inventory_image = "hyruletools_green_rupee.png",
|
||||
stack_max = 1000,
|
||||
groups = {rupee = 1}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("hyruletools:blue_rupee", {
|
||||
description = "Blue Rupee",
|
||||
inventory_image = "hyruletools_blue_rupee.png",
|
||||
stack_max = 1000,
|
||||
groups = {rupee = 1}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("hyruletools:nyan_rupee", {
|
||||
description = "Nyan Rupee",
|
||||
inventory_image = "hyruletools_nyan_rupee.png",
|
||||
stack_max = 1000,
|
||||
groups = {rupee = 1}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("hyruletools:red_ore", {
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 264 B |
|
@ -6,10 +6,16 @@ minetest.register_globalstep(function(dtime)
|
|||
|
||||
for _,object in ipairs(minetest.get_objects_inside_radius(pos, 0.75)) do
|
||||
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" then
|
||||
if inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
|
||||
inv:add_item("main", ItemStack(object:get_luaentity().itemstring))
|
||||
if object:get_luaentity().itemstring ~= "" then
|
||||
local itemstring = object:get_luaentity().itemstring
|
||||
if inv and inv:room_for_item("main", ItemStack(itemstring)) then
|
||||
inv:add_item("main", ItemStack(itemstring))
|
||||
if itemstring ~= "" then
|
||||
local itemname = ItemStack(itemstring):to_table().name
|
||||
if minetest.get_item_group(itemname, "rupee") ~= 0 then
|
||||
minetest.sound_play("rupee", {pos = pos, gain = 0.3, max_hear_distance = 16})
|
||||
else
|
||||
minetest.sound_play("item_drop_pickup", {pos = pos, gain = 0.3, max_hear_distance = 16})
|
||||
end
|
||||
end
|
||||
object:get_luaentity().itemstring = ""
|
||||
object:remove()
|
||||
|
@ -42,7 +48,11 @@ minetest.register_globalstep(function(dtime)
|
|||
if inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
|
||||
inv:add_item("main", ItemStack(object:get_luaentity().itemstring))
|
||||
if object:get_luaentity().itemstring ~= "" then
|
||||
if minetest.get_item_group(object:get_luaentity().itemstring, "rupee") ~= 0 then
|
||||
minetest.sound_play("rupee", {pos = pos, gain = 0.3, max_hear_distance = 16})
|
||||
else
|
||||
minetest.sound_play("item_drop_pickup", {pos = pos, gain = 0.3, max_hear_distance = 16})
|
||||
end
|
||||
end
|
||||
object:get_luaentity().itemstring = ""
|
||||
object:remove()
|
||||
|
|
|
@ -87,7 +87,7 @@ mobs:register_mob("mobs_loz:dodongo", {
|
|||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "mobs_stonemonster",
|
||||
random = "dinosaur_roar",
|
||||
},
|
||||
walk_velocity = 0.5,
|
||||
run_velocity = 1,
|
||||
|
@ -179,7 +179,7 @@ mobs:register_mob("mobs_loz:dodongo_boss", {
|
|||
visual_size = {x=2.5, y=2.5},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "mobs_stonemonster",
|
||||
random = "dinosaur_roar",
|
||||
},
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3.5,
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
dinosaur_roar by Mike Keonig CC Attribution 3.0
|
|
@ -515,6 +515,48 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_entity("tnt:tnt_object", {
|
||||
visual = "mesh",
|
||||
mesh = "hyruletools_bomb.b3d",
|
||||
textures = {"hyruletools_bomb.png",},
|
||||
visual_size = {x=10, y=10},
|
||||
collision_box = {-0.1, 0, -0.1, 0.1, 0.2, 0.1},
|
||||
physical = true,
|
||||
on_activate = function(self)
|
||||
minetest.after(3, function()
|
||||
if self.object ~= nil then
|
||||
local pos = self.object:getpos()
|
||||
tnt.boom(pos, {damage_radius=3, radius=3})
|
||||
end
|
||||
end)
|
||||
end,
|
||||
on_step = function(self)
|
||||
local velo = self.object:getvelocity()
|
||||
if velo ~= nil then
|
||||
self.object:setvelocity({x=velo.x*0.95, y=velo.y, z=velo.z*0.95})
|
||||
end
|
||||
local pos = self.object:getpos()
|
||||
if pos ~= nil then
|
||||
minetest.add_particlespawner({
|
||||
amount = 5,
|
||||
time = 0.2,
|
||||
minpos = {x=pos.x, y=pos.y+0.4, z=pos.z},
|
||||
maxpos = {x=pos.x, y=pos.y+0.5, z=pos.z},
|
||||
minvel = {x=-0.5, y=-0.5, z=0.5},
|
||||
maxvel = {x=1, y=1, z=1},
|
||||
minacc = {x=-0.2, y=0, z=-0.2},
|
||||
maxacc = {x=0.2, y=0, z=0.2},
|
||||
minexptime = 0.5,
|
||||
maxexptime = 1,
|
||||
minsize = 1,
|
||||
maxsize = 2,
|
||||
collisiondetection = false,
|
||||
texture = "hyruletools_yellowstar.png"
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
function tnt.register_tnt(def)
|
||||
local name = ""
|
||||
if not def.name:find(':') then
|
||||
|
@ -547,6 +589,17 @@ function tnt.register_tnt(def)
|
|||
minetest.set_node(pos, {name = name .. "_burning"})
|
||||
end
|
||||
end,
|
||||
on_use = function(item, clicker)
|
||||
if clicker:get_wielded_item():get_name() == "tnt:tnt" then
|
||||
local pos = clicker:getpos()
|
||||
local dir = clicker:get_look_dir()
|
||||
local obj = minetest.env:add_entity({x=pos.x+dir.x*1, y=pos.y+1, z=pos.z+dir.z*1}, "tnt:tnt_object")
|
||||
obj:setvelocity({x=dir.x*8, y=dir.y*13, z=dir.z*8})
|
||||
obj:setacceleration({x=0, y=-12, z=0})
|
||||
item:take_item()
|
||||
return item
|
||||
end
|
||||
end,
|
||||
selection_box = def.selection_box,
|
||||
collision_box = def.selection_box,
|
||||
on_blast = function(pos, intensity)
|
||||
|
|
Loading…
Reference in New Issue