From 5aacb05b14676731f49e734d222e5f4119f4dab9 Mon Sep 17 00:00:00 2001 From: Oblomov Date: Mon, 14 Dec 2020 14:44:21 +0100 Subject: [PATCH] Add Clean (Super) Glow Glass and traps (#159) --- CHANGELOG.md | 4 +++ crafting.lua | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++ nodes.lua | 65 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 157 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b50f6d6..13514fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added + +- Clean Glass versions of Trap and (Super) Glowing Glass + ### Removed - Legacy Stairs+ conversion code. diff --git a/crafting.lua b/crafting.lua index cd07711..34d1dc0 100644 --- a/crafting.lua +++ b/crafting.lua @@ -348,12 +348,36 @@ minetest.register_craft({ recipe = {"moreblocks:sweeper", "default:glass"}, }) +minetest.register_craft({ + output = "moreblocks:trap_clean_glass", + type = "shapeless", + recipe = {"default:mese_crystal_fragment", "moreblocks:clean_glass"}, +}) + +minetest.register_craft({ + output = "moreblocks:trap_clean_glass", + type = "shapeless", + recipe = {"moreblocks:sweeper", "moreblocks:trap_glass"}, +}) + minetest.register_craft({ output = "moreblocks:glow_glass", type = "shapeless", recipe = {"default:torch", "default:glass"}, }) +minetest.register_craft({ + output = "moreblocks:clean_glow_glass", + type = "shapeless", + recipe = {"default:torch", "moreblocks:clean_glass"}, +}) + +minetest.register_craft({ + output = "moreblocks:clean_glow_glass", + type = "shapeless", + recipe = {"moreblocks:sweeper", "moreblocks:glow_glass"}, +}) + minetest.register_craft({ output = "moreblocks:trap_glow_glass", type = "shapeless", @@ -366,6 +390,26 @@ minetest.register_craft({ recipe = {"default:mese_crystal_fragment", "moreblocks:glow_glass"}, }) +-- several recipes are possible for the trap+clean+glow, we only present 3 of them +minetest.register_craft({ + output = "moreblocks:trap_clean_glow_glass", + type = "shapeless", + recipe = {"default:mese_crystal_fragment", "moreblocks:clean_glow_glass"}, +}) + +minetest.register_craft({ + output = "moreblocks:trap_clean_glow_glass", + type = "shapeless", + recipe = {"default:mese_crystal_fragment", "moreblocks:clean_glass", "default:torch"}, +}) + +minetest.register_craft({ + output = "moreblocks:trap_clean_glow_glass", + type = "shapeless", + recipe = {"moreblocks:sweeper", "moreblocks:trap_glow_glass" }, +}) + + minetest.register_craft({ output = "moreblocks:super_glow_glass", type = "shapeless", @@ -378,6 +422,24 @@ minetest.register_craft({ recipe = {"default:torch", "moreblocks:glow_glass"}, }) +minetest.register_craft({ + output = "moreblocks:clean_super_glow_glass", + type = "shapeless", + recipe = {"default:torch", "default:torch", "moreblocks:clean_glass"}, +}) + +minetest.register_craft({ + output = "moreblocks:clean_super_glow_glass", + type = "shapeless", + recipe = {"default:torch", "moreblocks:clean_glow_glass"}, +}) + +minetest.register_craft({ + output = "moreblocks:clean_super_glow_glass", + type = "shapeless", + recipe = {"moreblocks:sweeper", "moreblocks:super_glow_glass"}, +}) + minetest.register_craft({ output = "moreblocks:trap_super_glow_glass", @@ -391,6 +453,32 @@ minetest.register_craft({ recipe = {"default:mese_crystal_fragment", "moreblocks:super_glow_glass"}, }) +-- several recipes are possible for the trap+clean+glow, we only present 4 of them +minetest.register_craft({ + output = "moreblocks:trap_clean_super_glow_glass", + type = "shapeless", + recipe = {"default:mese_crystal_fragment", "moreblocks:clean_super_glow_glass"}, +}) + +minetest.register_craft({ + output = "moreblocks:trap_clean_super_glow_glass", + type = "shapeless", + recipe = {"default:mese_crystal_fragment", "moreblocks:clean_glow_glass", "default:torch"}, +}) + +minetest.register_craft({ + output = "moreblocks:trap_clean_super_glow_glass", + type = "shapeless", + recipe = {"default:mese_crystal_fragment", "moreblocks:clean_glass", "default:torch", "default:torch"}, +}) + +minetest.register_craft({ + output = "moreblocks:trap_clean_super_glow_glass", + type = "shapeless", + recipe = {"moreblocks:sweeper", "moreblocks:trap_super_glow_glass" }, +}) + + minetest.register_craft({ output = "moreblocks:coal_stone", type = "shapeless", diff --git a/nodes.lua b/nodes.lua index e255e0a..79abcb5 100644 --- a/nodes.lua +++ b/nodes.lua @@ -349,6 +349,19 @@ local nodes = { sounds = sound_stone, no_stairs = true, }, + ["trap_clean_glass"] = { + description = S("Trap Clean Glass"), + drawtype = "glasslike_framed_optional", + tiles = {"moreblocks_clean_glass.png^moreblocks_trap_box_glass.png", "moreblocks_clean_glass_detail.png"}, + use_texture_alpha = true, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + walkable = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = sound_glass, + no_stairs = true, + }, ["trap_sandstone"] = { description = S("Trap Sandstone"), drawtype = "glasslike_framed", @@ -407,6 +420,18 @@ local nodes = { groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, }, + ["clean_glow_glass"] = { + description = S("Clean Glow Glass"), + drawtype = "glasslike_framed_optional", + tiles = {"moreblocks_clean_glass.png^[colorize:#E9CD61", "moreblocks_clean_glass_detail.png^[colorize:#E9CD61"}, + use_texture_alpha = true, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + light_source = 11, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = sound_glass, + }, ["trap_glow_glass"] = { description = S("Trap Glow Glass"), drawtype = "glasslike_framed_optional", @@ -421,6 +446,20 @@ local nodes = { sounds = sound_glass, no_stairs = true, }, + ["trap_clean_glow_glass"] = { + description = S("Trap Clean Glow Glass"), + drawtype = "glasslike_framed_optional", + tiles = {"moreblocks_clean_glass.png^[colorize:#E9CD61^moreblocks_trap_box_glass.png", "moreblocks_clean_glass_detail.png^[colorize:#E9CD61"}, + use_texture_alpha = true, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + light_source = 11, + walkable = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = sound_glass, + no_stairs = true, + }, ["super_glow_glass"] = { description = S("Super Glow Glass"), drawtype = "glasslike_framed_optional", @@ -433,6 +472,18 @@ local nodes = { groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, }, + ["clean_super_glow_glass"] = { + description = S("Clean Super Glow Glass"), + drawtype = "glasslike_framed_optional", + tiles = {"moreblocks_clean_glass.png^[colorize:#FFFF78", "moreblocks_clean_glass_detail.png^[colorize:#FFFF78"}, + use_texture_alpha = true, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + light_source = default.LIGHT_MAX, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = sound_glass, + }, ["trap_super_glow_glass"] = { description = S("Trap Super Glow Glass"), drawtype = "glasslike_framed_optional", @@ -447,6 +498,20 @@ local nodes = { sounds = sound_glass, no_stairs = true, }, + ["trap_clean_super_glow_glass"] = { + description = S("Trap Clean Super Glow Glass"), + drawtype = "glasslike_framed_optional", + tiles = {"moreblocks_clean_glass.png^[colorize:#FFFF78^moreblocks_trap_box_glass.png", "moreblocks_clean_glass_detail.png^[colorize:#FFFF78"}, + use_texture_alpha = true, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + light_source = default.LIGHT_MAX, + walkable = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = sound_glass, + no_stairs = true, + }, ["rope"] = { description = S("Rope"), drawtype = "signlike",