pngcrush
46
init.lua
|
@ -2,6 +2,28 @@
|
|||
local WATER = {"default:water_source", "default:water_flowing"}
|
||||
local LAVA = {"default:lava_flowing","default:lava_source"}
|
||||
|
||||
local function coolnode(na, pos)
|
||||
minetest.env:add_node (pos, {name = na})
|
||||
minetest.sound_play("lavacooling", {pos = pos, gain = 0.5, max_hear_distance = 5})
|
||||
minetest.add_particlespawner(
|
||||
3, --amount
|
||||
0.1, --time
|
||||
{x=pos.x-0.2, y=pos.y-0.2, z=pos.z-0.2}, --minpos
|
||||
{x=pos.x+0.2, y=pos.y+0.2, z=pos.z+0.2}, --maxpos
|
||||
{x=-0, y=-0, z=-0}, --minvel
|
||||
{x=0, y=0, z=0}, --maxvel
|
||||
{x=-0.5,y=5,z=-0.5}, --minacc
|
||||
{x=0.5,y=5,z=0.5}, --maxacc
|
||||
0.1, --minexptime
|
||||
1, --maxexptime
|
||||
2, --minsize
|
||||
8, --maxsize
|
||||
false, --collisiondetection
|
||||
"smoke_puff.png" --texture
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
--Change the old block
|
||||
|
||||
minetest.register_node(":lavacooling:obsidian", {})
|
||||
|
@ -26,7 +48,8 @@ minetest.register_node("lavacooling:obsidian_brick", {
|
|||
|
||||
minetest.register_node("lavacooling:basalt", {
|
||||
description = "Basalt",
|
||||
tiles = {"lavacooling_basalt.png","lavacooling_basalt.png","lavacooling_basalt_side.png"},
|
||||
tiles = {"lavacooling_basalt.png","lavacooling_basalt.png","lavacooling_basalt_side.png",
|
||||
"lavacooling_basalt_side.png","lavacooling_basalt_side.png^[transformR180","lavacooling_basalt_side.png"},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
groups = {cracky=3},
|
||||
drop = "default:cobble",
|
||||
|
@ -54,6 +77,12 @@ local function ore()
|
|||
if math.random(200) == 1 then return "default:stone_with_iron" end
|
||||
if math.random(500) == 1 then return "default:stone_with_diamond" end
|
||||
if math.random(600) == 1 then return "default:stone_with_mese" end
|
||||
if minetest.get_modpath("extrablocks") then
|
||||
if math.random(50) == 7 then return "extrablocks:marble_ore" end
|
||||
if math.random(60) == 7 then return "extrablocks:lapis_lazuli_ore" end
|
||||
if math.random(500) == 7 then return "extrablocks:goldstone" end
|
||||
if math.random(600) == 7 then return "extrablocks:iringnite_ore" end
|
||||
end
|
||||
return "default:stone"
|
||||
end
|
||||
|
||||
|
@ -68,8 +97,7 @@ minetest.register_abm ({
|
|||
if minetest.env: get_node({x=pos.x+i, y=pos.y, z=pos.z}).name == water
|
||||
or minetest.env: get_node({x=pos.x, y=pos.y+i, z=pos.z}).name == water
|
||||
or minetest.env: get_node({x=pos.x, y=pos.y, z=pos.z+i}).name == water then
|
||||
minetest.env: add_node (pos, {name = output})
|
||||
minetest.sound_play("lavacooling", {pos = pos, gain = 0.5, max_hear_distance = 5})
|
||||
coolnode(output, pos)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
@ -91,8 +119,7 @@ minetest.register_abm ({
|
|||
action = function (pos)
|
||||
for _, lava in ipairs(LAVA) do
|
||||
if minetest.env: get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == lava then
|
||||
minetest.env: add_node (pos, {name = ore()})
|
||||
minetest.sound_play("lavacooling", {pos = pos, gain = 0.5, max_hear_distance = 5})
|
||||
coolnode(ore(), pos)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
@ -147,8 +174,7 @@ minetest.register_abm ({
|
|||
action = function (pos)
|
||||
local nam = dirtyblocks3(pos)
|
||||
if nam then
|
||||
minetest.env: add_node (pos, {name = nam})
|
||||
minetest.sound_play("lavacooling", {pos = pos, gain = 0.5, max_hear_distance = 5})
|
||||
coolnode(nam, pos)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
@ -159,8 +185,7 @@ minetest.register_abm ({
|
|||
action = function (pos)
|
||||
local nam = dirtyblocks2(pos)
|
||||
if nam then
|
||||
minetest.env: add_node (pos, {name = nam})
|
||||
minetest.sound_play("lavacooling", {pos = pos, gain = 0.5, max_hear_distance = 5})
|
||||
coolnode(nam, pos)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
@ -172,8 +197,7 @@ minetest.register_abm ({
|
|||
action = function (pos)
|
||||
local nam = dirtyblocks(pos)
|
||||
if nam then
|
||||
minetest.env: add_node (pos, {name = nam})
|
||||
minetest.sound_play("lavacooling", {pos = pos, gain = 0.5, max_hear_distance = 5})
|
||||
coolnode(nam, pos)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 346 B |
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |