Added silver chain, wolfram ore and more crafting ingredients
|
@ -1,3 +1,8 @@
|
|||
local modpath = minetest.get_modpath("craft_ingredients")
|
||||
|
||||
dofile(modpath .. "/ores.lua")
|
||||
|
||||
|
||||
local woods = {"", "jungle", "aspen", "pine"}
|
||||
local items_and_crafts = {
|
||||
["board"] = {
|
||||
|
@ -117,10 +122,40 @@ minetest.register_craftitem(":multidecor:metal_wire",
|
|||
inventory_image = "multidecor_metal_wire.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:metal_chain",
|
||||
{
|
||||
description = "Chain",
|
||||
inventory_image = "multidecor_chain.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:four_bulbs_set",
|
||||
{
|
||||
description = "Set from four bulbs",
|
||||
inventory_image = "multidecor_four_bulbs_set.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:wolfram_wire",
|
||||
{
|
||||
description = "Wolfram Wire",
|
||||
inventory_image = "multidecor_wolfram_wire.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:silver_wire",
|
||||
{
|
||||
description = "Silver Wire",
|
||||
inventory_image = "multidecor_silver_wire.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:four_lampshades_set",
|
||||
{
|
||||
description = "Set from four lampshades",
|
||||
inventory_image = "multidecor_four_lampshades_set.png"
|
||||
})
|
||||
|
||||
minetest.register_craft(
|
||||
{
|
||||
type = "shapeless",
|
||||
output = "multidecor:steel_sheet",
|
||||
output = "multidecor:steel_sheet 5",
|
||||
recipe = {"default:steel_ingot", "multidecor:steel_scissors"},
|
||||
replacements = {{"multidecor:steel_scissors", "multidecor:steel_scissors"}}
|
||||
})
|
||||
|
@ -128,7 +163,7 @@ minetest.register_craft(
|
|||
minetest.register_craft(
|
||||
{
|
||||
type = "shapeless",
|
||||
output = "multidecor:metal_bar",
|
||||
output = "multidecor:metal_bar 2",
|
||||
recipe = {"default:steel_ingot", "default:steel_ingot", "multidecor:steel_scissors"},
|
||||
replacements = {{"multidecor:steel_scissors", "multidecor:steel_scissors"}}
|
||||
})
|
||||
|
@ -161,6 +196,65 @@ minetest.register_craft({
|
|||
cooktime = 10
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreores") then
|
||||
minetest.register_craft(
|
||||
{
|
||||
type = "shapeless",
|
||||
output = "multidecor:silver_chain 3",
|
||||
recipe = {"multidecor:metal_bar", "moreores:silver_ingot", "multidecor:steel_scissors"},
|
||||
replacements = {{"multidecor:steel_scissors", "multidecor:steel_scissors"}}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "multidecor:silver_wire 4",
|
||||
recipe = {"moreores:silver_ingot", "multidecor:steel_scissors"},
|
||||
replacements = {{"multidecor:steel_scissors", "multidecor:steel_scissors"}}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "multidecor:bulb",
|
||||
recipe = {
|
||||
{"vessels:glass_bottle", "multidecor:wolfram_wire", ""},
|
||||
{"multidecor:steel_sheet", "multidecor:steel_scissors", ""},
|
||||
{"", "", ""}
|
||||
},
|
||||
replacements = {{"multidecor:steel_scissors", "multidecor:steel_scissors"}}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "multidecor:four_bulbs_set",
|
||||
recipe = {"multidecor:bulb", "multidecor:bulb", "multidecor:bulb", "multidecor:bulb"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "multidecor:metal_wire 5",
|
||||
recipe = {"multidecor:metal_bar", "multidecor:steel_scissors"},
|
||||
replacements = {{"multidecor:steel_scissors", "multidecor:steel_scissors"}}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "multidecor:wolfram_wire 4",
|
||||
recipe = {"multidecor:wolfram_ingot", "multidecor:steel_scissors"},
|
||||
replacements = {{"multidecor:steel_scissors", "multidecor:steel_scissors"}}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "multidecor:metal_chain",
|
||||
recipe = {"multidecor:metal_wire", "multidecor:metal_wire"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "multidecor:four_lampshades_set",
|
||||
recipe = {"multidecor:lampshade", "multidecor:lampshade", "multidecor:lampshade", "multidecor:lampshade"}
|
||||
})
|
||||
|
||||
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
|
||||
local contains_saw = false
|
||||
local contains_steel_scissors = false
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
minetest.register_node(":multidecor:wolfram_ore", {
|
||||
description = "Wolfram Ore",
|
||||
tiles = {"default_stone.png^multidecor_wolfram_mineral.png"},
|
||||
is_ground_content = true,
|
||||
paramtype = "light",
|
||||
light_source = 2,
|
||||
drop = {
|
||||
max_items = 4,
|
||||
items = {
|
||||
{
|
||||
rarity = 1000,
|
||||
items = {"multidecor:wolfram_lump"}
|
||||
}
|
||||
}
|
||||
},
|
||||
groups = {cracky=3.5},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node(":multidecor:desert_wolfram_ore", {
|
||||
description = "Desert Wolfram Ore",
|
||||
tiles = {"default_desert_stone.png^multidecor_wolfram_mineral.png"},
|
||||
is_ground_content = true,
|
||||
paramtype = "light",
|
||||
light_source = 2,
|
||||
drop = {
|
||||
max_items = 4,
|
||||
items = {
|
||||
{
|
||||
rarity = 1000,
|
||||
items = {"multidecor:wolfram_lump"}
|
||||
}
|
||||
}
|
||||
},
|
||||
groups = {cracky=3.5},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "multidecor:wolfram_ore",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 800,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 2,
|
||||
height_min = -31000,
|
||||
height_max = -150
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "multidecor:desert_wolfram_ore",
|
||||
wherein = "default:desert_stone",
|
||||
clust_scarcity = 800,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 2,
|
||||
height_min = -31000,
|
||||
height_max = -150
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:wolfram_lump",
|
||||
{
|
||||
description = "Wolfram Lump",
|
||||
inventory_image = "multidecor_wolfram_lump.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":multidecor:wolfram_ingot",
|
||||
{
|
||||
description = "Wolfram Ingot",
|
||||
inventory_image = "multidecor_wolfram_ingot.png"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "multidecor:wolfram_ingot",
|
||||
recipe = "multidecor:wolfram_ore",
|
||||
cooktime = 8
|
||||
})
|
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1004 B |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 1.5 KiB |
|
@ -50,7 +50,6 @@ end
|
|||
|
||||
-- Checks whether style with 'style_name' name is registered
|
||||
function register.check_for_style(style_name)
|
||||
minetest.debug("style_name: " .. style_name)
|
||||
for _, style in ipairs(register.supported_styles) do
|
||||
if style == style_name then
|
||||
return true
|
||||
|
|
|
@ -9,8 +9,69 @@ if minetest.get_modpath("moreores") then
|
|||
{"", "", ""}
|
||||
}
|
||||
}
|
||||
|
||||
gold_chandelier_recipe = {
|
||||
recipe = {
|
||||
{"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"},
|
||||
{"default:gold_ingot", "xpanes:pane_flat", "multidecor:four_bulbs_set"},
|
||||
{"moreores:silver_ingot", "multidecor:metal_chain", "multidecor:bulb"}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
local silver_chain_bbox = {
|
||||
type = "fixed",
|
||||
fixed = {-0.1, -0.5, -0.1, 0.1, 0.5, 0.1}
|
||||
}
|
||||
|
||||
local silver_chain_on_construct = function(pos)
|
||||
local up_node = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
local up_def = minetest.registered_nodes[up_node.name]
|
||||
|
||||
if up_node.name ~= "multidecor:silver_chain_tip" and
|
||||
not (up_def.drawtype == "airlike" or up_def.drawtype == "liquid" or
|
||||
up_def.drawtype == "flowingliquid") then
|
||||
minetest.set_node(pos, {name="multidecor:silver_chain_tip"})
|
||||
end
|
||||
end
|
||||
|
||||
local silver_chandelier_on_construct = function(pos)
|
||||
local up_node = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
|
||||
if minetest.get_item_group(up_node.name, "multidecor_silver_chain") == 0 then
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_node(":multidecor:silver_chain", {
|
||||
drawtype = "mesh",
|
||||
visual_scale = 0.5,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
description = "Silver Chain",
|
||||
mesh = "multidecor_silver_chain.b3d",
|
||||
tiles = {"multidecor_silver_material.png"},
|
||||
groups = {cracky=1.5, oddly_breakable_by_hand=0, multidecor_silver_chain=1},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
collision_box = silver_chain_bbox,
|
||||
selection_box = silver_chain_bbox,
|
||||
on_construct = silver_chain_on_construct
|
||||
})
|
||||
|
||||
minetest.register_node(":multidecor:silver_chain_tip", {
|
||||
drawtype = "mesh",
|
||||
visual_scale = 0.5,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
description = "Silver Chain",
|
||||
mesh = "multidecor_silver_chain_tip.b3d",
|
||||
tiles = {"multidecor_silver_material.png", "multidecor_gold_material.png"},
|
||||
groups = {cracky=1.5, oddly_breakable_by_hand=0, not_in_creative_inventory=1, multidecor_silver_chain=1},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
collision_box = silver_chain_bbox,
|
||||
selection_box = silver_chain_bbox
|
||||
})
|
||||
|
||||
|
||||
register.register_light("silvered_desk_lamp_off", {
|
||||
style = "modern",
|
||||
|
@ -91,13 +152,16 @@ register.register_light("gold_chandelier_with_glass_candles_off", {
|
|||
{-0.15, 0, -0.15, 0.15, 0.5, 0.15},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5}
|
||||
},
|
||||
callbacks = {
|
||||
on_construct = silver_chandelier_on_construct
|
||||
}
|
||||
},
|
||||
{
|
||||
swap_light = {
|
||||
name = "gold_chandelier_with_glass_candles_on",
|
||||
light_level = 13
|
||||
}
|
||||
})
|
||||
}, gold_chandelier_recipe)
|
||||
|
||||
register.register_light("metal_chandelier_with_plastic_plafonds_off", {
|
||||
style = "modern",
|
||||
|
@ -121,4 +185,11 @@ register.register_light("metal_chandelier_with_plastic_plafonds_off", {
|
|||
name = "metal_chandelier_with_plastic_plafonds_on",
|
||||
light_level = 12
|
||||
}
|
||||
},
|
||||
{
|
||||
recipe = {
|
||||
{"multidecor:metal_bar", "multidecor:metal_bar", "multidecor:four_lampshades_set"},
|
||||
{"multidecor:metal_bar", "multidecor:metal_bar", "multidecor:four_bulbs_set"},
|
||||
{"multidecor:metal_bar", "", ""}
|
||||
}
|
||||
})
|
||||
|
|