2016-03-23 14:23:05 +03:00
|
|
|
|
2024-08-16 13:05:33 +03:00
|
|
|
-- translation and mod check
|
2016-06-09 17:08:34 +03:00
|
|
|
|
2024-08-16 13:05:33 +03:00
|
|
|
local S = minetest.get_translator("ethereal")
|
2021-07-28 17:12:53 +03:00
|
|
|
local stairs_mod = minetest.get_modpath("stairs")
|
|
|
|
local stairs_redo = stairs_mod and stairs.mod and stairs.mod == "redo"
|
2020-12-30 12:50:40 +03:00
|
|
|
local stairs_plus = minetest.global_exists("stairsplus")
|
2016-03-23 14:23:05 +03:00
|
|
|
|
2024-08-16 13:05:33 +03:00
|
|
|
-- register stair function (stair mod will be auto-selected)
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
local do_stair = function(description, name, node, groups, texture, sound)
|
2019-02-16 15:23:14 +03:00
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
if stairs_redo then
|
2016-03-23 14:23:05 +03:00
|
|
|
|
2024-07-31 16:27:09 +03:00
|
|
|
stairs.register_all(name, node, groups, texture, S(description), sound, true)
|
2016-03-23 14:23:05 +03:00
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
elseif stairs_plus then
|
2016-03-23 14:23:05 +03:00
|
|
|
|
2021-10-02 10:18:49 +03:00
|
|
|
local mod = "ethereal"
|
|
|
|
|
|
|
|
stairsplus:register_all(mod, name, node, {
|
2020-12-30 12:50:40 +03:00
|
|
|
description = S(description),
|
|
|
|
tiles = texture,
|
|
|
|
groups = groups,
|
2022-09-30 19:26:44 +03:00
|
|
|
sounds = sound
|
2020-12-30 12:50:40 +03:00
|
|
|
})
|
2016-03-23 14:23:05 +03:00
|
|
|
|
2021-10-02 10:18:49 +03:00
|
|
|
-- aliases need to be set for previous stairs to avoid unknown nodes
|
|
|
|
minetest.register_alias_force("stairs:stair_" .. name,
|
|
|
|
mod .. ":stair_" .. name)
|
|
|
|
|
|
|
|
minetest.register_alias_force("stairs:stair_outer_" .. name,
|
|
|
|
mod .. ":stair_" .. name .. "_outer")
|
|
|
|
|
|
|
|
minetest.register_alias_force("stairs:stair_inner_" .. name,
|
|
|
|
mod .. ":stair_" .. name .. "_inner")
|
|
|
|
|
|
|
|
minetest.register_alias_force("stairs:slab_" .. name,
|
|
|
|
mod .. ":slab_" .. name)
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
else
|
|
|
|
stairs.register_stair_and_slab(name, node, groups, texture,
|
2024-07-31 16:27:09 +03:00
|
|
|
S(description .. " Stair"), S(description .. " Slab"), sound, true)
|
2020-12-30 12:50:40 +03:00
|
|
|
end
|
|
|
|
end
|
2019-02-16 15:23:14 +03:00
|
|
|
|
2024-08-16 13:05:33 +03:00
|
|
|
-- Register Stairs
|
2016-05-17 23:40:05 +03:00
|
|
|
|
2021-01-28 13:58:07 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Blue Marble", "blue_marble", "ethereal:blue_marble",
|
2021-01-28 13:58:07 +03:00
|
|
|
{cracky = 1},
|
|
|
|
{"ethereal_blue_marble.png"},
|
|
|
|
default.node_sound_stone_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Blue Marble Tile", "blue_marble_tile", "ethereal:blue_marble_tile",
|
2020-12-02 15:27:00 +03:00
|
|
|
{cracky = 1},
|
|
|
|
{"ethereal_blue_marble_tile.png"},
|
|
|
|
default.node_sound_stone_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Crystal Block", "crystal_block", "ethereal:crystal_block",
|
2016-12-07 13:56:30 +03:00
|
|
|
{cracky = 1, level = 2, puts_out_fire = 1, cools_lava = 1},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_crystal_block.png"},
|
2016-05-17 23:40:05 +03:00
|
|
|
default.node_sound_glass_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Ice Brick", "icebrick", "ethereal:icebrick",
|
2024-07-12 15:54:05 +03:00
|
|
|
{cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_brick_ice.png"},
|
2016-05-17 23:40:05 +03:00
|
|
|
default.node_sound_glass_defaults())
|
2020-12-02 15:27:00 +03:00
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Snow Brick", "snowbrick", "ethereal:snowbrick",
|
2016-12-06 13:48:31 +03:00
|
|
|
{crumbly = 3, puts_out_fire = 1, cools_lava = 1},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_brick_snow.png"},
|
2016-05-17 23:40:05 +03:00
|
|
|
default.node_sound_dirt_defaults({
|
2020-12-30 12:50:40 +03:00
|
|
|
footstep = {name = "default_snow_footstep", gain = 0.25},
|
|
|
|
dug = {name = "default_snow_footstep", gain = 0.75},
|
2016-05-17 23:40:05 +03:00
|
|
|
}))
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Dried Dirt", "dry_dirt", "ethereal:dry_dirt",
|
2016-05-17 23:40:05 +03:00
|
|
|
{crumbly = 3},
|
|
|
|
{"ethereal_dry_dirt.png"},
|
|
|
|
default.node_sound_dirt_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Mushroom Trunk", "mushroom_trunk", "ethereal:mushroom_trunk",
|
2016-05-17 23:40:05 +03:00
|
|
|
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_mushroom_trunk.png"},
|
2016-05-17 23:40:05 +03:00
|
|
|
default.node_sound_wood_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Mushroom Top", "mushroom", "ethereal:mushroom",
|
2016-05-17 23:40:05 +03:00
|
|
|
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_mushroom_block.png"},
|
2016-05-17 23:40:05 +03:00
|
|
|
default.node_sound_wood_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Frost Wood", "frost_wood", "ethereal:frost_wood",
|
2016-05-17 23:40:05 +03:00
|
|
|
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_frost_wood.png"},
|
2016-05-17 23:40:05 +03:00
|
|
|
default.node_sound_wood_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Healing Wood", "yellow_wood", "ethereal:yellow_wood",
|
2016-05-17 23:40:05 +03:00
|
|
|
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_yellow_wood.png"},
|
2016-05-17 23:40:05 +03:00
|
|
|
default.node_sound_wood_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Palm Wood", "palm_wood", "ethereal:palm_wood",
|
2016-05-17 23:40:05 +03:00
|
|
|
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
|
|
|
{"moretrees_palm_wood.png"},
|
|
|
|
default.node_sound_wood_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Birch Wood", "birch_wood", "ethereal:birch_wood",
|
2016-05-17 23:40:05 +03:00
|
|
|
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
|
|
|
{"moretrees_birch_wood.png"},
|
|
|
|
default.node_sound_wood_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Banana Wood", "banana_wood", "ethereal:banana_wood",
|
2016-05-17 23:40:05 +03:00
|
|
|
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_banana_wood.png"},
|
2016-05-17 23:40:05 +03:00
|
|
|
default.node_sound_wood_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Willow Wood", "willow_wood", "ethereal:willow_wood",
|
2016-05-17 23:40:05 +03:00
|
|
|
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_willow_wood.png"},
|
2016-05-17 23:40:05 +03:00
|
|
|
default.node_sound_wood_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Redwood", "redwood_wood", "ethereal:redwood_wood",
|
2016-05-17 23:40:05 +03:00
|
|
|
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_redwood_wood.png"},
|
2016-05-17 23:40:05 +03:00
|
|
|
default.node_sound_wood_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Bamboo", "bamboo_wood", "ethereal:bamboo_block",
|
2016-05-17 23:40:05 +03:00
|
|
|
{snappy = 3, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_bamboo_floor.png"},
|
2016-05-17 23:40:05 +03:00
|
|
|
default.node_sound_wood_defaults())
|
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Sakura Wood", "sakura_wood", "ethereal:sakura_wood",
|
2019-02-16 15:23:14 +03:00
|
|
|
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
|
|
|
{"ethereal_sakura_wood.png"},
|
|
|
|
default.node_sound_wood_defaults())
|
2020-12-12 23:04:59 +03:00
|
|
|
|
2020-12-30 12:50:40 +03:00
|
|
|
do_stair(
|
2024-08-16 13:05:33 +03:00
|
|
|
"Olive Wood", "olive_wood", "ethereal:olive_wood",
|
2020-12-12 23:04:59 +03:00
|
|
|
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"ethereal_olive_wood.png"},
|
2020-12-12 23:04:59 +03:00
|
|
|
default.node_sound_wood_defaults())
|