mirror of
https://github.com/random-geek/morelights.git
synced 2024-12-04 04:53:48 +01:00
Use brass from basic_materials if available.
This commit is contained in:
parent
ee4c55c36d
commit
37eb07b463
@ -1,3 +1,4 @@
|
|||||||
|
basic_materials?
|
||||||
default
|
default
|
||||||
farming
|
farming
|
||||||
morelights
|
morelights
|
||||||
|
@ -1,7 +1,27 @@
|
|||||||
minetest.register_craftitem("morelights_vintage:brass_ingot", {
|
-- basic_materials compatibility
|
||||||
description = "Brass Ingot",
|
|
||||||
inventory_image = "default_steel_ingot.png^[multiply:#FFCE69"
|
local brass_ingot_name
|
||||||
})
|
|
||||||
|
if minetest.get_modpath("basic_materials") then
|
||||||
|
-- Use basic materials brass ingot
|
||||||
|
brass_ingot_name = "basic_materials:brass_ingot"
|
||||||
|
else
|
||||||
|
-- Register and use morelights brass ingot
|
||||||
|
minetest.register_craftitem("morelights_vintage:brass_ingot", {
|
||||||
|
description = "Brass Ingot",
|
||||||
|
inventory_image = "default_steel_ingot.png^[multiply:#FFCE69"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "morelights_vintage:brass_ingot 2",
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {
|
||||||
|
"default:copper_ingot", "default:tin_ingot"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
brass_ingot_name = "morelights_vintage:brass_ingot"
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_node("morelights_vintage:chain_b", {
|
minetest.register_node("morelights_vintage:chain_b", {
|
||||||
description = "Brass Chain",
|
description = "Brass Chain",
|
||||||
@ -222,20 +242,12 @@ minetest.register_node("morelights_vintage:chandelier", {
|
|||||||
-- Craft recipes
|
-- Craft recipes
|
||||||
--
|
--
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "morelights_vintage:brass_ingot 2",
|
|
||||||
type = "shapeless",
|
|
||||||
recipe = {
|
|
||||||
"default:copper_ingot", "default:tin_ingot"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "morelights_vintage:chain_b",
|
output = "morelights_vintage:chain_b",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"", "morelights_vintage:brass_ingot", ""},
|
{"", brass_ingot_name, ""},
|
||||||
{"", "", ""},
|
{"", "", ""},
|
||||||
{"", "morelights_vintage:brass_ingot", ""}
|
{"", brass_ingot_name, ""}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -278,7 +290,7 @@ minetest.register_craft({
|
|||||||
output = "morelights_vintage:oillamp",
|
output = "morelights_vintage:oillamp",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"", "default:glass", ""},
|
{"", "default:glass", ""},
|
||||||
{"farming:cotton", "morelights_vintage:brass_ingot", ""},
|
{"farming:cotton", brass_ingot_name, ""},
|
||||||
{"", "default:glass", ""}
|
{"", "default:glass", ""}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -286,8 +298,8 @@ minetest.register_craft({
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "morelights_vintage:chandelier",
|
output = "morelights_vintage:chandelier",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"", "morelights_vintage:brass_ingot", ""},
|
{"", brass_ingot_name, ""},
|
||||||
{"morelights:bulb", "morelights_vintage:brass_ingot", "morelights:bulb"},
|
{"morelights:bulb", brass_ingot_name, "morelights:bulb"},
|
||||||
{"default:steel_ingot", "morelights_vintage:brass_ingot", "default:steel_ingot"}
|
{"default:steel_ingot", brass_ingot_name, "default:steel_ingot"}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user