diff options
27 files changed, 251 insertions, 2 deletions
@@ -1 +1,24 @@ +# Minetest Errata +## a mod that fixes small errors and omissions in other mods +By its nature, the mod is rather intrusive. It will actively try to alter and override existing node definitions and such. + +### Issues the mod addresses: +* connectivity of xpanes - adds new groups for materials (e.g. sandstone) and allows panes to connect to them +** the new groups are prefixed with "me_" to avoid potential conflicts +* erasing books back into clean books + +### Introduces items +* obsidian glass panes +* paper walls, wooden bars +* wooden and steel bar doors +* sandstone cobble varieties, with stairs/slabs/microblocks, walls, pkarcs + +## Borrowed items + +This mod can borrow some items from other mods (in cases where the whole mod seems to much, but some of its contents are definitely something that should have been in the game from the get go). So far the list of such mods is this: + +* Mintest Game Plus by Wuzzy http://repo.or.cz/minetest_mtg_plus.git +** paper walls and wooden bars +** steel bar and wooden bar doors +** sandstone cobble varieties diff --git a/depends.txt b/depends.txt index ddc201b..5d0a6df 100644 --- a/depends.txt +++ b/depends.txt @@ -1,2 +1,8 @@ default xpanes +doors +walls +stairs +moreblocks? +glass_stained? +pkarcs? diff --git a/doors.lua b/doors.lua new file mode 100644 index 0000000..6d840c7 --- /dev/null +++ b/doors.lua @@ -0,0 +1,33 @@ + + +doors.register("door_wood_bar", { + tiles = {{ name = "minetest_errata_door_wood_bar.png", backface_culling = true }}, + description = "Wooden Bar Door", + _doc_items_longdec = door_simple, + _doc_items_usagehelp = door_simple_use, + inventory_image = "minetest_errata_door_wood_bar_item.png", + sounds = default.node_sound_wood_defaults(), + sound_open = "doors_fencegate_open", + sound_close = "doors_fencegate_close", + groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 }, + recipe = { + {"xpanes:wood_flat",}, + {"xpanes:wood_flat",}, + } +}) + +doors.register("door_iron_bar", { + tiles = {{ name = "minetest_errata_door_iron_bar.png", backface_culling = true }}, + description = "Iron Bar Door", + _doc_items_longdec = door_simple, + _doc_items_usagehelp = door_simple_use, + inventory_image = "minetest_errata_door_iron_bar_item.png", + sound_open = "minetest_errata_door_iron_bar_open", + sound_close = "minetest_errata_door_iron_bar_close", + sounds = metal_sounds, + groups = { snappy = 2, bendy = 1, cracky = 1, melty = 2, }, + recipe = { + {"xpanes:bar_flat",}, + {"xpanes:bar_flat",}, + } +})
\ No newline at end of file @@ -1,5 +1,14 @@ local modpath = minetest.get_modpath("minetest_errata") +minetest_errata = {} +minetest_errata.prefix = "me_" + dofile(modpath.."/books.lua") +dofile(modpath.."/doors.lua") + +dofile(modpath.."/sandstone_cobble.lua") + +dofile(modpath.."/missing_groups.lua") + dofile(modpath.."/xpanes.lua")
\ No newline at end of file diff --git a/missing_groups.lua b/missing_groups.lua new file mode 100644 index 0000000..d6f985d --- /dev/null +++ b/missing_groups.lua @@ -0,0 +1,32 @@ +local nodes_with_missing_groups = { + -- Sandstone varieties + {name = "default:sandstone", groups = {sandstone = 1}}, + {name = "default:sandstonebrick", groups = {sandstone = 1}}, + {name = "default:sandstone_block", groups = {sandstone = 1}}, + {name = "default:desert_sandstone", groups = {sandstone = 1}}, + {name = "default:desert_sandstone_brick", groups = {sandstone = 1}}, + {name = "default:desert_sandstone_block", groups = {sandstone = 1}}, + {name = "default:silver_sandstone", groups = {sandstone = 1}}, + {name = "default:silver_sandstone_brick", groups = {sandstone = 1}}, + {name = "default:silver_sandstone_block", groups = {sandstone = 1}}, + -- Red bricks + {name = "default:brick", groups = {bricks = 1}}, + -- Obsidian + {name = "default:obsidian", groups = {stone = 1}}, + {name = "default:obsidianbrick", groups = {stone = 1}}, + {name = "default:obsidian_block", groups = {stone = 1}}, +} + +for _,node in ipairs(nodes_with_missing_groups) do + + local entity = {} + for name,value in pairs(minetest.registered_nodes[node.name]) do + entity[name] = value + end + for g,v in pairs(node.groups) do + entity.groups[minetest_errata.prefix .. g] = v + end + minetest.register_node(":" .. node.name, entity) + +end + diff --git a/sandstone_cobble.lua b/sandstone_cobble.lua new file mode 100644 index 0000000..0676046 --- /dev/null +++ b/sandstone_cobble.lua @@ -0,0 +1,73 @@ +local cobble_table = { + {name = "sandstone", desc = "Sandstone"}, + {name = "desert_sandstone", desc = "Desert Sandstone"}, + {name = "silver_sandstone", desc = "Silver Sandstone"}, +} + +for _,node in ipairs(cobble_table) do + + minetest.register_node("minetest_errata:" .. node.name .. "_cobble", { + description = node.desc, + tiles = {"minetest_errata_" .. node.name .. "_cobble.png"}, + groups = {cracky = 3}, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + }) + + minetest.register_craft({ + output = "minetest_errata:" .. node.name .. "_cobble 2", + recipe = { { "default:" .. node.name, "default:" .. node.name } }, + }) + + minetest.register_craft({ + type = "cooking", + output = "default:" .. node.name, + recipe = "minetest_errata:" .. node.name .. "_cobble", + }) + + -- Derivative blocks + + if stairs and stairs.mod and stairs.mod == "redo" then + + stairs.register_all(node.name .. "_cobble", "minetest_errata:" .. node.name .. "_cobble", + {cracky = 3}, + {"minetest_errata_" .. node.name .. "_cobble.png"}, + node.desc .. " Stair", + node.desc .. " Slab", + default.node_sound_wood_defaults()) + + elseif minetest.global_exists("stairsplus") then + + stairsplus:register_all("minetest_errata", node.name .. "_cobble", "minetest_errata:" .. node.name .. "_cobble", { + description = node.desc, + tiles = {"minetest_errata_" .. node.name .. "_cobble.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_wood_defaults(), + }) + + else + + stairs.register_stair_and_slab(node.name .. "_cobble", "minetest_errata:" .. node.name .. "_cobble", + {cracky = 3}, + {"minetest_errata_" .. node.name .. "_cobble.png"}, + node.desc .. " Stair", + node.desc .. " Slab", + default.node_sound_wood_defaults()) + + end + + + -- Walls + walls.register("minetest_errata:wall_" .. node.name .. "_cobble", + node.desc .. " Cobble Wall", + "minetest_errata_" .. node.name .. "_cobble.png", + "minetest_errata:" .. node.name .. "_cobble", + default.node_sound_stone_defaults() + ) + + -- procedurally-generated arcs + if minetest.get_modpath("pkarcs") then + pkarcs.register_node("minetest_errata:" .. node.name .. "_cobble") + end + +end diff --git a/sounds/mtg_plus_door_iron_bar_close.ogg b/sounds/mtg_plus_door_iron_bar_close.ogg Binary files differnew file mode 100644 index 0000000..cdc4ff2 --- /dev/null +++ b/sounds/mtg_plus_door_iron_bar_close.ogg diff --git a/sounds/mtg_plus_door_iron_bar_open.ogg b/sounds/mtg_plus_door_iron_bar_open.ogg Binary files differnew file mode 100644 index 0000000..16408a8 --- /dev/null +++ b/sounds/mtg_plus_door_iron_bar_open.ogg diff --git a/sounds/mtg_plus_paper_dig.1.ogg b/sounds/mtg_plus_paper_dig.1.ogg Binary files differnew file mode 100644 index 0000000..702d5aa --- /dev/null +++ b/sounds/mtg_plus_paper_dig.1.ogg diff --git a/sounds/mtg_plus_paper_dig.2.ogg b/sounds/mtg_plus_paper_dig.2.ogg Binary files differnew file mode 100644 index 0000000..88d8eae --- /dev/null +++ b/sounds/mtg_plus_paper_dig.2.ogg diff --git a/sounds/mtg_plus_paper_dig.3.ogg b/sounds/mtg_plus_paper_dig.3.ogg Binary files differnew file mode 100644 index 0000000..1460139 --- /dev/null +++ b/sounds/mtg_plus_paper_dig.3.ogg diff --git a/sounds/mtg_plus_paper_dug.1.ogg b/sounds/mtg_plus_paper_dug.1.ogg Binary files differnew file mode 100644 index 0000000..de90b44 --- /dev/null +++ b/sounds/mtg_plus_paper_dug.1.ogg diff --git a/sounds/mtg_plus_paper_step.1.ogg b/sounds/mtg_plus_paper_step.1.ogg Binary files differnew file mode 100644 index 0000000..32879bc --- /dev/null +++ b/sounds/mtg_plus_paper_step.1.ogg diff --git a/textures/minetest_errata_desert_sandstone_cobble.png b/textures/minetest_errata_desert_sandstone_cobble.png Binary files differnew file mode 100644 index 0000000..6b1cc92 --- /dev/null +++ b/textures/minetest_errata_desert_sandstone_cobble.png diff --git a/textures/minetest_errata_door_iron_bar.png b/textures/minetest_errata_door_iron_bar.png Binary files differnew file mode 100644 index 0000000..13eb0a2 --- /dev/null +++ b/textures/minetest_errata_door_iron_bar.png diff --git a/textures/minetest_errata_door_iron_bar_item.png b/textures/minetest_errata_door_iron_bar_item.png Binary files differnew file mode 100644 index 0000000..93c2de6 --- /dev/null +++ b/textures/minetest_errata_door_iron_bar_item.png diff --git a/textures/minetest_errata_door_wood_bar.png b/textures/minetest_errata_door_wood_bar.png Binary files differnew file mode 100644 index 0000000..89ba72b --- /dev/null +++ b/textures/minetest_errata_door_wood_bar.png diff --git a/textures/minetest_errata_door_wood_bar_item.png b/textures/minetest_errata_door_wood_bar_item.png Binary files differnew file mode 100644 index 0000000..4708d2e --- /dev/null +++ b/textures/minetest_errata_door_wood_bar_item.png diff --git a/textures/minetest_errata_paperwall.png b/textures/minetest_errata_paperwall.png Binary files differnew file mode 100644 index 0000000..3c8352d --- /dev/null +++ b/textures/minetest_errata_paperwall.png diff --git a/textures/minetest_errata_sandstone_cobble.png b/textures/minetest_errata_sandstone_cobble.png Binary files differnew file mode 100644 index 0000000..61fd148 --- /dev/null +++ b/textures/minetest_errata_sandstone_cobble.png diff --git a/textures/minetest_errata_silver_sandstone_cobble.png b/textures/minetest_errata_silver_sandstone_cobble.png Binary files differnew file mode 100644 index 0000000..fc71c83 --- /dev/null +++ b/textures/minetest_errata_silver_sandstone_cobble.png diff --git a/textures/minetest_errata_wooden_bar.png b/textures/minetest_errata_wooden_bar.png Binary files differnew file mode 100644 index 0000000..ecf53bf --- /dev/null +++ b/textures/minetest_errata_wooden_bar.png diff --git a/textures/minetest_errata_wooden_bar_side.png b/textures/minetest_errata_wooden_bar_side.png Binary files differnew file mode 100644 index 0000000..9613634 --- /dev/null +++ b/textures/minetest_errata_wooden_bar_side.png diff --git a/textures/minetest_errata_wooden_bar_y.png b/textures/minetest_errata_wooden_bar_y.png Binary files differnew file mode 100644 index 0000000..6bc362d --- /dev/null +++ b/textures/minetest_errata_wooden_bar_y.png diff --git a/textures/errata_xpanes_black.png b/textures/minetest_errata_xpanes_black.png Binary files differindex 98e835e..98e835e 100644 --- a/textures/errata_xpanes_black.png +++ b/textures/minetest_errata_xpanes_black.png diff --git a/textures/errata_xpanes_pane_half_obsidian.png b/textures/minetest_errata_xpanes_pane_half_obsidian.png Binary files differindex 2b3ce56..2b3ce56 100644 --- a/textures/errata_xpanes_pane_half_obsidian.png +++ b/textures/minetest_errata_xpanes_pane_half_obsidian.png @@ -1,6 +1,6 @@ -xpanes.register_pane("obsidian_pane", { +xpanes.register_pane("obsidian", { description = "Obsidian Pane", - textures = {"default_obsidian_glass.png","errata_xpanes_pane_half_obsidian.png","errata_xpanes_black.png"}, + textures = {"default_obsidian_glass.png","minetest_errata_xpanes_pane_half_obsidian.png","minetest_errata_xpanes_black.png"}, inventory_image = "default_obsidian_glass.png", wield_image = "default_obsidian_glass.png", sounds = default.node_sound_glass_defaults(), @@ -10,3 +10,76 @@ xpanes.register_pane("obsidian_pane", { {"default:obsidian_glass", "default:obsidian_glass", "default:obsidian_glass"} } }) + +xpanes.register_pane("paper", { + description = "Paper Barrier", + inventory_image = "minetest_errata_paperwall.png", + wield_image = "minetest_errata_paperwall.png", + textures = {"minetest_errata_paperwall.png", "minetest_errata_paperwall.png", "minetest_errata_paperwall.png"}, + groups = {snappy=3, flammable=4, pane=1}, + sounds = { + footstep = {name="minetest_errata_paper_step", gain=0.1, max_hear_distance=7}, + place = {name="minetest_errata_paper_step", gain=0.3, max_hear_distance=13}, + dig = {name="minetest_errata_paper_dig", gain=0.1, max_hear_distance=11}, + dug = {name="minetest_errata_paper_dug", gain=0.2, max_hear_distance=13}, + }, + recipe = { + { "default:paper", "default:paper", "default:paper" }, + { "default:paper", "default:paper", "default:paper" }, + } +}) + + +xpanes.register_pane("wood", { + description = "Wooden Bars", + inventory_image = "minetest_errata_wooden_bar.png", + wield_image = "minetest_errata_wooden_bar.png", + textures = {"minetest_errata_wooden_bar.png", "minetest_errata_wooden_bar_side.png", "minetest_errata_wooden_bar_y.png"}, + groups = {choppy=3, oddly_breakable_by_hand=2, flammable=2, pane=1}, + sounds = default.node_sound_wood_defaults(), + recipe = { + { "group:wood", "", "group:wood" }, + { "group:wood", "", "group:wood" }, + { "group:wood", "", "group:wood" }, + } +}) + + +local extra_groups = { + "group:bakedclay", + "group:" .. minetest_errata.prefix .. "sandstone", + "group:" .. minetest_errata.prefix .. "stone", + "group:" .. minetest_errata.prefix .. "bricks", +} + +local xpane_nodes = { "xpanes:bar", "xpanes:pane", "xpanes:wood", "xpanes:paper" } + +for _,node in ipairs(xpane_nodes) do + + local entity = {} + for name,value in pairs(minetest.registered_nodes[node]) do + entity[name] = value + end + + for _,g in ipairs(extra_groups) do + table.insert(entity.connects_to, g) + end + + minetest.register_node(":" .. node, entity) + +end + +if minetest.get_modpath("glass_stained") then + local entity = {} + for name,value in pairs(minetest.registered_nodes["xpanes:bar_top"]) do + entity[name] = value + end + + for _,g in ipairs(extra_groups) do + table.insert(entity.connects_to, g) + end + + minetest.register_node(":xpanes:bar_top", entity) +end + + |