Merge remote-tracking branch 'origin/master' into trees

Conflicts:
	mods/default/init.lua
	mods/tree_plus/init.lua
This commit is contained in:
Kotolegokot 2012-11-26 20:37:03 +06:00
commit 5320ce0e23
33 changed files with 126 additions and 0 deletions

View File

@ -28,6 +28,7 @@ realtest.add_bonfire_fuel("ores:peat")
minetest.register_node("bonfire:self", { minetest.register_node("bonfire:self", {
description = "Bonfire", description = "Bonfire",
tiles = {"bonfire_top.png", "bonfire_bottom.png", "bonfire_side.png"}, tiles = {"bonfire_top.png", "bonfire_bottom.png", "bonfire_side.png"},
particle_image = {"bonfire_bottom.png"},
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
node_box = { node_box = {
@ -68,6 +69,7 @@ minetest.register_node("bonfire:self", {
minetest.register_node("bonfire:self_active", { minetest.register_node("bonfire:self_active", {
description = "Bonfire", description = "Bonfire",
tiles = {"bonfire_top_active.png", "bonfire_bottom.png", "bonfire_side_active.png"}, tiles = {"bonfire_top_active.png", "bonfire_bottom.png", "bonfire_side_active.png"},
particle_image = {"bonfire_bottom.png"},
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
node_box = { node_box = {

View File

@ -5,6 +5,7 @@
minetest.register_node("decorations:malachite_block", { minetest.register_node("decorations:malachite_block", {
description = "Malachite Block", description = "Malachite Block",
tiles = {"decorations_malachite.png"}, tiles = {"decorations_malachite.png"},
particle_image = {"minerals_malachite.png"},
is_ground_content = true, is_ground_content = true,
drop = "minerals:malachite 4", drop = "minerals:malachite 4",
groups = {cracky=3,drop_on_dig=1}, groups = {cracky=3,drop_on_dig=1},
@ -26,6 +27,7 @@ minetest.register_node("decorations:malachite_pyramid", {
}, },
}, },
tiles = {"decorations_malachite.png"}, tiles = {"decorations_malachite.png"},
particle_image = {"minerals_malachite.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky = 3}, groups = {cracky = 3},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
@ -155,6 +157,7 @@ minetest.register_node("decorations:malachite_cylinder", {
}, },
}, },
tiles = {"decorations_malachite.png"}, tiles = {"decorations_malachite.png"},
particle_image = {"minerals_malachite.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3}, groups = {cracky=3},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),

View File

@ -263,6 +263,7 @@ end
minetest.register_node("default:stone", { minetest.register_node("default:stone", {
description = "Stone", description = "Stone",
tiles = {"default_stone.png"}, tiles = {"default_stone.png"},
particle_image = {"default_cobble.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3,drop_on_dig=1}, groups = {cracky=3,drop_on_dig=1},
drop = { drop = {
@ -291,6 +292,7 @@ minetest.register_node("default:stone", {
minetest.register_node("default:desert_stone", { minetest.register_node("default:desert_stone", {
description = "Desert Stone", description = "Desert Stone",
tiles = {"default_desert_stone.png"}, tiles = {"default_desert_stone.png"},
particle_image = {"default_desert_stone.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3,drop_on_dig=1}, groups = {cracky=3,drop_on_dig=1},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
@ -299,6 +301,7 @@ minetest.register_node("default:desert_stone", {
minetest.register_node("default:stone_flat", { minetest.register_node("default:stone_flat", {
description = "Flat Stone", description = "Flat Stone",
tiles = {"default_stone_flat.png"}, tiles = {"default_stone_flat.png"},
particle_image = {"default_stone_flat.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3,drop_on_dig=1}, groups = {cracky=3,drop_on_dig=1},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
@ -307,6 +310,7 @@ minetest.register_node("default:stone_flat", {
minetest.register_node("default:desert_stone_flat", { minetest.register_node("default:desert_stone_flat", {
description = "Desert Flat Stone", description = "Desert Flat Stone",
tiles = {"default_desert_stone_flat.png"}, tiles = {"default_desert_stone_flat.png"},
particle_image = {"default_desert_stone_flat.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3,drop_on_dig=1}, groups = {cracky=3,drop_on_dig=1},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
@ -315,6 +319,7 @@ minetest.register_node("default:desert_stone_flat", {
minetest.register_node("default:cobbleblock_flat", { minetest.register_node("default:cobbleblock_flat", {
description = "Stone Brick Block", description = "Stone Brick Block",
tiles = {"default_cobbleblock_flat.png"}, tiles = {"default_cobbleblock_flat.png"},
particle_image = {"default_cobble.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3,drop_on_dig=1}, groups = {cracky=3,drop_on_dig=1},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
@ -323,6 +328,7 @@ minetest.register_node("default:cobbleblock_flat", {
minetest.register_node("default:dirt_with_grass", { minetest.register_node("default:dirt_with_grass", {
description = "Dirt with Grass", description = "Dirt with Grass",
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
particle_image = {"default_dirt.png"},
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3,drop_on_dig=1}, groups = {crumbly=3,drop_on_dig=1},
drop = "default:dirt", drop = "default:dirt",
@ -334,6 +340,7 @@ minetest.register_node("default:dirt_with_grass", {
minetest.register_node("default:dirt", { minetest.register_node("default:dirt", {
description = "Dirt", description = "Dirt",
tiles = {"default_dirt.png"}, tiles = {"default_dirt.png"},
particle_image = {"default_dirt.png"},
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3,drop_on_dig=1}, groups = {crumbly=3,drop_on_dig=1},
sounds = default.node_sound_dirt_defaults(), sounds = default.node_sound_dirt_defaults(),
@ -342,6 +349,7 @@ minetest.register_node("default:dirt", {
minetest.register_node("default:sand", { minetest.register_node("default:sand", {
description = "Sand", description = "Sand",
tiles = {"default_sand.png"}, tiles = {"default_sand.png"},
particle_image = {"default_sand.png"},
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3, falling_node=1,drop_on_dig=1}, groups = {crumbly=3, falling_node=1,drop_on_dig=1},
sounds = default.node_sound_sand_defaults(), sounds = default.node_sound_sand_defaults(),
@ -350,6 +358,7 @@ minetest.register_node("default:sand", {
minetest.register_node("default:desert_sand", { minetest.register_node("default:desert_sand", {
description = "Desert Sand", description = "Desert Sand",
tiles = {"default_desert_sand.png"}, tiles = {"default_desert_sand.png"},
particle_image = {"default_desert_sand.png"},
is_ground_content = true, is_ground_content = true,
groups = {sand=1, crumbly=3, falling_node=1,drop_on_dig=1}, groups = {sand=1, crumbly=3, falling_node=1,drop_on_dig=1},
sounds = default.node_sound_sand_defaults(), sounds = default.node_sound_sand_defaults(),
@ -358,6 +367,7 @@ minetest.register_node("default:desert_sand", {
minetest.register_node("default:gravel", { minetest.register_node("default:gravel", {
description = "Gravel", description = "Gravel",
tiles = {"default_gravel.png"}, tiles = {"default_gravel.png"},
particle_image = {"default_gravel.png"},
is_ground_content = true, is_ground_content = true,
groups = {crumbly=2, falling_node=1,drop_on_dig=1}, groups = {crumbly=2, falling_node=1,drop_on_dig=1},
sounds = default.node_sound_dirt_defaults({ sounds = default.node_sound_dirt_defaults({
@ -368,6 +378,7 @@ minetest.register_node("default:gravel", {
minetest.register_node("default:sandstone", { minetest.register_node("default:sandstone", {
description = "Sandstone", description = "Sandstone",
tiles = {"default_sandstone.png"}, tiles = {"default_sandstone.png"},
particle_image = {"default_sandstone.png"},
is_ground_content = true, is_ground_content = true,
groups = {crumbly=2,cracky=2,drop_on_dig=1}, groups = {crumbly=2,cracky=2,drop_on_dig=1},
drop = "default:sand", drop = "default:sand",
@ -377,6 +388,7 @@ minetest.register_node("default:sandstone", {
minetest.register_node("default:sand_with_clay", { minetest.register_node("default:sand_with_clay", {
description = "Clay", description = "Clay",
tiles = {"default_sand.png^default_clay.png"}, tiles = {"default_sand.png^default_clay.png"},
particle_image = {"default_clay_lump.png"},
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3,drop_on_dig=1}, groups = {crumbly=3,drop_on_dig=1},
drop = "default:clay_lump 4", drop = "default:clay_lump 4",
@ -388,6 +400,7 @@ minetest.register_node("default:sand_with_clay", {
minetest.register_node("default:dirt_with_clay", { minetest.register_node("default:dirt_with_clay", {
description = "Clay", description = "Clay",
tiles = {"default_dirt.png^default_clay.png"}, tiles = {"default_dirt.png^default_clay.png"},
particle_image = {"default_clay_lump.png"},
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3}, groups = {crumbly=3},
drop = "default:clay_lump 4", drop = "default:clay_lump 4",
@ -399,6 +412,7 @@ minetest.register_node("default:dirt_with_clay", {
minetest.register_node("default:dirt_with_grass_and_clay", { minetest.register_node("default:dirt_with_grass_and_clay", {
description = "Clay", description = "Clay",
tiles = {"default_grass.png", "default_dirt.png^default_clay.png", "default_dirt.png^default_clay.png^default_grass_side.png"}, tiles = {"default_grass.png", "default_dirt.png^default_clay.png", "default_dirt.png^default_clay.png^default_grass_side.png"},
particle_image = {"default_clay_lump.png"},
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3}, groups = {crumbly=3},
drop = "default:clay_lump 4", drop = "default:clay_lump 4",
@ -411,6 +425,7 @@ minetest.register_node("default:dirt_with_grass_and_clay", {
minetest.register_node("default:brick", { minetest.register_node("default:brick", {
description = "Brick Block", description = "Brick Block",
tiles = {"default_brick.png"}, tiles = {"default_brick.png"},
particle_image = {"default_clay_brick.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3,drop_on_dig=1}, groups = {cracky=3,drop_on_dig=1},
drop = "default:clay_brick 4", drop = "default:clay_brick 4",
@ -442,6 +457,7 @@ minetest.register_node("default:papyrus", {
description = "Papyrus", description = "Papyrus",
drawtype = "plantlike", drawtype = "plantlike",
tiles = {"default_papyrus.png"}, tiles = {"default_papyrus.png"},
particle_image = {"default_papyrus.png"},
inventory_image = "default_papyrus.png", inventory_image = "default_papyrus.png",
wield_image = "default_papyrus.png", wield_image = "default_papyrus.png",
paramtype = "light", paramtype = "light",
@ -456,6 +472,7 @@ minetest.register_node("default:glass", {
drawtype = "glasslike", drawtype = "glasslike",
tiles = {"default_glass.png"}, tiles = {"default_glass.png"},
inventory_image = minetest.inventorycube("default_glass.png"), inventory_image = minetest.inventorycube("default_glass.png"),
particle_image = {"default_glass.png"},
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
is_ground_content = true, is_ground_content = true,
@ -467,6 +484,7 @@ minetest.register_node("default:rail", {
description = "Rail", description = "Rail",
drawtype = "raillike", drawtype = "raillike",
tiles = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"}, tiles = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"},
particle_image = {"default_rail.png"},
inventory_image = "default_rail.png", inventory_image = "default_rail.png",
wield_image = "default_rail.png", wield_image = "default_rail.png",
paramtype = "light", paramtype = "light",
@ -484,6 +502,7 @@ minetest.register_node("default:ladder", {
description = "Ladder", description = "Ladder",
drawtype = "signlike", drawtype = "signlike",
tiles = {"default_ladder.png"}, tiles = {"default_ladder.png"},
particle_image = {"default_wood.png"},
inventory_image = "default_ladder.png", inventory_image = "default_ladder.png",
wield_image = "default_ladder.png", wield_image = "default_ladder.png",
paramtype = "light", paramtype = "light",
@ -788,6 +807,7 @@ minetest.register_node("default:chest_locked", {
minetest.register_node("default:cobbleblock", { minetest.register_node("default:cobbleblock", {
description = "Block of Cobble", description = "Block of Cobble",
tiles = {"default_cobbleblock.png"}, tiles = {"default_cobbleblock.png"},
particle_image = {"default_cobble.png"},
is_ground_content = true, is_ground_content = true,
drop = "default:cobble 9", drop = "default:cobble 9",
groups = {crumbly=2, oddly_breakable_by_hand=1, falling_node=1, drop_on_dig=1}, groups = {crumbly=2, oddly_breakable_by_hand=1, falling_node=1, drop_on_dig=1},
@ -814,6 +834,7 @@ minetest.register_node("default:dry_shrub", {
visual_scale = 1.0, visual_scale = 1.0,
tiles = {"default_dry_shrub.png"}, tiles = {"default_dry_shrub.png"},
inventory_image = "default_dry_shrub.png", inventory_image = "default_dry_shrub.png",
particle_image = {"default_dry_shrub.png"},
wield_image = "default_dry_shrub.png", wield_image = "default_dry_shrub.png",
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,

View File

@ -30,6 +30,7 @@ furnace.formspec =
minetest.register_node("furnace:self", { minetest.register_node("furnace:self", {
description = "Furnace", description = "Furnace",
tiles = {"furnace_top.png", "furnace_bottom.png", "furnace_side.png"}, tiles = {"furnace_top.png", "furnace_bottom.png", "furnace_side.png"},
particle_image = {"furnace_top.png"},
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
node_box = { node_box = {
@ -77,6 +78,7 @@ minetest.register_node("furnace:self", {
minetest.register_node("furnace:self_active", { minetest.register_node("furnace:self_active", {
description = "Furnace", description = "Furnace",
tiles = {"furnace_top_active.png", "furnace_bottom.png", "furnace_side_active.png"}, tiles = {"furnace_top_active.png", "furnace_bottom.png", "furnace_side_active.png"},
particle_image = {"furnace_top_active.png"},
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
node_box = { node_box = {

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

View File

@ -106,6 +106,7 @@ for i=1, #metals.list do
minetest.register_node("metals:"..metals.list[i].."_block", { minetest.register_node("metals:"..metals.list[i].."_block", {
description = "Block of "..metals.desc_list[i], description = "Block of "..metals.desc_list[i],
tiles = {"metals_"..metals.list[i].."_block.png"}, tiles = {"metals_"..metals.list[i].."_block.png"},
particle_image = {"metals_"..metals.list[i].."_block.png"},
is_ground_content = true, is_ground_content = true,
drop = "metals:"..metals.list[i].."_doubleingot", drop = "metals:"..metals.list[i].."_doubleingot",
groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2,drop_on_dig=1}, groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2,drop_on_dig=1},

View File

@ -51,6 +51,7 @@ for i,ore in ipairs(ores.list) do
minetest.register_node("ores:"..ore, { minetest.register_node("ores:"..ore, {
description = ores.desc_list[i], description = ores.desc_list[i],
tile_images = {"default_stone.png^ores_"..ore..".png"}, tile_images = {"default_stone.png^ores_"..ore..".png"},
particle_image = {"ores_"..ore..".png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3,drop_on_dig=1}, groups = {cracky=3,drop_on_dig=1},
drop = { drop = {
@ -72,6 +73,7 @@ end
minetest.register_node("ores:native_copper_desert", { minetest.register_node("ores:native_copper_desert", {
description = "Native copper ore", description = "Native copper ore",
tile_images = {"default_desert_stone.png^ores_native_copper.png"}, tile_images = {"default_desert_stone.png^ores_native_copper.png"},
particle_image = {"ores_native_copper.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3,drop_on_dig=1}, groups = {cracky=3,drop_on_dig=1},
drop = { drop = {
@ -92,6 +94,7 @@ minetest.register_node("ores:native_copper_desert", {
minetest.register_node("ores:native_gold_desert", { minetest.register_node("ores:native_gold_desert", {
description = "Native gold ore", description = "Native gold ore",
tile_images = {"default_desert_stone.png^ores_native_gold.png"}, tile_images = {"default_desert_stone.png^ores_native_gold.png"},
particle_image = {"ores_native_gold.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3,drop_on_dig=1}, groups = {cracky=3,drop_on_dig=1},
drop = { drop = {
@ -112,6 +115,7 @@ minetest.register_node("ores:native_gold_desert", {
minetest.register_node("ores:peat", { minetest.register_node("ores:peat", {
description = "Peat", description = "Peat",
tile_images = {"ores_peat.png"}, tile_images = {"ores_peat.png"},
particle_image = {"ores_peat.png"},
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3,drop_on_dig=1}, groups = {crumbly=3,drop_on_dig=1},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),

93
mods/particles/init.lua Normal file
View File

@ -0,0 +1,93 @@
minetest.register_entity("particles:particle", {
physical = true,
collisionbox = {0,0,0,0,0,0},
timer = 0,
timer2 = 0,
on_activate = function(self, staticdata)
local obj = self.object
obj:setacceleration({x=0, y=-5, z=0})
local dx = (math.random(0,60)-30)/30
local dy = (math.random(0,60))/30
local dz = (math.random(0,60)-30)/30
obj:setvelocity({x=dx, y=dy, z=dz})
obj:setyaw(math.random(0,359)/180*math.pi)
self.timer = math.random(0, 6)/3
end,
on_step = function(self, dtime)
self.timer2 = self.timer2+dtime
if self.timer2 >= 0.5 then
if self.object:getvelocity().y == 0 then
self.object:setvelocity({x=0, y=0, z=0})
end
self.timer2 = 0
end
self.timer = self.timer+dtime
if self.timer >= 3 then
self.object:remove()
end
end,
})
minetest.register_on_dignode(function(pos, oldnode, digger)
local node = minetest.registered_nodes[oldnode.name]
if not node or node.groups.no_particles or not digger then
return
end
local tmp
if digger ~= nil then
tmp = minetest.get_node_drops(oldnode.name, digger:get_wielded_item():get_name())
end
if type(tmp) == "string" then
node = minetest.registered_nodes[tmp]
elseif type(tmp) == "table" and tmp[1] and tmp[1].get_name then
node = minetest.registered_nodes[tmp[1]:get_name()]
end
if node == nil then
node = minetest.registered_nodes[oldnode.name]
-- prevent unwanted effects
if node == nil then
return
end
end
for i=1,15 do
if node.particle_image then
local dx = (math.random(0,10)-5)/10
local dy = (math.random(0,10)-5)/10
local dz = (math.random(0,10)-5)/10
local obj = minetest.env:add_entity({x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}, "particles:particle")
local vis_size = math.random(5,15)/100
obj:set_properties({
textures = node.particle_image,
visual_size = {x=vis_size, y=vis_size},
})
end
end
end)
minetest.register_entity("particles:smoke", {
physical = true,
visual_size = {x=0.25, y=0.25},
collisionbox = {0,0,0,0,0,0},
visual = "sprite",
textures = {"smoke_puff.png"},
on_step = function(self, dtime)
self.object:setacceleration({x=0, y=0.5, z=0})
self.timer = self.timer + dtime
if self.timer > 3 then
self.object:remove()
end
end,
timer = 0,
})
minetest.register_abm({
nodenames = {"group:smokes"},
interval = 0.5,
chance = 1,
action = function(pos)
minetest.env:add_entity({x=pos.x+math.random()*0.5-0.25,y=pos.y+0.3,z=pos.z+math.random()*0.5-0.25}, "particles:smoke")
end,
})