Add cups (and hard diamond block for real)
parent
793f88bdcd
commit
e03629300c
85
init.lua
85
init.lua
|
@ -1,3 +1,5 @@
|
|||
mtg_plus = {}
|
||||
|
||||
-- New nodes and crafts
|
||||
minetest.register_node("mtg_plus:dirty_glass", {
|
||||
description = "Dirty Glass",
|
||||
|
@ -44,6 +46,20 @@ minetest.register_craft({
|
|||
recipe = { "default:jungleleaves", "default:junglegrass" },
|
||||
})
|
||||
|
||||
minetest.register_node("mtg_plus:harddiamondblock",{
|
||||
description = "Aggregated Diamond Block",
|
||||
tiles = { "mtg_plus_hard_diamond_block.png" },
|
||||
is_ground_content = true,
|
||||
groups = { cracky = 1, level = 4 },
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mtg_plus:harddiamondblock 1",
|
||||
type = "shapeless",
|
||||
recipe = { "default:diamondblock", "default:diamondblock" }
|
||||
})
|
||||
|
||||
minetest.register_node("mtg_plus:ice_block", {
|
||||
description = "Ice Block",
|
||||
tiles = {"mtg_plus_ice_block.png"},
|
||||
|
@ -210,6 +226,75 @@ minetest.register_craft({
|
|||
{ "default:ice", "default:ice" } },
|
||||
})
|
||||
|
||||
-- Cups
|
||||
local cupnodebox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3,-0.5,-0.3,0.3,-0.4,0.3}, -- stand
|
||||
{-0.1,-0.4,-0.1,0.1,0,0.1}, -- handle
|
||||
{-0.3,0,-0.3,0.3,0.1,0.3}, -- cup (lower part)
|
||||
-- the 4 sides of the upper part
|
||||
{-0.2,0.1,-0.3,0.2,0.5,-0.2},
|
||||
{-0.2,0.1,0.2,0.2,0.5,0.3},
|
||||
{-0.3,0.1,-0.3,-0.2,0.5,0.3},
|
||||
{0.2,0.1,-0.3,0.3,0.5,0.3},
|
||||
}
|
||||
}
|
||||
|
||||
local cupselbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3,-0.5,-0.3,0.3,-0.4,0.3}, -- stand
|
||||
{-0.1,-0.4,-0.1,0.1,0,0.1}, -- handle
|
||||
{-0.3,0,-0.3,0.3,0.5,0.3}, -- upper part
|
||||
}
|
||||
}
|
||||
|
||||
mtg_plus.register_cup = function(subname, description, tiles, craftitem, craft_count, extra_groups, extra_sounds)
|
||||
local groups = { dig_immediate=3, falling_node=1, }
|
||||
if extra_groups then
|
||||
for k,v in pairs(extra_groups) do
|
||||
groups[k] = v
|
||||
end
|
||||
end
|
||||
local sounds = default.node_sound_defaults({
|
||||
footstep = { name = "default_hard_footstep", gain = 0.3 },
|
||||
})
|
||||
if extra_sounds then
|
||||
for k,v in pairs(extra_sounds) do
|
||||
sounds[k] = v
|
||||
end
|
||||
end
|
||||
minetest.register_node("mtg_plus:cup_"..subname, {
|
||||
description = description,
|
||||
tiles = tiles,
|
||||
paramtype = "light",
|
||||
drawtype = "nodebox",
|
||||
node_box = cupnodebox,
|
||||
selection_box = cupselbox,
|
||||
groups = groups,
|
||||
sounds = sounds,
|
||||
})
|
||||
|
||||
if craftitem ~= nil then
|
||||
if craft_count == nil then craft_count = 1 end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mtg_plus:cup_"..subname.." "..craft_count,
|
||||
recipe = {
|
||||
{craftitem, "", craftitem},
|
||||
{"", craftitem, ""},
|
||||
{"", craftitem, ""},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
mtg_plus.register_cup("bronze", "Bronze Cup", { "mtg_plus_cup_bronze.png" }, "default:bronze_ingot", 2)
|
||||
mtg_plus.register_cup("gold", "Golden Cup", { "mtg_plus_cup_gold.png" }, "default:gold_ingot", 2)
|
||||
mtg_plus.register_cup("diamond", "Diamond Cup", { "mtg_plus_cup_diamond.png" }, "default:diamond", 1)
|
||||
|
||||
-- Ladders
|
||||
minetest.register_node("mtg_plus:ladder_papyrus", {
|
||||
description = "Papyrus Ladder",
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 457 B |
Binary file not shown.
After Width: | Height: | Size: 591 B |
Binary file not shown.
After Width: | Height: | Size: 511 B |
Loading…
Reference in New Issue