From c063507d661491203c03973b4b43bba666b6e436 Mon Sep 17 00:00:00 2001 From: h-v-smacker Date: Wed, 7 Feb 2018 06:31:43 +0300 Subject: [PATCH 1/2] Synthetic stone: reusing gravel cooking for colorful materials --- crafting.lua | 33 ++++++++ nodes.lua | 96 ++++++++++++++++++++++++ textures/moreblocks_synthetic_stone.png | Bin 0 -> 326 bytes 3 files changed, 129 insertions(+) create mode 100644 textures/moreblocks_synthetic_stone.png diff --git a/crafting.lua b/crafting.lua index b6432c7..be8632a 100644 --- a/crafting.lua +++ b/crafting.lua @@ -539,3 +539,36 @@ 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({ + type = "cooking", + recipe = "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 diff --git a/nodes.lua b/nodes.lua index efa1f94..3c9588e 100644 --- a/nodes.lua +++ b/nodes.lua @@ -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) diff --git a/textures/moreblocks_synthetic_stone.png b/textures/moreblocks_synthetic_stone.png new file mode 100644 index 0000000000000000000000000000000000000000..485adc041c4f558f5b8e9707cf494a1eba73ffaa GIT binary patch literal 326 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx*Bp9q_EZ7UAI14-?iy0WWg+Z8+Vb&Z8pdfpR zr>`sfBPMnxKAE4M_u_#)6>76RzIeW~ zHQUtQYl(K4vVe-i*Bc@EUyhx;QGL^SNmJS?@#RtB@nw^~@yN0$^FB8VcM?AKpOH7c WVms>(eOsW189ZJ6T-G@yGywp6i-8mX literal 0 HcmV?d00001 From 26607e4adebc172b851d019cb256218772f2d70b Mon Sep 17 00:00:00 2001 From: h-v-smacker Date: Sat, 10 Feb 2018 07:54:26 +0300 Subject: [PATCH 2/2] Changed synthstone recipe to crafting due to conflicts with other mods --- crafting.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crafting.lua b/crafting.lua index be8632a..5c428e1 100644 --- a/crafting.lua +++ b/crafting.lua @@ -549,8 +549,11 @@ end -- a colored synthetic stone. minetest.register_craft({ - type = "cooking", - recipe = "default:gravel", + recipe = { + { "", "default:gravel", "" }, + { "default:gravel", "", "default:gravel"}, + { "", "default:gravel", ""}, + }, output = "moreblocks:synthstone" })