123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348 |
- local colored_block_modname = "gold_and_gem"
- local colored_block_texname = "goldgem"
- local colored_block_description = "Mese Block"
- local colored_block_sunlight = "false"
- local colored_block_walkable = "true"
- local colored_block_groups = {cracky=1,level=2, not_in_creative_inventory=1}
- local colored_block_sound = "default.node_sound_stone_defaults()"
- local shades = {
- "dark_",
- "medium_",
- "" -- represents "no special shade name", e.g. full.
- }
- local shades2 = {
- "Dark ",
- "Medium ",
- "" -- represents "no special shade name", e.g. full.
- }
- local hues = {
- "red",
- "orange",
- "yellow",
- "lime",
- "green",
- "aqua",
- "cyan",
- "skyblue",
- "blue",
- "violet",
- "magenta",
- "redviolet"
- }
- local hues2 = {
- "Red ",
- "Orange ",
- "Yellow ",
- "Lime ",
- "Green ",
- "Aqua ",
- "Cyan ",
- "Sky Blue ",
- "Blue ",
- "Violet ",
- "Magenta ",
- "Red-violet "
- }
- local greys = {
- "black",
- "darkgrey",
- "grey",
- "lightgrey",
- "white"
- }
- local greys2 = {
- "Black ",
- "Dark Grey ",
- "Medium Grey ",
- "Light Grey ",
- "White "
- }
- local greys3 = {
- "black",
- "darkgrey_paint",
- "grey",
- "lightgrey_paint",
- "white_paint"
- }
- for shade = 1, 3 do
- local shadename = shades[shade]
- local shadename2 = shades2[shade]
- for hue = 1, 12 do
- local huename = hues[hue]
- local huename2 = hues2[hue]
- local colorname = colored_block_modname..":mese_"..shadename..huename
- local pngname = colored_block_texname.."_mese_"..shadename..huename..".png"
- local nodedesc = shadename2..huename2..colored_block_description
- local s50colorname = colored_block_modname..":mese_"..shadename..huename.."_s50"
- local s50pngname = colored_block_texname.."_mese_"..shadename..huename.."_s50.png"
- local s50nodedesc = shadename2..huename2..colored_block_description.." (50% Saturation)"
- minetest.register_node(colorname, {
- description = nodedesc,
- tiles = { pngname },
- sunlight_propagates = colored_block_sunlight,
- paramtype = "light",
- walkable = colored_block_walkable,
- groups = colored_block_groups,
- sounds = colored_block_sound,
- })
- minetest.register_node(s50colorname, {
- description = s50nodedesc,
- tiles = { s50pngname },
- sunlight_propagates = colored_block_sunlight,
- paramtype = "light",
- walkable = colored_block_walkable,
- groups = colored_block_groups,
- sounds = colored_block_sound,
- })
- minetest.register_craft( {
- type = "shapeless",
- output = colorname.." 1",
- recipe = {
- "default:mese",
- "unifieddyes:"..shadename..huename
- },
- })
- minetest.register_craft( {
- type = "shapeless",
- output = s50colorname.." 1",
- recipe = {
- "default:mese",
- "unifieddyes:"..shadename..huename.."_s50"
- },
- })
- end
- end
- for hue = 1, 12 do
- local huename = hues[hue]
- local huename2 = hues2[hue]
- local colorname = colored_block_modname..":mese_light_"..huename
- local pngname = colored_block_texname.."_mese_light_"..huename..".png"
- local nodedesc = "Light "..huename2..colored_block_description
- minetest.register_node(colorname, {
- description = nodedesc,
- tiles = { pngname },
- sunlight_propagates = colored_block_sunlight,
- paramtype = "light",
- walkable = colored_block_walkable,
- groups = colored_block_groups,
- sounds = colored_block_sound,
- })
- minetest.register_craft( {
- type = "shapeless",
- output = colorname.." 1",
- recipe = {
- "default:mese",
- "unifieddyes:".."light_"..huename
- },
- })
- end
- minetest.register_node(colored_block_modname..":mese_brown", {
- description = "Brown "..colored_block_description,
- tiles = { "goldgem_mese_brown.png" },
- sunlight_propagates = colored_block_sunlight,
- paramtype = "light",
- walkable = colored_block_walkable,
- groups = colored_block_groups,
- sounds = colored_block_sound,
- })
- minetest.register_craft( {
- type = "shapeless",
- output = colored_block_modname..":mese_brown 1",
- recipe = {
- "default:mese",
- "dye:brown"
- },
- })
- for grey = 1,5 do
- local greyname = greys[grey]
- local greyname2 = greys2[grey]
- local greyname3 = greys3[grey]
- local greyshadename = colored_block_modname..":mese_"..greyname
- local pngname = colored_block_texname.."_mese_"..greyname..".png"
- local nodedesc = greyname2..colored_block_description
- minetest.register_node(greyshadename, {
- description = nodedesc,
- tiles = { pngname },
- sunlight_propagates = colored_block_sunlight,
- paramtype = "light",
- walkable = colored_block_walkable,
- groups = colored_block_groups,
- sounds = colored_block_sound,
- })
- if grey == 1 or grey == 3 then
- minetest.register_craft( {
- type = "shapeless",
- output = greyshadename.." 1",
- recipe = {
- "default:mese",
- "dye:"..greyname3
- },
- })
- else
- minetest.register_craft( {
- type = "shapeless",
- output = greyshadename.." 1",
- recipe = {
- "default:mese",
- "unifieddyes:"..greyname3
- },
- })
- end
- end
- if not minetest.get_modpath("technic") then
- minetest.register_craft( {
- type = "cooking",
- output = "gold_and_gem:rainbow_dye 3",
- recipe = "gold_and_gem:rainbow_mese_block"
- })
- else
- local recipes = {
- {"gold_and_gem:rainbow_mese_block", "gold_and_gem:rainbow_dye 3"},
- }
- for _, data in pairs(recipes) do
- technic.register_grinder_recipe({input = {data[1]}, output = data[2]})
- end
- end
- minetest.register_node("gold_and_gem:rainbow_mese_block", {
- description = "Rainbow Mese Block",
- tiles = { "goldgem_rainbow_mese_block.png" },
- sunlight_propagates = "false",
- paramtype = "light",
- walkable = "true",
- groups = {cracky=1,level=2},
- sounds = "default.node_sound_stone_defaults()",
- })
- minetest.register_craft( {
- type = "shapeless",
- output = "gold_and_gem:rainbow_mese_block 8",
- recipe = {
-
- "gold_and_gem:mese_red",
- "gold_and_gem:mese_orange",
- "default:mese",
- "gold_and_gem:mese_green",
- "gold_and_gem:mese_aqua",
- "gold_and_gem:mese_cyan",
- "gold_and_gem:mese_blue",
- "gold_and_gem:mese_magenta",
- "default:glass"
- },
- })
- minetest.register_craftitem("gold_and_gem:rainbow_dye", {
- description = "Mese Rainbow dye",
- inventory_image = "goldgem_rainbow_dye.png",
- })
- minetest.register_craftitem("gold_and_gem:raw_nyan_cat", {
- description = "Raw Nyan Cat",
- inventory_image = "goldgem_nc_raw.png",
- })
- minetest.register_craftitem("gold_and_gem:raw_nyan_cat_rainbow", {
- description = "Raw Nyan Cat Rainbow",
- inventory_image = "goldgem_nc_rb_raw.png",
- })
- minetest.register_craft( {
- output = "gold_and_gem:raw_nyan_cat",
- recipe = {
- {"dye:magenta", "farming:flour", "dye:violet"},
- {"gold_and_gem:rainbow_dye", "gold_and_gem:rainbow_dye", "gold_and_gem:rainbow_dye"},
- {"dye:violet", "farming:flour", "dye:magenta" },
- },
- })
- minetest.register_craft( {
- type = "cooking",
- output = "default:nyancat",
- recipe = "gold_and_gem:raw_nyan_cat"
- })
- minetest.register_craft( {
- output = "gold_and_gem:raw_nyan_cat_rainbow",
- recipe = {
- {"gold_and_gem:rainbow_dye", "gold_and_gem:rainbow_dye", "gold_and_gem:rainbow_dye"},
- {"gold_and_gem:rainbow_mese_block", "default:nyancat", "gold_and_gem:rainbow_mese_block"},
- {"gold_and_gem:rainbow_dye", "gold_and_gem:rainbow_dye", "gold_and_gem:rainbow_dye" },
- },
- })
- minetest.register_craft( {
- type = "cooking",
- output = "default:nyancat_rainbow",
- recipe = "gold_and_gem:raw_nyan_cat_rainbow"
- })
|