lucky block added
This commit is contained in:
parent
07d868dece
commit
343886f6ee
@ -183,5 +183,29 @@ minetest.register_node("amogus_blocks:dirt", {
|
||||
--}),
|
||||
})
|
||||
|
||||
minetest.register_alias("mapgen_water_source", "amogus_blocks:water")
|
||||
--minetest.register_alias("mapgen_water_source", "amogus_blocks:water")
|
||||
|
||||
-- add lucky block with array of loot that can be easly edited
|
||||
local loot = {
|
||||
"amogus_items:amogus",
|
||||
"amogus_items:sprite",
|
||||
"amogus_items:coke",
|
||||
"amogus_items:fanta",
|
||||
"amogus_items:tomato",
|
||||
"amogus_items:lightsaber_blue",
|
||||
"amogus_items:lightsaber_red",
|
||||
"amogus_items:lightsaber_green",
|
||||
}
|
||||
|
||||
minetest.register_node("amogus_blocks:lucky_block", {
|
||||
description = "Lucky Block",
|
||||
tiles = {"luckyblock.png"},
|
||||
groups = {cracky = 3},
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
local item = loot[math.random(#loot)]
|
||||
minetest.add_item(pos, item)
|
||||
minetest.remove_node(pos)
|
||||
|
||||
end
|
||||
})
|
||||
minetest.register_alias("mapgen_stone", "amogus_blocks:grass")
|
Binary file not shown.
Before Width: | Height: | Size: 158 B |
BIN
mods/amogus_blocks/textures/gold.png
Normal file
BIN
mods/amogus_blocks/textures/gold.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 235 B |
BIN
mods/amogus_blocks/textures/goldenplumba.png
Normal file
BIN
mods/amogus_blocks/textures/goldenplumba.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 209 B |
BIN
mods/amogus_blocks/textures/luckyblock.png
Normal file
BIN
mods/amogus_blocks/textures/luckyblock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 169 B |
BIN
mods/amogus_blocks/textures/stone.png
Normal file
BIN
mods/amogus_blocks/textures/stone.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 188 B |
BIN
mods/amogus_blocks/textures/sussium.png
Normal file
BIN
mods/amogus_blocks/textures/sussium.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 249 B |
@ -100,3 +100,27 @@ minetest.register_tool("amogus_items:lightsaber_green", {
|
||||
},
|
||||
sound = {breaks = "amogus_sound"},
|
||||
})
|
||||
|
||||
-- add lucky block with array of loot that can be easly edited
|
||||
local loot = {
|
||||
"amogus_items:amogus",
|
||||
"amogus_items:sprite",
|
||||
"amogus_items:coke",
|
||||
"amogus_items:fanta",
|
||||
"amogus_items:tomato",
|
||||
"amogus_items:lightsaber_blue",
|
||||
"amogus_items:lightsaber_red",
|
||||
"amogus_items:lightsaber_green",
|
||||
}
|
||||
|
||||
minetest.register_node("amogus_items:lucky_block", {
|
||||
description = "Lucky Block",
|
||||
tiles = {"luckyblock.png"},
|
||||
groups = {cracky = 3},
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
local item = loot[math.random(#loot)]
|
||||
minetest.add_item(pos, item)
|
||||
minetest.remove_node(pos)
|
||||
|
||||
end
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user