From 8c60a1f77da9bc0f0dc639d9f81a0f3ea951f99a Mon Sep 17 00:00:00 2001 From: luk3yx Date: Fri, 1 Mar 2019 17:12:55 +1300 Subject: [PATCH 1/5] Allow quartz to be used in circular saws --- init.lua | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/init.lua b/init.lua index c2870a7..d365bf0 100644 --- a/init.lua +++ b/init.lua @@ -157,34 +157,27 @@ minetest.register_abm({ -- Compatibility with stairsplus -- -if minetest.get_modpath("moreblocks") and settings:get_bool("ENABLE_STAIRSPLUS") then - register_stair_slab_panel_micro("quartz", "block", "quartz:block", - {cracky=3}, - {"quartz_block.png"}, - "Quartz Block", - "block", - 0 - ) +if minetest.global_exists("stairsplus") then + stairsplus:register_all("quartz", "block", "quartz:block", { + description = "Quartz Block", + tiles = {"quartz_block.png"}, + groups = {cracky=3}, + sounds = default.node_sound_glass_defaults() + }) - register_stair_slab_panel_micro("quartz", "chiseled", "quartz:chiseled", - {cracky=3}, - {"quartz_chiseled.png"}, - "Chiseled Quartz", - "chiseled", - 0 - ) + stairsplus:register_all("quartz", "chiseled", "quartz:chiseled", { + description = "Chiseled Quartz", + tiles = {"quartz_chiseled.png"}, + groups = {cracky=3}, + sounds = default.node_sound_glass_defaults() + }) - register_stair_slab_panel_micro("quartz", "pillar", "quartz:pillar", - {cracky=3}, - {"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"}, - "Quartz Pillar", - "pillar", - 0 - ) - - table.insert(circular_saw.known_stairs, "quartz:block") - table.insert(circular_saw.known_stairs, "quartz:chiseled") - table.insert(circular_saw.known_stairs, "quartz:pillar") + stairsplus:register_all("quartz", "pillar", "quartz:pillar", { + description = "Quartz Pillar", + tiles = {"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"}, + groups = {cracky=3}, + sounds = default.node_sound_glass_defaults() + }) end -- From 8b83145c6c3c7d7cdb4db2d1a391206cb010a022 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Fri, 1 Mar 2019 17:13:58 +1300 Subject: [PATCH 2/5] Fix whitespace --- init.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index d365bf0..4189d58 100644 --- a/init.lua +++ b/init.lua @@ -62,7 +62,8 @@ minetest.register_node("quartz:chiseled", { minetest.register_node("quartz:pillar", { description = S("Quartz Pillar"), paramtype2 = "facedir", - tiles = {"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"}, + tiles = {"quartz_pillar_top.png", "quartz_pillar_top.png", + "quartz_pillar_side.png"}, groups = {cracky=3, oddly_breakable_by_hand=1}, sounds = default.node_sound_glass_defaults(), on_place = minetest.rotate_node @@ -78,7 +79,8 @@ stairs.register_stair_and_slab("quartzblock", "quartz:block", stairs.register_stair_and_slab("quartzstair", "quartz:pillar", {cracky=3, oddly_breakable_by_hand=1}, - {"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"}, + {"quartz_pillar_top.png", "quartz_pillar_top.png", + "quartz_pillar_side.png"}, S("Quartz Pillar stair"), S("Quartz Pillar slab"), default.node_sound_glass_defaults()) @@ -174,7 +176,8 @@ if minetest.global_exists("stairsplus") then stairsplus:register_all("quartz", "pillar", "quartz:pillar", { description = "Quartz Pillar", - tiles = {"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"}, + tiles = {"quartz_pillar_top.png", "quartz_pillar_top.png", + "quartz_pillar_side.png"}, groups = {cracky=3}, sounds = default.node_sound_glass_defaults() }) @@ -188,11 +191,14 @@ if settings:get_bool("ENABLE_HORIZONTAL_PILLAR") then -- Quartz Pillar (horizontal) minetest.register_node("quartz:pillar_horizontal", { description = "Quartz Pillar Horizontal", - tiles = {"quartz_pillar_side.png", "quartz_pillar_side.png", "quartz_pillar_side.png^[transformR90", - "quartz_pillar_side.png^[transformR90", "quartz_pillar_top.png", "quartz_pillar_top.png"}, + tiles = {"quartz_pillar_side.png", "quartz_pillar_side.png", + "quartz_pillar_side.png^[transformR90", + "quartz_pillar_side.png^[transformR90", "quartz_pillar_top.png", + "quartz_pillar_top.png"}, paramtype2 = "facedir", drop = 'quartz:pillar', - groups = {cracky=3, oddly_breakable_by_hand=1, not_in_creative_inventory=1}, + groups = {cracky=3, oddly_breakable_by_hand=1, + not_in_creative_inventory=1}, sounds = default.node_sound_glass_defaults(), }) end From fcb319631f032a558cf3f180b525e465e98dc428 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Fri, 1 Mar 2019 17:23:09 +1300 Subject: [PATCH 3/5] Add description and depends to mod.conf. --- description.txt | 2 +- mod.conf | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/description.txt b/description.txt index adc7fc2..f2afef2 100644 --- a/description.txt +++ b/description.txt @@ -1 +1 @@ -Adds quartz ore and some decorative quartz blocks +Adds quartz ore and some decorative quartz blocks. diff --git a/mod.conf b/mod.conf index a5f15f3..a2dd68e 100644 --- a/mod.conf +++ b/mod.conf @@ -1 +1,4 @@ -name = quartz +name = quartz +description = Adds quartz ore and some decorative quartz blocks. +depends = default,stairs +optional_depends = moreblocks,intllib From 0fc7dd0d0d472af565703438e2bd4f84233c1ee4 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sat, 2 Mar 2019 09:54:29 +1300 Subject: [PATCH 4/5] =?UTF-8?q?Add=20"stairsplus"=20as=20an=20optional=20d?= =?UTF-8?q?ependency.=20=20=E2=80=A2=20Add=20"stairsplus"=20as=20an=20opti?= =?UTF-8?q?onal=20dependency.=20=20=E2=80=A2=20Sort=20the=20optional=20dep?= =?UTF-8?q?endencies=20in=20alphabetical=20order.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- depends.txt | 3 ++- mod.conf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/depends.txt b/depends.txt index c2a3e1b..7f004f6 100644 --- a/depends.txt +++ b/depends.txt @@ -1,4 +1,5 @@ default stairs +intllib? moreblocks? -intllib? \ No newline at end of file +stairsplus? diff --git a/mod.conf b/mod.conf index a2dd68e..40a9866 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = quartz description = Adds quartz ore and some decorative quartz blocks. depends = default,stairs -optional_depends = moreblocks,intllib +optional_depends = intllib,moreblocks,stairsplus From cdda5c8a03a6d319d237e8e0d3d7bb1841a2cbab Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sat, 2 Mar 2019 09:56:54 +1300 Subject: [PATCH 5/5] Add stairsplus note into README.txt. --- README.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 0db0cf8..383bcad 100644 --- a/README.txt +++ b/README.txt @@ -12,9 +12,10 @@ License: MIT (see LICENSE.txt) Dependencies: default (found in minetest_game) stairs (found in minetest_game) -moreblocks (optional, for stairsplus support) +intllib (optional, for translations) +moreblocks or stairsplus (optional, for stairsplus support) -Please report bugs at the github issue tracker: +Please report bugs at the GitHub issue tracker: https://github.com/minetest-mods/quartz/issues/ Crafting: @@ -80,3 +81,6 @@ x|x|x x|c|x ----- x|x|x + +If you have stairsplus (or moreblocks) installed, you will be able to use +circular saws to cut quartz blocks.