fix cichlid typo, optimize wood fence/rail/gate/lamp addition

This commit is contained in:
tenplus1 2021-04-06 09:18:03 +01:00
parent 6fdde7ce05
commit d6d5d3e2c2
6 changed files with 92 additions and 282 deletions

View File

@ -1,178 +1,99 @@
local S = ethereal.intllib local S = ethereal.intllib
default.register_fence("ethereal:fence_scorched", {
description = S("Scorched Fence"), local add_fence = function(name, node, desc, texture)
texture = "ethereal_scorched_tree.png",
material = "ethereal:scorched_tree", if default.register_fence then
default.register_fence("ethereal:fence_" .. name, {
description = S(desc .. " Fence"),
texture = texture .. ".png",
material = "ethereal:" .. node,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
check_for_pole = true check_for_pole = true
}) })
end
default.register_fence("ethereal:fence_frostwood", { if default.register_fence_rail then
description = S("Frost Fence"),
texture = "ethereal_frost_wood.png",
material = "ethereal:frost_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
check_for_pole = true
})
default.register_fence("ethereal:fence_redwood", { default.register_fence_rail("ethereal:fence_rail_" .. name, {
description = S("Redwood Fence"), description = S(desc .. " Fence Rail"),
texture = "ethereal_redwood_wood.png", texture = texture .. ".png",
material = "ethereal:redwood_wood", material = "ethereal:" .. node,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
check_for_pole = true
})
default.register_fence("ethereal:fence_willow", {
description = S("Willow Fence"),
texture = "ethereal_willow_wood.png",
material = "ethereal:willow_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
check_for_pole = true
})
default.register_fence("ethereal:fence_yellowwood", {
description = S("Healing Wood Fence"),
texture = "ethereal_yellow_wood.png",
material = "ethereal:yellow_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
check_for_pole = true
})
default.register_fence("ethereal:fence_palm", {
description = S("Palm Fence"),
texture = "moretrees_palm_wood.png",
material = "ethereal:palm_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
check_for_pole = true
})
default.register_fence("ethereal:fence_banana", {
description = S("Banana Wood Fence"),
texture = "ethereal_banana_wood.png",
material = "ethereal:banana_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
check_for_pole = true
})
default.register_fence("ethereal:fence_mushroom", {
description = S("Mushroom Fence"),
texture = "ethereal_mushroom_trunk.png",
material = "ethereal:mushroom_trunk",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
check_for_pole = true
})
default.register_fence("ethereal:fence_birch", {
description = S("Birch Fence"),
texture = "moretrees_birch_wood.png",
material = "ethereal:birch_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
check_for_pole = true
})
default.register_fence("ethereal:fence_sakura", {
description = S("Sakura Fence"),
texture = "ethereal_sakura_wood.png",
material = "ethereal:sakura_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(),
check_for_pole = true
})
-- fence rails
if default.register_fence_rail then
default.register_fence_rail("ethereal:fence_rail_scorched", {
description = S("Scorched Fence Rail"),
texture = "ethereal_scorched_tree.png",
material = "ethereal:scorched_tree",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults() sounds = default.node_sound_wood_defaults()
}) })
end
default.register_fence_rail("ethereal:fence_rail_frostwood", { if doors.register_fencegate then
description = S("Frost Fence Rail"),
texture = "ethereal_frost_wood.png",
material = "ethereal:frost_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence_rail("ethereal:fence_rail_redwood", { doors.register_fencegate("ethereal:fencegate_" .. name, {
description = S("Redwood Fence Rail"), description = S(desc .. " Fence Gate"),
texture = "ethereal_redwood_wood.png", texture = texture .. ".png",
material = "ethereal:redwood_wood", material = "ethereal:" .. node,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
sounds = default.node_sound_wood_defaults() })
}) end
default.register_fence_rail("ethereal:fence_rail_willow", { if default.register_mesepost then
description = S("Willow Fence Rail"),
texture = "ethereal_willow_wood.png",
material = "ethereal:willow_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence_rail("ethereal:fence_rail_yellowwood", {
description = S("Healing Wood Fence Rail"),
texture = "ethereal_yellow_wood.png",
material = "ethereal:yellow_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence_rail("ethereal:fence_rail_palm", {
description = S("Palm Fence Rail"),
texture = "moretrees_palm_wood.png",
material = "ethereal:palm_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence_rail("ethereal:fence_rail_banana", {
description = S("Banana Wood Fence Rail"),
texture = "ethereal_banana_wood.png",
material = "ethereal:banana_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence_rail("ethereal:fence_rail_mushroom", {
description = S("Mushroom Fence Rail"),
texture = "ethereal_mushroom_trunk.png",
material = "ethereal:mushroom_trunk",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence_rail("ethereal:fence_rail_birch", {
description = S("Birch Fence Rail"),
texture = "moretrees_birch_wood.png",
material = "ethereal:birch_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence_rail("ethereal:fence_rail_sakura", {
description = S("Sakura Fence Rail"),
texture = "ethereal_sakura_wood.png",
material = "ethereal:sakura_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_mesepost("ethereal:mese_post_" .. name, {
description = S(desc .. " Mese Post Light"),
texture = texture .. ".png",
material = "ethereal:" .. node,
})
end
end end
add_fence("scorched", "scorched_tree", "Scorched", "ethereal_scorched_tree")
add_fence("frostwood", "frost_wood", "Frost", "ethereal_frost_wood")
add_fence("redwood", "redwood_wood", "Redwood", "ethereal_redwood_wood")
add_fence("willow", "willow", "Willow", "ethereal_willow_wood")
add_fence("yellowwood", "yellow_wood", "Healing Wood", "ethereal_yellow_wood")
add_fence("palm", "palm_wood", "Palm", "moretrees_palm_wood")
add_fence("banana", "banana_wood", "Banana Wood", "ethereal_banana_wood")
add_fence("mushroom", "mushroom_trunk", "Mushroom", "ethereal_mushroom_trunk")
add_fence("birch", "birch_wood", "Birch", "moretrees_birch_wood")
add_fence("sakura", "sakura_wood", "Sakura", "ethereal_sakura_wood")
-- add compatibility for ethereal's to default wooden gates
minetest.register_alias("ethereal:fencegate_wood_open", "doors:gate_wood_open")
minetest.register_alias("ethereal:fencegate_wood_closed", "doors:gate_wood_closed")
minetest.register_alias("ethereal:fencegate_acacia_open", "doors:gate_acacia_wood_open")
minetest.register_alias("ethereal:fencegate_acacia_closed", "doors:gate_acacia_wood_closed")
minetest.register_alias("ethereal:fencegate_junglewood_open", "doors:gate_junglewood_open")
minetest.register_alias("ethereal:fencegate_junglewood_closed", "doors:gate_junglewood_closed")
minetest.register_alias("ethereal:fencegate_pine_open", "doors:gate_pine_wood_open")
minetest.register_alias("ethereal:fencegate_pine_closed", "doors:gate_pine_wood_closed")
-- sakura door
doors.register_door("ethereal:door_sakura", {
tiles = {
{name = "ethereal_sakura_door.png", backface_culling = true}
},
description = S("Sakura Wood Door"),
inventory_image = "ethereal_sakura_door_inv.png",
groups = {
snappy = 1, choppy = 2, oddly_breakable_by_hand = 2,
flammable = 2
},
sound_open = "doors_glass_door_open",
sound_close = "doors_glass_door_close",
recipe = {
{"group:stick", "default:paper"},
{"default:paper", "group:stick"},
{"ethereal:sakura_wood", "ethereal:sakura_wood"}
}
})
minetest.register_alias("ethereal:sakura_door", "ethereal:door_sakura")
minetest.register_alias("ethereal:sakura_door_a", "ethereal:door_sakura_a")
minetest.register_alias("ethereal:sakura_door_b", "ethereal:door_sakura_b")

View File

@ -16,7 +16,7 @@ local fish_items = {
{"ethereal:fish_pike", "grassy"}, {"ethereal:fish_pike", "grassy"},
{"ethereal:fish_flathead", "jungle"}, {"ethereal:fish_flathead", "jungle"},
{"ethereal:fish_pufferfish", "desert_ocean"}, {"ethereal:fish_pufferfish", "desert_ocean"},
{"ethereal:fish_chichlid", "junglee_ocean"}, {"ethereal:fish_cichlid", "junglee_ocean"},
{"ethereal:fish_coy", "sakura"}, {"ethereal:fish_coy", "sakura"},
{"ethereal:fish_angler", "ocean"}, {"ethereal:fish_angler", "ocean"},
{"ethereal:fish_jellyfish", "ocean"}, {"ethereal:fish_jellyfish", "ocean"},
@ -484,7 +484,7 @@ local fish = {
{"Pufferfish", "pufferfish", -2}, {"Pufferfish", "pufferfish", -2},
{"Coy", "coy", 2}, {"Coy", "coy", 2},
{"Salmon", "salmon", 2}, {"Salmon", "salmon", 2},
{"Chichlid", "chichlid", 2}, {"Cichlid", "cichlid", 2},
{"Angler", "angler", 2}, {"Angler", "angler", 2},
{"Jellyfish", "jellyfish", 0}, {"Jellyfish", "jellyfish", 0},
{"Seahorse", "seahorse", 0}, {"Seahorse", "seahorse", 0},
@ -557,5 +557,6 @@ minetest.register_craft({
}) })
-- compatibility -- compatibility
minetest.register_alias("ethereal:fish_raw", "ethereal:fish_chichlid") minetest.register_alias("ethereal:fish_raw", "ethereal:fish_cichlid")
minetest.register_alias("ethereal:fishing_rod_baited", "ethereal:fishing_rod") minetest.register_alias("ethereal:fishing_rod_baited", "ethereal:fishing_rod")
minetest.register_alias("ethereal:fish_chichlid", "ethereal:fish_cichlid")

111
gates.lua
View File

@ -1,111 +0,0 @@
local S = ethereal.intllib
-- register Ethereal wood type gates
doors.register_fencegate("ethereal:fencegate_scorched", {
description = S("Scorched Wood Fence Gate"),
texture = "ethereal_scorched_tree.png",
material = "ethereal:scorched_tree",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("ethereal:fencegate_frostwood", {
description = S("Frost Wood Fence Gate"),
texture = "ethereal_frost_wood.png",
material = "ethereal:frost_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("ethereal:fencegate_redwood", {
description = S("Redwood Fence Gate"),
texture = "ethereal_redwood_wood.png",
material = "ethereal:redwood_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("ethereal:fencegate_willow", {
description = S("Willow Wood Fence Gate"),
texture = "ethereal_willow_wood.png",
material = "ethereal:willow_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("ethereal:fencegate_yellowwood", {
description = S("Healing Wood Fence Gate"),
texture = "ethereal_yellow_wood.png",
material = "ethereal:yellow_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("ethereal:fencegate_palm", {
description = S("Palm Wood Fence Gate"),
texture = "moretrees_palm_wood.png",
material = "ethereal:palm_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("ethereal:fencegate_banana", {
description = S("Banana Wood Fence Gate"),
texture = "ethereal_banana_wood.png",
material = "ethereal:banana_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("ethereal:fencegate_mushroom", {
description = S("Mushroom Trunk Fence Gate"),
texture = "ethereal_mushroom_trunk.png",
material = "ethereal:mushroom_trunk",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("ethereal:fencegate_birch", {
description = S("Birch Wood Fence Gate"),
texture = "moretrees_birch_wood.png",
material = "ethereal:birch_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("ethereal:fencegate_sakura", {
description = S("Sakura Wood Fence Gate"),
texture = "ethereal_sakura_wood.png",
material = "ethereal:sakura_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
-- add compatibility for ethereal's to default wooden gates
minetest.register_alias("ethereal:fencegate_wood_open", "doors:gate_wood_open")
minetest.register_alias("ethereal:fencegate_wood_closed", "doors:gate_wood_closed")
minetest.register_alias("ethereal:fencegate_acacia_open", "doors:gate_acacia_wood_open")
minetest.register_alias("ethereal:fencegate_acacia_closed", "doors:gate_acacia_wood_closed")
minetest.register_alias("ethereal:fencegate_junglewood_open", "doors:gate_junglewood_open")
minetest.register_alias("ethereal:fencegate_junglewood_closed", "doors:gate_junglewood_closed")
minetest.register_alias("ethereal:fencegate_pine_open", "doors:gate_pine_wood_open")
minetest.register_alias("ethereal:fencegate_pine_closed", "doors:gate_pine_wood_closed")
-- sakura door
doors.register_door("ethereal:door_sakura", {
tiles = {
{name = "ethereal_sakura_door.png", backface_culling = true}
},
description = S("Sakura Wood Door"),
inventory_image = "ethereal_sakura_door_inv.png",
groups = {
snappy = 1, choppy = 2, oddly_breakable_by_hand = 2,
flammable = 2
},
sound_open = "doors_glass_door_open",
sound_close = "doors_glass_door_close",
recipe = {
{"group:stick", "default:paper"},
{"default:paper", "group:stick"},
{"ethereal:sakura_wood", "ethereal:sakura_wood"}
}
})
minetest.register_alias("ethereal:sakura_door", "ethereal:door_sakura")
minetest.register_alias("ethereal:sakura_door_a", "ethereal:door_sakura_a")
minetest.register_alias("ethereal:sakura_door_b", "ethereal:door_sakura_b")

View File

@ -11,7 +11,7 @@
-- DO NOT change settings below, use the settings.conf file instead -- DO NOT change settings below, use the settings.conf file instead
ethereal = { ethereal = {
version = "1.28", version = "20210406",
leaftype = minetest.settings:get('ethereal.leaftype') or 0, leaftype = minetest.settings:get('ethereal.leaftype') or 0,
leafwalk = minetest.settings:get_bool('ethereal.leafwalk', false), leafwalk = minetest.settings:get_bool('ethereal.leafwalk', false),
cavedirt = minetest.settings:get_bool('ethereal.cavedirt', true), cavedirt = minetest.settings:get_bool('ethereal.cavedirt', true),
@ -101,7 +101,6 @@ dofile(path .. "/fishing.lua")
dofile(path .. "/extra.lua") dofile(path .. "/extra.lua")
dofile(path .. "/sealife.lua") dofile(path .. "/sealife.lua")
dofile(path .. "/fences.lua") dofile(path .. "/fences.lua")
dofile(path .. "/gates.lua")
dofile(path .. "/biomes.lua") dofile(path .. "/biomes.lua")
dofile(path .. "/ores.lua") dofile(path .. "/ores.lua")
dofile(path .. "/schems.lua") dofile(path .. "/schems.lua")

View File

@ -83,7 +83,7 @@ lucky_block:add_blocks({
{name = "ethereal:fish_plaice", max = 7}, {name = "ethereal:fish_plaice", max = 7},
{name = "ethereal:fish_pufferfish", max = 5}, {name = "ethereal:fish_pufferfish", max = 5},
{name = "ethereal:fish_salmon", max = 7}, {name = "ethereal:fish_salmon", max = 7},
{name = "ethereal:fish_chichlid", max = 7}, {name = "ethereal:fish_cichlid", max = 7},
{name = "ethereal:fish_trout", max =7}, {name = "ethereal:fish_trout", max =7},
{name = "ethereal:fish_angler", max = 7}, {name = "ethereal:fish_angler", max = 7},
{name = "ethereal:fish_piranha", max = 7}, {name = "ethereal:fish_piranha", max = 7},

View File

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 367 B