From c3f64124582c692833856b7737d8d3101102f6fc Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 6 Feb 2023 19:31:04 -0500 Subject: [PATCH 1/2] Restore Amethyst Extras. Added in Localization. --- mcl_amethyst_extras/init.lua | 105 ++++++++++++++++++++++++ mcl_amethyst_extras/locale/template.txt | 19 +++++ mcl_amethyst_extras/mod.conf | 4 + mcl_amethyst_extras/readme.txt | 15 ++++ 4 files changed, 143 insertions(+) create mode 100644 mcl_amethyst_extras/init.lua create mode 100644 mcl_amethyst_extras/locale/template.txt create mode 100644 mcl_amethyst_extras/mod.conf create mode 100644 mcl_amethyst_extras/readme.txt diff --git a/mcl_amethyst_extras/init.lua b/mcl_amethyst_extras/init.lua new file mode 100644 index 0000000..a732a14 --- /dev/null +++ b/mcl_amethyst_extras/init.lua @@ -0,0 +1,105 @@ +--- +--- Generated by EmmyLua(https://github.com/EmmyLua) +--- Created by Michieal. +--- DateTime: 01/19/23 4:50 PM +--- Copyright (C) 2023, Michieal. See License.txt +--- Last Update Time: 01/19/23 4:50 PM +--- + +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) + +local CALCITE = "mcl_amethyst:calcite" +local AMETHYST = "mcl_amethyst:amethyst_block" + +local CALCITE_IMAGE = "mcl_amethyst_calcite_block.png" +local AMETHYST_IMAGE = "mcl_amethyst_amethyst_block.png" + +local sounds = mcl_sounds.node_sound_glass_defaults({ + footstep = {name = "mcl_amethyst_amethyst_walk", gain = 0.4}, + dug = {name = "mcl_amethyst_amethyst_break", gain = 0.44}, +}) + +if minetest.get_modpath("mcl_stairs") then + if mcl_stairs ~= nil then + mcl_stairs.register_stair_and_slab_simple( + "calcite_block", + CALCITE, + S("Calcite Stair"), + S("Calcite Slab"), + S("Double Calcite Slab") + ) + mcl_stairs.register_stair_and_slab_simple( + "amethyst_block", + AMETHYST, + S("Amethyst Stair"), + S("Amethyst Slab"), + S("Amethyst Calcite Slab") + ) + end +end + +if minetest.get_modpath("mesecons_pressureplates") then + + if mesecon ~= nil and mesecon.register_pressure_plate ~= nil then + mesecon.register_pressure_plate( + "mcl_amethyst_extras:pressure_plate_calcite", + S("Calcite Pressure Plate"), + {CALCITE_IMAGE}, + {CALCITE_IMAGE}, + CALCITE_IMAGE, + nil, + {{CALCITE, CALCITE}}, + mcl_sounds.node_sound_stone_defaults(), + {pickaxey = 1, material_stone = 1}, + nil, + S("A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.")) + + minetest.register_alias("calcite_pressure_plate", "mcl_amethyst_extras:pressure_plate_calcite") + + mesecon.register_pressure_plate( + "mcl_amethyst_extras:pressure_plate_amethyst", + S("Amethyst Pressure Plate"), + {AMETHYST_IMAGE}, + {AMETHYST_IMAGE}, + AMETHYST_IMAGE, + nil, + {{AMETHYST, AMETHYST}}, + sounds, + {pickaxey = 1, material_stone = 1}, + nil, + S("A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.")) + + minetest.register_alias("amethyst_pressure_plate", "mcl_amethyst_extras:pressure_plate_amethyst") + + end +end + +if minetest.get_modpath("mesecons_button") then + if mesecon ~= nil then + -- (basename, description, texture, recipeitem, sounds, plusgroups, button_timer, push_by_arrow, longdesc, button_sound) + mesecon.register_button( + "calcite", + S("Calcite Button"), + CALCITE_IMAGE, + CALCITE, + mcl_sounds.node_sound_stone_defaults(), + {material_stone = 1, pickaxey = 1, }, + 1, + false, + S("A calcite button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."), + "mesecons_button_push") + end + mesecon.register_button( + "amethyst", + S("Amethyst Button"), + AMETHYST_IMAGE, + AMETHYST, + sounds, + {material_stone = 1, pickaxey = 1, }, + 1, + false, + S("An amethyst button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."), + "mesecons_button_push") +end + diff --git a/mcl_amethyst_extras/locale/template.txt b/mcl_amethyst_extras/locale/template.txt new file mode 100644 index 0000000..c7d7e02 --- /dev/null +++ b/mcl_amethyst_extras/locale/template.txt @@ -0,0 +1,19 @@ +# textdomain: mcl_amethyst_extras + +A calcite button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.= + +A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.= + +Amethyst Button= +Amethyst Calcite Slab= +Amethyst Pressure Plate= +Amethyst Slab= +Amethyst Stair= + +An amethyst button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.= + +Calcite Button= +Calcite Pressure Plate= +Calcite Slab= +Calcite Stair= +Double Calcite Slab= diff --git a/mcl_amethyst_extras/mod.conf b/mcl_amethyst_extras/mod.conf new file mode 100644 index 0000000..02eef8d --- /dev/null +++ b/mcl_amethyst_extras/mod.conf @@ -0,0 +1,4 @@ +name = mcl_amethyst_extras +description = Non-Minecraft Amethyst Items +author=Michieal +depends=mcl_amethyst diff --git a/mcl_amethyst_extras/readme.txt b/mcl_amethyst_extras/readme.txt new file mode 100644 index 0000000..1a02f14 --- /dev/null +++ b/mcl_amethyst_extras/readme.txt @@ -0,0 +1,15 @@ +Created by Michieal. +Additional Textures: CC-BY 3.0 +Code: GPL3 + +One final request -- the Date-Time Creator code block needs to remain in the code files. This allows everyone to know +which version of the code is being used, and allows for better troubleshooting of any errors. + +Init.Lua's original Date-Time Creator code block: +--- +--- Generated by EmmyLua(https://github.com/EmmyLua) +--- Created by Michieal. +--- DateTime: 01/19/23 4:50 PM +--- Copyright (C) 2023, Michieal. See License.txt +--- [Last Update Time] +--- \ No newline at end of file From 946014fccbf70d96839dd1d48279dd80743b29ef Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 6 Feb 2023 19:41:48 -0500 Subject: [PATCH 2/2] Made mod.conf compliant with latest Minetest standards. --- mcl_amethyst_extras/mod.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mcl_amethyst_extras/mod.conf b/mcl_amethyst_extras/mod.conf index 02eef8d..fee3f52 100644 --- a/mcl_amethyst_extras/mod.conf +++ b/mcl_amethyst_extras/mod.conf @@ -1,4 +1,5 @@ +title = mcl_amethyst_extras name = mcl_amethyst_extras -description = Non-Minecraft Amethyst Items +description = This mod adds in Non-Minecraft Amethyst Items that are useful for builds. author=Michieal depends=mcl_amethyst