Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synthetic stone: reusing gravel cooking for colorful materials #111

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions crafting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -539,3 +539,39 @@ if minetest.settings:get_bool("moreblocks.circular_saw_crafting") ~= false then
}
})
end

-- synthetic stone recipes

-- the basic synthetic stone is reusing the deprecated "gravel cooking" recipe
-- the output is a block which isn't visually appealing by itself, but
-- offers a colorful palette of stone-like building materials: the synthetic stones
-- are colored with regular dyes, and the color can be made deeper by cooking
-- a colored synthetic stone.

minetest.register_craft({
recipe = {
{ "", "default:gravel", "" },
{ "default:gravel", "", "default:gravel"},
{ "", "default:gravel", ""},
},
output = "moreblocks:synthstone"
})

local synthstone_recipes = {
"black", "blue", "brown", "dark_grey", "dark_green", "cyan", "green",
"white", "violet", "red", "pink", "orange", "magenta", "grey", "yellow"
}

for _,color in ipairs(synthstone_recipes) do
minetest.register_craft({
type = "shapeless",
recipe = {"dye:" .. color, "moreblocks:synthstone"},
output = "moreblocks:" .. color .. "_synthstone"
})

minetest.register_craft({
type = "cooking",
recipe = "moreblocks:" .. color .. "_synthstone",
output = "moreblocks:" .. color .. "_synthstone_calcinated"
})
end
96 changes: 96 additions & 0 deletions nodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,102 @@ local nodes = {
},
}

-- synthetic stone
-- a 2nd comeback of baking gravel, now giving it a more realisitc result

nodes["synthstone"] = {
description = S("Synthetic stone"),
groups = {synthstone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
tiles = {"moreblocks_synthetic_stone.png"}
}

local synthstone = {
["black"] = {
color = "292929",
color_alt = "1b1b1b"
},
["blue"] = {
color = "00519d",
color_alt = "003376"
},
["brown"] = {
color = "6c3800",
color_alt = "391a00"
},
["dark_grey"] = {
color = "494949",
color_alt = "222222"
},
["dark_green"] = {
color = "2b7b00",
color_alt = "154f00"
},
["cyan"] = {
color = "00959d",
color_alt = "00676f"
},
["green"] = {
color = "67eb1c",
color_alt = "4bb71c"
},
["white"] = {
color = "eeeeee",
color_alt = "b8b8b8"
},
["violet"] = {
color = "480680",
color_alt = "3b0367"
},
["red"] = {
color = "c91818",
color_alt = "730505"
},
["pink"] = {
color = "ffa5a5",
color_alt = "ff7272"
},
["orange"] = {
color = "e0601a",
color_alt = "b52607"
},
["magenta"] = {
color = "d80481",
color_alt = "a90145"
},
["grey"] = {
color = "9c9c9c",
color_alt = "5c5c5c"
},
["yellow"] = {
color = "fcf611",
color_alt = "ffc20b"
}
}

for ss, def in pairs(synthstone) do
local color = ss:gsub("^%l", string.upper)
color = color:gsub("_", " ")
nodes[ss .. "_synthstone"] = {
description = S(color .. " synthetic stone"),
groups = {synthstone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
tiles = {"moreblocks_synthetic_stone.png^[colorize:#" .. def.color .. "77"},
}
nodes[ss .. "_synthstone_calcinated"] = {
description = S(color .. " calcinated synthetic stone"),
groups = {synthstone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
tiles = {"moreblocks_synthetic_stone.png^[colorize:#" .. def.color_alt .. "AA"},
}
end

-- end of synthetic stone


for name, def in pairs(nodes) do
def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"}
minetest.register_node("moreblocks:" ..name, def)
Expand Down
Binary file added textures/moreblocks_synthetic_stone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.