-- =================================================================== local cvt = default.convert_node local reg_alias = ocutil.safe_register_alias local reg_node = ocutil.safe_register_node local fromnode local neednode local nodepart local img local targetmod local baselist local modlist -- =================================================================== neednode = "caverealms:glow_gem" -- if ocutil.node_missing (neednode) then img = "caverealms_glow_gem.png" reg_node (neednode, { description = "Glow Gem" , tiles = { img } , inventory_image = img , wield_image = img , is_ground_content = true , sounds = default.sound_glass() , light_source = 11 , paramtype = "light" , drawtype = "plantlike" , walkable = false , buildable_to = true , visual_scale = 0.75 , groups = { cracky=3, oddly_breakable_by_hand=1, attached_node=1 } , selection_box = { type = "fixed" , fixed = { -0.5, -0.5, -0.5, 0.5, -5/16, 0.5 } , } , }) end -- =================================================================== neednode = "caverealms:glow_obsidian" -- if ocutil.node_missing (neednode) then reg_node (neednode, { description = "Glowing Obsidian" , tiles = { "caverealms_glow_obsidian.png" } , light_source = 7 , groups = { crumbly=1 } , sounds = default.sound_stone() , is_ground_content = true, }) end -- =================================================================== neednode = "caverealms:glow_obsidian_brick" -- if ocutil.node_missing (neednode) then reg_node (neednode, { description = "Glow Obsidian Brick" , tiles = { "caverealms_glow_obsidian_brick.png" } , light_source = 7 , groups = { cracky=1, level=2 } , sounds = default.sound_stone() , }) end fromnode = neednode neednode = "stairs:stair_glow_obsidian_brick" -- if ocutil.node_missing (neednode) then stairs.register_stair_and_slab ("glow_obsidian_brick" , fromnode , { cracky=1, level=2 } , { "caverealms_glow_obsidian_brick.png" } , "Glow Obsidian Brick Stair" , "Glow Obsidian Brick Slab" , default.sound_stone()) end -- =================================================================== neednode = "caverealms:glow_obsidian_brick_2" -- if ocutil.node_missing (neednode) then reg_node (neednode, { description = "Glow Obsidian Brick" , tiles = { "caverealms_glow_obsidian_brick_2.png" } , light_source = 9 , groups = { cracky=1, level=2 } , sounds = default.sound_stone() , }) end fromnode = neednode neednode = "stairs:stair_glow_obsidian_brick_2" -- if ocutil.node_missing (neednode) then stairs.register_stair_and_slab ("glow_obsidian_brick_2" , fromnode , { cracky=1, level=2 } , { "caverealms_glow_obsidian_brick_2.png" } , "Glow Obsidian Brick Stair" , "Glow Obsidian Brick Slab" , default.sound_stone()) end -- =================================================================== neednode = "caverealms:glow_obsidian_glass" -- if ocutil.node_missing (neednode) then reg_node (neednode, { description = "Glow Obsidian Glass" , drawtype = "glasslike_framed_optional" , paramtype = "light" , light_source = 13 , sunlight_propagates = true , groups = { cracky=3 } , sounds = default.sound_glass() , tiles = { "caverealms_glow_obsidian_glass.png" , "default_obsidian_glass_detail.png" } , }) end -- =================================================================== neednode = "caverealms:glow_ruby" -- if ocutil.node_missing (neednode) then reg_node (neednode, { description = "Glow Ruby" , tiles = { "caverealms_glow_ruby.png" } , is_ground_content = true , groups = { cracky=3 } , sounds = default.sound_glass() , light_source = 13 , paramtype = "light" , use_texture_alpha = true , drawtype = "glasslike" , sunlight_propagates = true , }) end -- =================================================================== neednode = "caverealms:glow_ruby_ore" -- if ocutil.node_missing (neednode) then reg_node (neednode, { description = "Glow Ruby Ore" , tiles = { "caverealms_glow_ruby_ore.png" } , is_ground_content = true , groups = { cracky=2 } , sounds = default.sound_glass() , light_source = 10 , paramtype = "light" , }) end -- =================================================================== neednode = "caverealms:salt_gem" -- if ocutil.node_missing (neednode) then img = "caverealms_salt_gem.png" reg_node (neednode, { description = "Salt Gem" , tiles = { img } , inventory_image = img , wield_image = img , is_ground_content = true , sounds = default.sound_glass() , light_source = 11 , paramtype = "light" , drawtype = "plantlike" , walkable = false , buildable_to = true , visual_scale = 0.75 , groups = { cracky=3, oddly_breakable_by_hand=1, attached_node=1 } , selection_box = { type = "fixed" , fixed = { -0.5, -0.5, -0.5, 0.5, -5/16, 0.5 } , } }) end -- =================================================================== reg_alias ("caverealms:glow_amethyst_2" , "caverealms:glow_amethyst" ) reg_alias ("caverealms:glow_ruby_2" , "caverealms:glow_ruby" ) reg_alias ("caverealms:salt_crystal_2" , "caverealms:salt_crystal" ) reg_alias ("caverealms:salt_crystal_4" , "caverealms:salt_crystal" ) -- =================================================================== targetmod = "caverealms" baselist = { "glow_amethyst" , "glow_amethyst_2" , "glow_obsidian_glass" , "glow_ruby" , "glow_ruby_2" , "ruby_ore" , "salt_crystal" , "salt_crystal_2" , "salt_crystal_4" , } for k,nodepart in pairs (baselist) do neednode = targetmod .. ":slab_" .. nodepart fromnode = targetmod .. ":" .. nodepart if coderblocks.has_moreblocks and minetest.registered_nodes [neednode] == nil and minetest.registered_nodes [fromnode] ~= nil then local img = targetmod .. "_" .. nodepart .. ".png" stairsplus:register_all (targetmod, nodepart, fromnode, { description = nodepart , groups = { cracky=2, stone=1 } , tiles = { img } , }) end end -- =================================================================== cvt ("caverealms:glow_gem_" , "caverealms:glow_gem" ) cvt ("caverealms:glow_worm_blue" , "caverealms:glow_worm" ) cvt ("caverealms:salt_gem_" , "caverealms:salt_gem" ) -- =================================================================== -- End of file.