master
D00Med 2017-08-04 08:07:59 +10:00
parent 1a22198cf8
commit 9465990ca1
7 changed files with 88 additions and 56 deletions

View File

@ -1130,7 +1130,7 @@ minetest.register_abm({
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})
minetest.sound_play("Laser", {pos=pos, max_hear_distance=10, gain=0.5})
local ent = minetest.env:add_entity(pos, "hyrule_mapgen:laser")
ent:setvelocity({x=12*x, y=0, z=12*z})
for i=1,5 do

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

View File

@ -9,12 +9,26 @@ local counter1 = nil
local counter2 = nil
local counter3 = nil
local players = {}
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
players[name] = true
end)
minetest.register_on_leaveplayer(function(player)
local name = player:get_player_name()
players[name] = nil
end)
minetest.register_globalstep(function()
for _,player in ipairs(minetest.get_connected_players()) do
if player:get_player_name() ~= "singleplayer" then return end
for name, _ in pairs(players) do
local player = minetest.get_player_by_name(name)
if player:get_wielded_item():get_name() == "hyruletools:climbing_gloves" then
local pos = player:getpos()
--player:get_wielded_item():add_wear(2000)
local item = player:get_wielded_item()
item:add_wear(5)
player:set_wielded_item(item)
local climbable = minetest.find_node_near(pos, 1, {"default:stone", "default:obsidian", "default:sandstone", "default:ice", "default:desert_stone", "default:cobblestone", "default:desert_cobblestone"})
if climbable and minetest.get_node(pos).name == "air" then
minetest.set_node(pos, {name="hyruletools:climbable"})
@ -31,11 +45,13 @@ minetest.register_globalstep(function()
minetest.remove_node(remove_node)
end]]
elseif player:get_wielded_item():get_name() == "hyruletools:lantern" then
--minetest.chat_send_all("blah")
local pos = player:getpos()
local item = player:get_wielded_item()
item:add_wear(2000)
pos.y = pos.y+1
if minetest.get_node(pos).name == "air" then
local item = player:get_wielded_item()
item:add_wear(30)
player:set_wielded_item(item)
minetest.set_node(pos, {name="hyruletools:light"})
end
for i=1,2 do
@ -44,8 +60,10 @@ minetest.register_globalstep(function()
minetest.remove_node(remove_node)
end
end
return item
end
end
for _,player in ipairs(minetest.get_connected_players()) do
if player:get_player_name() ~= "singleplayer" then return end
count = 0
count2 = 0
count3 = 0
@ -1335,6 +1353,15 @@ minetest.register_tool("hyruletools:climbing_gloves", {
inventory_image = "hyruletools_climbing_gloves.png"
})
minetest.register_craft({
output = "hyruletools:climbing_gloves",
recipe = {
{"default:stick", "", "default:stick"},
{"default:steel_ingot", "", "default:steel_ingot"},
{"mobs:leather", "", "mobs:leather"}
}
})
--[[minetest.register_node("hyruletools:climbable2", {
drawtype = "airlike",
groups = {not_in_creative_inventory=1},

View File

@ -68,8 +68,13 @@ if mobs.mod and mobs.mod == "redo" then
punch_start = 1, punch_end = 10
},
on_rightclick = function(self, clicker)
if clicker:get_wielded_item():get_name() == "bucket:bucket_empty" and math.random(1,3) == 3 or clicker:get_wielded_item():get_name() == "mobs:net" and math.random(1,2) == 1 then
mobs:capture_mob(self, clicker, 1, 1, 0, true, nil)
local itemstack = clicker:get_wielded_item()
if itemstack:get_name() == "bucket:bucket_empty" and math.random(1,3) == 3 then
itemstack:take_item()
clicker:set_wielded_item(itemstack)
local pos = self.object:getpos()
minetest.add_item(pos, "mobs_fairy:fairy")
self.object:remove()
end
end
})

View File

@ -11,7 +11,7 @@ mobs:register_mob("mobs_loz:bdodongo", {
hp_min = 12,
hp_max = 25,
armor = 160,
collisionbox = {-0.2, 0, -0.2, 0.2, 0.4, 0.4},
collisionbox = {-0.2, -0.1, -0.2, 0.2, 0.4, 0.4},
visual = "mesh",
mesh = "bdodongo.b3d",
textures = {

View File

@ -24,7 +24,7 @@ mobs:register_mob("mobs_loz:zora_male", {
runaway = true,
runaway_timer = 40,
jump = false,
stepheight = 1.5,
stepheight = 0,
fly = true,
fly_in = "default:water_source",
jump_height = 0,
@ -59,7 +59,7 @@ mobs:register_mob("mobs_loz:zora_male", {
do_custom = function(self)
if not self.child
and math.random(1, 20000) == 1 then
and math.random(1, 50000) == 1 then
local pos = self.object:getpos()
@ -92,7 +92,7 @@ mobs:register_mob("mobs_loz:zora_female", {
runaway = true,
runaway_timer = 40,
jump = false,
stepheight = 1.5,
stepheight = 0,
fly = true,
fly_in = "default:water_source",
jump_height = 0,
@ -127,7 +127,7 @@ mobs:register_mob("mobs_loz:zora_female", {
do_custom = function(self)
if not self.child
and math.random(1, 20000) == 1 then
and math.random(1, 50000) == 1 then
local pos = self.object:getpos()

View File

@ -14,7 +14,7 @@ minetest.register_node("moreplants:tallgrass", {
inventory_image = "moreplants_longgrass.png",
visual_scale = 1.4,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -34,7 +34,7 @@ minetest.register_node("moreplants:grass", {
inventory_image = "moreplants_grass.png",
visual_scale = 1.1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -54,7 +54,7 @@ minetest.register_node("moreplants:pinkflower2", {
inventory_image = "moreplants_pink.png",
visual_scale = 1.4,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -74,7 +74,7 @@ minetest.register_node("moreplants:seaweed1", {
inventory_image = "moreplants_seaweed1.png",
visual_scale = 1.4,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1, sea=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1, sea=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -94,7 +94,7 @@ minetest.register_node("moreplants:seaweed2", {
inventory_image = "moreplants_seaweed2.png",
visual_scale = 1.4,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1, sea=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1, sea=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -114,7 +114,7 @@ minetest.register_node("moreplants:seaweed3", {
inventory_image = "moreplants_seaweed3.png",
visual_scale = 1.4,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1, sea=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1, sea=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -134,7 +134,7 @@ minetest.register_node("moreplants:aliengrass", {
inventory_image = "moreplants_aliengrass.png",
visual_scale = 1.54,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -156,7 +156,7 @@ minetest.register_node("moreplants:bulrush", {
inventory_image = "moreplants_bullrush.png",
visual_scale = 1.3,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -176,7 +176,7 @@ minetest.register_node("moreplants:bigfern", {
inventory_image = "moreplants_bigfern.png",
visual_scale = 1.5,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -196,7 +196,7 @@ minetest.register_node("moreplants:umbrella", {
inventory_image = "moreplants_umbrella.png",
visual_scale = 2,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -216,7 +216,7 @@ minetest.register_node("moreplants:bigflower", {
inventory_image = "moreplants_bigflower.png",
visual_scale = 1.2,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -236,7 +236,7 @@ minetest.register_node("moreplants:medflower", {
inventory_image = "moreplants_medflower.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -258,7 +258,7 @@ minetest.register_node("moreplants:weed", {
inventory_image = "moreplants_weed.png",
visual_scale = 1.1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -278,7 +278,7 @@ minetest.register_node("moreplants:stoneweed", {
inventory_image = "moreplants_stoneplant.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -298,7 +298,7 @@ minetest.register_node("moreplants:spikefern", {
inventory_image = "moreplants_spikefern.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -318,7 +318,7 @@ minetest.register_node("moreplants:bluespike", {
inventory_image = "moreplants_bluespike.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -338,7 +338,7 @@ minetest.register_node("moreplants:blueflower", {
inventory_image = "moreplants_blueflower.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -358,7 +358,7 @@ minetest.register_node("moreplants:eyeweed", {
inventory_image = "moreplants_eyeweed.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
drop = "moreplants:eye",
selection_box = {
@ -379,7 +379,7 @@ minetest.register_node("moreplants:fern", {
inventory_image = "moreplants_fern.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -399,7 +399,7 @@ minetest.register_node("moreplants:bush", {
inventory_image = "moreplants_bush.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -419,7 +419,7 @@ minetest.register_node("moreplants:cactus", {
inventory_image = "moreplants_cactus.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -440,7 +440,7 @@ minetest.register_node("moreplants:firefung", {
inventory_image = "moreplants_firemush.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, igniter=1, hot=3, attatched_node=1, flora=1},
groups = {snappy=3, igniter=1, hot=3, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -460,7 +460,7 @@ minetest.register_node("moreplants:bluemush", {
inventory_image = "moreplants_bluemush.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -482,7 +482,7 @@ minetest.register_node("moreplants:caveflower", {
visual_scale = 1,
light_source = 5,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -502,7 +502,7 @@ minetest.register_node("moreplants:moonflower", {
inventory_image = "moreplants_moonflower.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -522,7 +522,7 @@ minetest.register_node("moreplants:fireflower", {
inventory_image = "moreplants_fireflower.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -542,7 +542,7 @@ minetest.register_node("moreplants:deadweed", {
inventory_image = "moreplants_deadweed.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -562,7 +562,7 @@ minetest.register_node("moreplants:taigabush", {
inventory_image = "moreplants_tundrabush.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -592,7 +592,7 @@ minetest.register_node("moreplants:glowfung", {
inventory_image = "moreplants_glowfung.png",
visual_scale = 1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
walkable = false,
})
@ -608,7 +608,7 @@ minetest.register_node("moreplants:jungleflower", {
inventory_image = "moreplants_jungleflower1.png",
visual_scale = 1.1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -640,7 +640,7 @@ minetest.register_node("moreplants:mushroom", {
{-0.125, -0.1875, -0.125, 0.125, -0.125, 0.125}, -- NodeBox3
}
},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
light_source=2,
})
@ -656,7 +656,7 @@ minetest.register_node("moreplants:curly", {
inventory_image = "moreplants_curly.png",
visual_scale = 1.1,
wield_scale = {x=0.5, y=0.5, z=0.5},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
drop = "moreplants:curlyfruit",
selection_box = {
@ -677,7 +677,7 @@ minetest.register_node("moreplants:clover", {
"moreplants_clover.png",
"moreplants_clover.png"
},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
is_ground_content=true,
buildable_to = true,
@ -702,7 +702,7 @@ minetest.register_node("moreplants:mushcluster", {
"moreplants_mushcluster.png",
"moreplants_mushcluster.png"
},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
is_ground_content=true,
buildable_to = true,
@ -728,7 +728,7 @@ minetest.register_node("moreplants:groundfung", {
"moreplants_groundfung.png",
"moreplants_groundfung.png"
},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
is_ground_content=true,
buildable_to = true,
@ -749,7 +749,7 @@ minetest.register_node("moreplants:cavefern", {
tiles = {
"moreplants_cavefern.png",
},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
is_ground_content=true,
buildable_to = true,
@ -769,7 +769,7 @@ minetest.register_node("moreplants:hangingplant", {
tiles = {
"moreplants_hanging_plant.png",
},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
is_ground_content=true,
buildable_to = true,
@ -789,7 +789,7 @@ minetest.register_node("moreplants:seaweed", {
tiles = {
"moreplants_seaweed.png",
},
groups = {snappy=3, flammable=1, attatched_node=1, flora=1},
groups = {snappy=3, flammable=1, attached_node=1, flora=1},
sounds = default.node_sound_leaves_defaults(),
is_ground_content=true,
buildable_to = true,
@ -809,7 +809,7 @@ minetest.register_node("moreplants:coral", {
tiles = {
"moreplants_coral.png",
},
groups = {snappy=3, flammable=1, attatched_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,
@ -829,7 +829,7 @@ minetest.register_node("moreplants:coral1", {
tiles = {
"moreplants_coral1.png",
},
groups = {snappy=3, flammable=1, attatched_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,
@ -849,7 +849,7 @@ minetest.register_node("moreplants:coral2", {
tiles = {
"moreplants_coral2.png",
},
groups = {snappy=3, flammable=1, attatched_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,
@ -869,7 +869,7 @@ minetest.register_node("moreplants:pinkflower", {
tiles = {
"moreplants_pinkflower.png",
},
groups = {snappy=3, flammable=1, attatched_node=1, flower=1},
groups = {snappy=3, flammable=1, attached_node=1, flower=1},
sounds = default.node_sound_leaves_defaults(),
is_ground_content=true,
buildable_to = true,