From d6d5d3e2c27fe6dcb17982a069abc9a483af6d2f Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 6 Apr 2021 09:18:03 +0100 Subject: [PATCH] fix cichlid typo, optimize wood fence/rail/gate/lamp addition --- fences.lua | 251 ++++++------------ fishing.lua | 7 +- gates.lua | 111 -------- init.lua | 3 +- lucky_block.lua | 2 +- ...chichlid.png => ethereal_fish_cichlid.png} | Bin 6 files changed, 92 insertions(+), 282 deletions(-) delete mode 100644 gates.lua rename textures/{ethereal_fish_chichlid.png => ethereal_fish_cichlid.png} (100%) diff --git a/fences.lua b/fences.lua index 236b55e..56db90c 100644 --- a/fences.lua +++ b/fences.lua @@ -1,178 +1,99 @@ local S = ethereal.intllib -default.register_fence("ethereal:fence_scorched", { - description = S("Scorched Fence"), - texture = "ethereal_scorched_tree.png", - material = "ethereal:scorched_tree", - 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_frostwood", { - 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 -}) +local add_fence = function(name, node, desc, texture) -default.register_fence("ethereal:fence_redwood", { - description = S("Redwood Fence"), - texture = "ethereal_redwood_wood.png", - material = "ethereal:redwood_wood", - groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, - sounds = default.node_sound_wood_defaults(), - check_for_pole = true -}) + if default.register_fence then -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_" .. name, { + description = S(desc .. " Fence"), + texture = texture .. ".png", + material = "ethereal:" .. node, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + check_for_pole = true + }) + end -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 -}) + if default.register_fence_rail then -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_rail("ethereal:fence_rail_" .. name, { + description = S(desc .. " Fence Rail"), + texture = texture .. ".png", + material = "ethereal:" .. node, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() + }) + end -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 -}) + if doors.register_fencegate then -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 -}) + doors.register_fencegate("ethereal:fencegate_" .. name, { + description = S(desc .. " Fence Gate"), + texture = texture .. ".png", + material = "ethereal:" .. node, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} + }) + end -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}, - sounds = default.node_sound_wood_defaults() -}) - -default.register_fence_rail("ethereal:fence_rail_frostwood", { - 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", { - description = S("Redwood Fence Rail"), - texture = "ethereal_redwood_wood.png", - material = "ethereal:redwood_wood", - groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, - sounds = default.node_sound_wood_defaults() -}) - -default.register_fence_rail("ethereal:fence_rail_willow", { - 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() -}) + if default.register_mesepost then + default.register_mesepost("ethereal:mese_post_" .. name, { + description = S(desc .. " Mese Post Light"), + texture = texture .. ".png", + material = "ethereal:" .. node, + }) + 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") diff --git a/fishing.lua b/fishing.lua index 9ce89d9..0ccad12 100644 --- a/fishing.lua +++ b/fishing.lua @@ -16,7 +16,7 @@ local fish_items = { {"ethereal:fish_pike", "grassy"}, {"ethereal:fish_flathead", "jungle"}, {"ethereal:fish_pufferfish", "desert_ocean"}, - {"ethereal:fish_chichlid", "junglee_ocean"}, + {"ethereal:fish_cichlid", "junglee_ocean"}, {"ethereal:fish_coy", "sakura"}, {"ethereal:fish_angler", "ocean"}, {"ethereal:fish_jellyfish", "ocean"}, @@ -484,7 +484,7 @@ local fish = { {"Pufferfish", "pufferfish", -2}, {"Coy", "coy", 2}, {"Salmon", "salmon", 2}, - {"Chichlid", "chichlid", 2}, + {"Cichlid", "cichlid", 2}, {"Angler", "angler", 2}, {"Jellyfish", "jellyfish", 0}, {"Seahorse", "seahorse", 0}, @@ -557,5 +557,6 @@ minetest.register_craft({ }) -- 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:fish_chichlid", "ethereal:fish_cichlid") diff --git a/gates.lua b/gates.lua deleted file mode 100644 index 938d14e..0000000 --- a/gates.lua +++ /dev/null @@ -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") diff --git a/init.lua b/init.lua index 2584b72..47c605e 100644 --- a/init.lua +++ b/init.lua @@ -11,7 +11,7 @@ -- DO NOT change settings below, use the settings.conf file instead ethereal = { - version = "1.28", + version = "20210406", leaftype = minetest.settings:get('ethereal.leaftype') or 0, leafwalk = minetest.settings:get_bool('ethereal.leafwalk', false), cavedirt = minetest.settings:get_bool('ethereal.cavedirt', true), @@ -101,7 +101,6 @@ dofile(path .. "/fishing.lua") dofile(path .. "/extra.lua") dofile(path .. "/sealife.lua") dofile(path .. "/fences.lua") -dofile(path .. "/gates.lua") dofile(path .. "/biomes.lua") dofile(path .. "/ores.lua") dofile(path .. "/schems.lua") diff --git a/lucky_block.lua b/lucky_block.lua index 9cb595b..e5e646c 100644 --- a/lucky_block.lua +++ b/lucky_block.lua @@ -83,7 +83,7 @@ lucky_block:add_blocks({ {name = "ethereal:fish_plaice", max = 7}, {name = "ethereal:fish_pufferfish", max = 5}, {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_angler", max = 7}, {name = "ethereal:fish_piranha", max = 7}, diff --git a/textures/ethereal_fish_chichlid.png b/textures/ethereal_fish_cichlid.png similarity index 100% rename from textures/ethereal_fish_chichlid.png rename to textures/ethereal_fish_cichlid.png