MineClone2-Plus-Official-Mo.../mcl_amethyst_extras/init.lua

106 lines
3.3 KiB
Lua

---
--- 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