mirror of
https://notabug.org/TenPlus1/lucky_block.git
synced 2024-10-04 05:13:03 +02:00
added floor paint feature and moreblock support
This commit is contained in:
parent
b1bbd66884
commit
42887e0abc
@ -19,5 +19,6 @@ Changelog:
|
|||||||
- 0.4 - Added ability to add custom functions within lucky blocks
|
- 0.4 - Added ability to add custom functions within lucky blocks
|
||||||
- 0.5 - Explosions now have radius and fire setting, also added new blocks
|
- 0.5 - Explosions now have radius and fire setting, also added new blocks
|
||||||
- 0.6 - Use TNT mod for explosions and if not active do entity damage only
|
- 0.6 - Use TNT mod for explosions and if not active do entity damage only
|
||||||
|
- 0.7 - Added new floor feature to blocks and moreblocks support
|
||||||
|
|
||||||
Lucky Blocks: 118 (depending on mods enabled)
|
Lucky Blocks: 136 (depending on mods enabled)
|
||||||
|
19
api.txt
19
api.txt
@ -269,6 +269,25 @@ Strike player and place permanent flame
|
|||||||
{"lig", "fire:permanent_flame"}
|
{"lig", "fire:permanent_flame"}
|
||||||
|
|
||||||
|
|
||||||
|
Floor Placement
|
||||||
|
---------------
|
||||||
|
|
||||||
|
This feature places random blocks from the list provided to make a floor under
|
||||||
|
the lucky block with a pause after each block.
|
||||||
|
|
||||||
|
{"flo", width, {node_list}, offset},
|
||||||
|
|
||||||
|
e.g.
|
||||||
|
|
||||||
|
Place a three wide obsidian and gold block floor with offset of 1 to centre on
|
||||||
|
lucky block
|
||||||
|
|
||||||
|
{"flo", 3, {"default:goldblock", "default:obsidian"}, 1}
|
||||||
|
|
||||||
|
Have a woolen floor at 5 width with offset of 2 to keep it centred
|
||||||
|
|
||||||
|
{"flo", 5, {"wool:red", "wool:blue", "wool:white", "wool:orange"}, 2}
|
||||||
|
|
||||||
Custom Function
|
Custom Function
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
52
blocks.lua
52
blocks.lua
@ -266,6 +266,58 @@ end
|
|||||||
|
|
||||||
end -- END moreores
|
end -- END moreores
|
||||||
|
|
||||||
|
-- Moreblocks mod
|
||||||
|
if minetest.get_modpath("moreblocks") then
|
||||||
|
local p = "moreblocks:"
|
||||||
|
local lav = {name = "default:lava_source"}
|
||||||
|
local air = {name = "air"}
|
||||||
|
local trs = {name = p.."trap_stone"}
|
||||||
|
local trg = {name = p.."trap_glow_glass"}
|
||||||
|
local trapstone_trap = {
|
||||||
|
size = {x = 3, y = 6, z = 3},
|
||||||
|
data = {
|
||||||
|
lav, lav, lav, air, air, air, air, air, air,
|
||||||
|
air, air, air, air, air, air, trs, trs, trs,
|
||||||
|
lav, lav, lav, air, air, air, air, air, air,
|
||||||
|
air, air, air, air, trg, air, trs, air, trs,
|
||||||
|
lav, lav, lav, air, air, air, air, air, air,
|
||||||
|
air, air, air, air, air, air, trs, trs, trs,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
lucky_block:add_schematics({
|
||||||
|
{"trapstonetrap", trapstone_trap, {x = 1, y = 6, z = 1}},
|
||||||
|
})
|
||||||
|
|
||||||
|
lucky_block:add_blocks({
|
||||||
|
{"dro", {p.."wood_tile", p.."wood_tile_flipped", p.."wood_tile_center",
|
||||||
|
p.."wood_tile_full", p.."wood_tile_up", p.."wood_tile_down",
|
||||||
|
p.."wood_tile_left", p.."wood_tile_right"}, 20},
|
||||||
|
{"dro", {p.."circle_stone_bricks"}, 20},
|
||||||
|
{"dro", {p.."grey_bricks"}, 20},
|
||||||
|
{"dro", {p.."stone_tile", p.."split_stone_tile", p.."split_stone_tile_alt"}, 20},
|
||||||
|
{"flo", 5, {"moreblocks:stone_tile", "moreblocks:split_stone_tile"}, 2},
|
||||||
|
{"dro", {p.."tar", p.."cobble_compressed"}, 10},
|
||||||
|
{"dro", {p.."cactus_brick", p.."cactus_checker"}, 10},
|
||||||
|
{"nod", {p.."empty_bookshelf"}, 0},
|
||||||
|
{"dro", {p.."coal_stone", p.."coal_checker", p.."coal_stone_bricks", p.."coal_glass"}, 20},
|
||||||
|
{"exp", 3},
|
||||||
|
{"dro", {p.."iron_stone", p.."iron_checker", p.."iron_stone_bricks", p.."iron_glass"}, 20},
|
||||||
|
{"dro", {p.."trap_stone", p.."trap_glass", p.."trap_glow_glass"}, 10},
|
||||||
|
{"sch", "trapstonetrap", 0, true},
|
||||||
|
{"dro", {p.."all_faces_tree", p.."all_faces_jungle_tree", p.."plankstone"}, 10},
|
||||||
|
{"fal", {p.."all_faces_tree", p.."all_faces_tree", p.."all_faces_tree", p.."all_faces_tree", p.."all_faces_tree"}, 0},
|
||||||
|
{"dro", {p.."glow_glass", p.."super_glow_glass", p.."clean_glass"}, 10},
|
||||||
|
{"nod", "default:chest", 0, {
|
||||||
|
{name = p.."rope", max = 10},
|
||||||
|
{name = p.."sweeper", max = 1},
|
||||||
|
{name = p.."circular_saw", max = 1},
|
||||||
|
{name = p.."grey_bricks", max = 10},
|
||||||
|
{name = p.."tar", max = 3}}},
|
||||||
|
{"flo", 3, {"moreblocks:copperpatina"}, 1},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
-- Bows mod
|
-- Bows mod
|
||||||
if minetest.get_modpath("bows") then
|
if minetest.get_modpath("bows") then
|
||||||
lucky_block:add_blocks({
|
lucky_block:add_blocks({
|
||||||
|
30
init.lua
30
init.lua
@ -523,6 +523,36 @@ local lucky_block = function(pos, digger)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- floor paint
|
||||||
|
elseif action == "flo" then
|
||||||
|
|
||||||
|
local size = lucky_list[luck][2] or 1
|
||||||
|
local nods = lucky_list[luck][3] or {"default:dirt"}
|
||||||
|
local offs = lucky_list[luck][4] or 0
|
||||||
|
local num = 1
|
||||||
|
|
||||||
|
for x = 0, size - 1 do
|
||||||
|
for z = 0, size - 1 do
|
||||||
|
|
||||||
|
minetest.after(0.5 * num, function()
|
||||||
|
|
||||||
|
minetest.set_node({
|
||||||
|
x = (pos.x + x) - offs,
|
||||||
|
y = pos.y - 1,
|
||||||
|
z = (pos.z + z) - offs
|
||||||
|
}, {name = nods[math.random(#nods)]})
|
||||||
|
|
||||||
|
minetest.sound_play("default_place_node", {
|
||||||
|
pos = pos,
|
||||||
|
gain = 1.0,
|
||||||
|
max_hear_distance = 10
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
|
||||||
|
num = num + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- custom function
|
-- custom function
|
||||||
elseif action == "cus" then
|
elseif action == "cus" then
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user