mirror of
https://github.com/random-geek/morelights.git
synced 2024-12-03 12:33:54 +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
|
||||
farming
|
||||
morelights
|
||||
|
@ -1,7 +1,27 @@
|
||||
minetest.register_craftitem("morelights_vintage:brass_ingot", {
|
||||
description = "Brass Ingot",
|
||||
inventory_image = "default_steel_ingot.png^[multiply:#FFCE69"
|
||||
})
|
||||
-- basic_materials compatibility
|
||||
|
||||
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", {
|
||||
description = "Brass Chain",
|
||||
@ -222,20 +242,12 @@ minetest.register_node("morelights_vintage:chandelier", {
|
||||
-- Craft recipes
|
||||
--
|
||||
|
||||
minetest.register_craft({
|
||||
output = "morelights_vintage:brass_ingot 2",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"default:copper_ingot", "default:tin_ingot"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "morelights_vintage:chain_b",
|
||||
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",
|
||||
recipe = {
|
||||
{"", "default:glass", ""},
|
||||
{"farming:cotton", "morelights_vintage:brass_ingot", ""},
|
||||
{"farming:cotton", brass_ingot_name, ""},
|
||||
{"", "default:glass", ""}
|
||||
}
|
||||
})
|
||||
@ -286,8 +298,8 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "morelights_vintage:chandelier",
|
||||
recipe = {
|
||||
{"", "morelights_vintage:brass_ingot", ""},
|
||||
{"morelights:bulb", "morelights_vintage:brass_ingot", "morelights:bulb"},
|
||||
{"default:steel_ingot", "morelights_vintage:brass_ingot", "default:steel_ingot"}
|
||||
{"", brass_ingot_name, ""},
|
||||
{"morelights:bulb", brass_ingot_name, "morelights:bulb"},
|
||||
{"default:steel_ingot", brass_ingot_name, "default:steel_ingot"}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user