mirror of
https://notabug.org/TenPlus1/lucky_block.git
synced 2024-08-20 15:34:09 +02:00
Added more lucky blocks for moreores, homedecor and cblocks mods
This commit is contained in:
parent
ae31b9afde
commit
026eb4a41d
42
blocks.lua
42
blocks.lua
@ -116,12 +116,14 @@ lucky_block:add_blocks({
|
|||||||
{"nod", "default:diamondblock", 0},
|
{"nod", "default:diamondblock", 0},
|
||||||
{"nod", "default:steelblock", 0},
|
{"nod", "default:steelblock", 0},
|
||||||
{"nod", "default:dirt", 0},
|
{"nod", "default:dirt", 0},
|
||||||
|
{"dro", {"dye:"}, 10, true},
|
||||||
{"dro", {"default:sword_steel"}, 1},
|
{"dro", {"default:sword_steel"}, 1},
|
||||||
{"dro", {"default:pick_steel"}, 1},
|
{"dro", {"default:pick_steel"}, 1},
|
||||||
{"dro", {"default:shovel_steel"}, 1},
|
{"dro", {"default:shovel_steel"}, 1},
|
||||||
{"dro", {"default:coal_lump"}, 3},
|
{"dro", {"default:coal_lump"}, 3},
|
||||||
{"dro", {"default:axe_steel"}, 1},
|
{"dro", {"default:axe_steel"}, 1},
|
||||||
{"dro", {"default:sword_bronze"}, 1},
|
{"dro", {"default:sword_bronze"}, 1},
|
||||||
|
{"exp"},
|
||||||
{"nod", "default:wood", 0},
|
{"nod", "default:wood", 0},
|
||||||
{"dro", {"default:pick_bronze"}, 1},
|
{"dro", {"default:pick_bronze"}, 1},
|
||||||
{"dro", {"default:shovel_bronze"}, 1},
|
{"dro", {"default:shovel_bronze"}, 1},
|
||||||
@ -162,6 +164,7 @@ if minetest.get_modpath("mobs") then
|
|||||||
{"spw", "mobs:tree_monster", 3},
|
{"spw", "mobs:tree_monster", 3},
|
||||||
{"spw", "mobs:oerkki", 3},
|
{"spw", "mobs:oerkki", 3},
|
||||||
{"dro", {"mobs:rat_cooked"}, 5},
|
{"dro", {"mobs:rat_cooked"}, 5},
|
||||||
|
{"exp"},
|
||||||
})
|
})
|
||||||
if mobs.mod and mobs.mod == "redo" then
|
if mobs.mod and mobs.mod == "redo" then
|
||||||
lucky_block:add_blocks({
|
lucky_block:add_blocks({
|
||||||
@ -188,6 +191,9 @@ end
|
|||||||
if minetest.get_modpath("homedecor") then
|
if minetest.get_modpath("homedecor") then
|
||||||
lucky_block:add_blocks({
|
lucky_block:add_blocks({
|
||||||
{"nod", "homedecor:toilet", 0},
|
{"nod", "homedecor:toilet", 0},
|
||||||
|
{"nod", "homedecor:table", 0},
|
||||||
|
{"nod", "homedecor:chair", 0},
|
||||||
|
{"nod", "homedecor:table_lamp_off", 0},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -236,6 +242,7 @@ lucky_block:add_blocks({
|
|||||||
{"dro", {"ethereal:fish_raw"}, 1},
|
{"dro", {"ethereal:fish_raw"}, 1},
|
||||||
{"dro", {"ethereal:shovel_crystal"}, 1},
|
{"dro", {"ethereal:shovel_crystal"}, 1},
|
||||||
{"dro", {"ethereal:fishing_rod_baited"}, 1},
|
{"dro", {"ethereal:fishing_rod_baited"}, 1},
|
||||||
|
{"exp"},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -247,6 +254,7 @@ lucky_block:add_blocks({
|
|||||||
{"dro", {"3d_armor:boots_gold", "3d_armor:leggings_gold", "3d_armor:chestplate_gold", "3d_armor:helmet_gold", "shields:shield_gold"}, 3},
|
{"dro", {"3d_armor:boots_gold", "3d_armor:leggings_gold", "3d_armor:chestplate_gold", "3d_armor:helmet_gold", "shields:shield_gold"}, 3},
|
||||||
{"dro", {"3d_armor:boots_cactus", "3d_armor:leggings_cactus", "3d_armor:chestplate_cactus", "3d_armor:helmet_cactus", "shields:shield_cactus"}, 3},
|
{"dro", {"3d_armor:boots_cactus", "3d_armor:leggings_cactus", "3d_armor:chestplate_cactus", "3d_armor:helmet_cactus", "shields:shield_cactus"}, 3},
|
||||||
{"dro", {"3d_armor:boots_bronze", "3d_armor:leggings_bronze", "3d_armor:chestplate_bronze", "3d_armor:helmet_bronze", "shields:shield_bronze"}, 3},
|
{"dro", {"3d_armor:boots_bronze", "3d_armor:leggings_bronze", "3d_armor:chestplate_bronze", "3d_armor:helmet_bronze", "shields:shield_bronze"}, 3},
|
||||||
|
{"lig"},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -266,13 +274,45 @@ lucky_block:add_blocks({
|
|||||||
{"nod", "pie:rvel_0", 0},
|
{"nod", "pie:rvel_0", 0},
|
||||||
{"nod", "pie:scsk_0", 0},
|
{"nod", "pie:scsk_0", 0},
|
||||||
{"nod", "pie:meat_0", 0},
|
{"nod", "pie:meat_0", 0},
|
||||||
|
{"lig"},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Bakedclay mod
|
-- Bakedclay mod
|
||||||
if minetest.get_modpath("bakedclay") then
|
if minetest.get_modpath("bakedclay") then
|
||||||
|
local p = "bakedclay:"
|
||||||
lucky_block:add_blocks({
|
lucky_block:add_blocks({
|
||||||
{"dro", {"bakedclay:"}, 10, true}
|
{"dro", {"bakedclay:"}, 10, true},
|
||||||
|
{"fal", {p.."black", p.."blue", p.."brown", p.."cyan", p.."dark_green", p.."dark_grey", p.."green", p.."grey", p.."magenta", p.."orange", p.."pink", p.."red", p.."violet", p.."white", p.."yellow"}, 0},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Coloured Blocks mod
|
||||||
|
if minetest.get_modpath("cblocks") then
|
||||||
|
lucky_block:add_blocks({
|
||||||
|
{"dro", {"cblocks:wood_"}, 10, true},
|
||||||
|
{"dro", {"carpet:stonebrick_"}, 10, true},
|
||||||
|
{"dro", {"carpet:glass_"}, 10, true},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- More Ore's mod
|
||||||
|
if minetest.get_modpath("moreores") then
|
||||||
|
lucky_block:add_blocks({
|
||||||
|
{"nod", "moreores:tin_block", 0},
|
||||||
|
{"nod", "moreores:silver_block", 0},
|
||||||
|
{"fal", {"default:sand", "default:sand", "default:sand", "default:sand", "default:sand", "default:sand", "moreores:mithril_block"}, 0},
|
||||||
|
{"dro", {"moreores:pick_silver"}, 1},
|
||||||
|
{"dro", {"moreores:pick_mithril"}, 1},
|
||||||
|
{"tro", "moreores:silver_block"},
|
||||||
|
{"dro", {"moreores:shovel_silver"}, 1},
|
||||||
|
{"dro", {"moreores:shovel_mithril"}, 1},
|
||||||
|
{"dro", {"moreores:axe_silver"}, 1},
|
||||||
|
{"dro", {"moreores:axe_mithril"}, 1},
|
||||||
|
{"tro", "moreores:mithril_block"},
|
||||||
|
{"dro", {"moreores:hoe_silver"}, 1},
|
||||||
|
{"dro", {"moreores:hoe_mithril"}, 1},
|
||||||
|
{"lig"},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
5
init.lua
5
init.lua
@ -137,7 +137,8 @@ function explosion(pos, radius)
|
|||||||
local n = minetest.get_node(p).name
|
local n = minetest.get_node(p).name
|
||||||
if minetest.get_item_group(n, "unbreakable") ~= 1 then
|
if minetest.get_item_group(n, "unbreakable") ~= 1 then
|
||||||
-- if chest then drop items inside
|
-- if chest then drop items inside
|
||||||
if n == "default:chest" then
|
if n == "default:chest"
|
||||||
|
or n == "3dchest:chest" then
|
||||||
local meta = minetest.get_meta(p)
|
local meta = minetest.get_meta(p)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
for i = 1, 32 do
|
for i = 1, 32 do
|
||||||
@ -183,7 +184,7 @@ end
|
|||||||
|
|
||||||
-- this is what happens when you dig a lucky block
|
-- this is what happens when you dig a lucky block
|
||||||
local lucky_block = function(pos, digger)
|
local lucky_block = function(pos, digger)
|
||||||
local luck = math.random(1, #lucky_list) ; --luck = 1
|
local luck = math.random(1, #lucky_list) ; --luck = 1
|
||||||
local action = lucky_list[luck][1]
|
local action = lucky_list[luck][1]
|
||||||
local schem
|
local schem
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user