elepower/elepower_dynamics/gears.lua

103 lines
1.7 KiB
Lua
Raw Normal View History

2018-06-18 13:43:40 +02:00
----------------------
-- Ground materials --
----------------------
elepd.registered_gears = {}
function elepd.register_gear(mat, data)
local mod = minetest.get_current_modname()
local itemname = mod..":"..mat.."_gear"
data.item = itemname
elepd.registered_gears[mat] = data
local description = data.description .. " Gear"
minetest.register_craftitem(itemname, {
description = description,
inventory_image = "elepower_gear.png^[multiply:" .. data.color,
groups = {
["gear_" .. mat] = 1,
dust = 1
}
})
end
-- Default dust list
elepd.register_gear("bronze", {
description = "Bronze",
color = "#fa7b26"
})
elepd.register_gear("copper", {
description = "Copper",
color = "#fcb15f"
})
elepd.register_gear("gold", {
description = "Gold",
color = "#ffff47"
})
elepd.register_gear("steel", {
description = "Steel",
color = "#ffffff"
})
elepd.register_gear("tin", {
description = "Tin",
color = "#c1c1c1"
})
elepd.register_gear("mithril", {
description = "Mithril",
color = "#8686df"
})
elepd.register_gear("silver", {
description = "Silver",
color = "#d7e2e8"
})
elepd.register_gear("lead", {
description = "Lead",
color = "#aeaedc"
})
elepd.register_gear("iron", {
description = "Iron",
color = "#dddddd"
})
elepd.register_gear("diamond", {
description = "Diamond",
color = "#02c1e8"
})
elepd.register_gear("wood", {
description = "Wood",
color = "#847454"
})
2018-06-21 16:35:39 +02:00
elepd.register_gear("nickel", {
description = "Nickel",
color = "#d6d5ab"
})
elepd.register_gear("invar", {
description = "Invar",
color = "#9fa5b2"
})
elepd.register_gear("electrum", {
description = "Electrum",
color = "#ebeb90"
})
elepd.register_gear("viridisium", {
description = "Viridisium",
color = "#5b9751"
})