summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorh-v-smacker <hans-von-smacker+github@gmail.com>2018-09-23 04:38:15 +0300
committerh-v-smacker <hans-von-smacker+github@gmail.com>2018-09-23 04:38:15 +0300
commit5a8922a0155b003ac0bb8d911e99808ffde1a7da (patch)
treec5beab878c2dbd5dbbe237775d94aefb97fa42f5
parentc5cc8ec993bee4473af8c2e03c0f92ec0dc9453d (diff)
first actual content
-rw-r--r--README.md23
-rw-r--r--depends.txt6
-rw-r--r--doors.lua33
-rw-r--r--init.lua9
-rw-r--r--missing_groups.lua32
-rw-r--r--sandstone_cobble.lua73
-rw-r--r--sounds/mtg_plus_door_iron_bar_close.oggbin0 -> 25716 bytes
-rw-r--r--sounds/mtg_plus_door_iron_bar_open.oggbin0 -> 22898 bytes
-rw-r--r--sounds/mtg_plus_paper_dig.1.oggbin0 -> 29248 bytes
-rw-r--r--sounds/mtg_plus_paper_dig.2.oggbin0 -> 31318 bytes
-rw-r--r--sounds/mtg_plus_paper_dig.3.oggbin0 -> 20979 bytes
-rw-r--r--sounds/mtg_plus_paper_dug.1.oggbin0 -> 25732 bytes
-rw-r--r--sounds/mtg_plus_paper_step.1.oggbin0 -> 17175 bytes
-rw-r--r--textures/minetest_errata_desert_sandstone_cobble.pngbin0 -> 588 bytes
-rw-r--r--textures/minetest_errata_door_iron_bar.pngbin0 -> 643 bytes
-rw-r--r--textures/minetest_errata_door_iron_bar_item.pngbin0 -> 186 bytes
-rw-r--r--textures/minetest_errata_door_wood_bar.pngbin0 -> 982 bytes
-rw-r--r--textures/minetest_errata_door_wood_bar_item.pngbin0 -> 188 bytes
-rw-r--r--textures/minetest_errata_paperwall.pngbin0 -> 486 bytes
-rw-r--r--textures/minetest_errata_sandstone_cobble.pngbin0 -> 746 bytes
-rw-r--r--textures/minetest_errata_silver_sandstone_cobble.pngbin0 -> 526 bytes
-rw-r--r--textures/minetest_errata_wooden_bar.pngbin0 -> 292 bytes
-rw-r--r--textures/minetest_errata_wooden_bar_side.pngbin0 -> 565 bytes
-rw-r--r--textures/minetest_errata_wooden_bar_y.pngbin0 -> 142 bytes
-rw-r--r--textures/minetest_errata_xpanes_black.png (renamed from textures/errata_xpanes_black.png)bin172 -> 172 bytes
-rw-r--r--textures/minetest_errata_xpanes_pane_half_obsidian.png (renamed from textures/errata_xpanes_pane_half_obsidian.png)bin169 -> 169 bytes
-rw-r--r--xpanes.lua77
27 files changed, 251 insertions, 2 deletions
diff --git a/README.md b/README.md
index 8b13789..dae60e7 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/init.lua b/init.lua
index 5254b75..d410788 100644
--- a/init.lua
+++ b/init.lua
@@ -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
new file mode 100644
index 0000000..cdc4ff2
--- /dev/null
+++ b/sounds/mtg_plus_door_iron_bar_close.ogg
Binary files differ
diff --git a/sounds/mtg_plus_door_iron_bar_open.ogg b/sounds/mtg_plus_door_iron_bar_open.ogg
new file mode 100644
index 0000000..16408a8
--- /dev/null
+++ b/sounds/mtg_plus_door_iron_bar_open.ogg
Binary files differ
diff --git a/sounds/mtg_plus_paper_dig.1.ogg b/sounds/mtg_plus_paper_dig.1.ogg
new file mode 100644
index 0000000..702d5aa
--- /dev/null
+++ b/sounds/mtg_plus_paper_dig.1.ogg
Binary files differ
diff --git a/sounds/mtg_plus_paper_dig.2.ogg b/sounds/mtg_plus_paper_dig.2.ogg
new file mode 100644
index 0000000..88d8eae
--- /dev/null
+++ b/sounds/mtg_plus_paper_dig.2.ogg
Binary files differ
diff --git a/sounds/mtg_plus_paper_dig.3.ogg b/sounds/mtg_plus_paper_dig.3.ogg
new file mode 100644
index 0000000..1460139
--- /dev/null
+++ b/sounds/mtg_plus_paper_dig.3.ogg
Binary files differ
diff --git a/sounds/mtg_plus_paper_dug.1.ogg b/sounds/mtg_plus_paper_dug.1.ogg
new file mode 100644
index 0000000..de90b44
--- /dev/null
+++ b/sounds/mtg_plus_paper_dug.1.ogg
Binary files differ
diff --git a/sounds/mtg_plus_paper_step.1.ogg b/sounds/mtg_plus_paper_step.1.ogg
new file mode 100644
index 0000000..32879bc
--- /dev/null
+++ b/sounds/mtg_plus_paper_step.1.ogg
Binary files differ
diff --git a/textures/minetest_errata_desert_sandstone_cobble.png b/textures/minetest_errata_desert_sandstone_cobble.png
new file mode 100644
index 0000000..6b1cc92
--- /dev/null
+++ b/textures/minetest_errata_desert_sandstone_cobble.png
Binary files differ
diff --git a/textures/minetest_errata_door_iron_bar.png b/textures/minetest_errata_door_iron_bar.png
new file mode 100644
index 0000000..13eb0a2
--- /dev/null
+++ b/textures/minetest_errata_door_iron_bar.png
Binary files differ
diff --git a/textures/minetest_errata_door_iron_bar_item.png b/textures/minetest_errata_door_iron_bar_item.png
new file mode 100644
index 0000000..93c2de6
--- /dev/null
+++ b/textures/minetest_errata_door_iron_bar_item.png
Binary files differ
diff --git a/textures/minetest_errata_door_wood_bar.png b/textures/minetest_errata_door_wood_bar.png
new file mode 100644
index 0000000..89ba72b
--- /dev/null
+++ b/textures/minetest_errata_door_wood_bar.png
Binary files differ
diff --git a/textures/minetest_errata_door_wood_bar_item.png b/textures/minetest_errata_door_wood_bar_item.png
new file mode 100644
index 0000000..4708d2e
--- /dev/null
+++ b/textures/minetest_errata_door_wood_bar_item.png
Binary files differ
diff --git a/textures/minetest_errata_paperwall.png b/textures/minetest_errata_paperwall.png
new file mode 100644
index 0000000..3c8352d
--- /dev/null
+++ b/textures/minetest_errata_paperwall.png
Binary files differ
diff --git a/textures/minetest_errata_sandstone_cobble.png b/textures/minetest_errata_sandstone_cobble.png
new file mode 100644
index 0000000..61fd148
--- /dev/null
+++ b/textures/minetest_errata_sandstone_cobble.png
Binary files differ
diff --git a/textures/minetest_errata_silver_sandstone_cobble.png b/textures/minetest_errata_silver_sandstone_cobble.png
new file mode 100644
index 0000000..fc71c83
--- /dev/null
+++ b/textures/minetest_errata_silver_sandstone_cobble.png
Binary files differ
diff --git a/textures/minetest_errata_wooden_bar.png b/textures/minetest_errata_wooden_bar.png
new file mode 100644
index 0000000..ecf53bf
--- /dev/null
+++ b/textures/minetest_errata_wooden_bar.png
Binary files differ
diff --git a/textures/minetest_errata_wooden_bar_side.png b/textures/minetest_errata_wooden_bar_side.png
new file mode 100644
index 0000000..9613634
--- /dev/null
+++ b/textures/minetest_errata_wooden_bar_side.png
Binary files differ
diff --git a/textures/minetest_errata_wooden_bar_y.png b/textures/minetest_errata_wooden_bar_y.png
new file mode 100644
index 0000000..6bc362d
--- /dev/null
+++ b/textures/minetest_errata_wooden_bar_y.png
Binary files differ
diff --git a/textures/errata_xpanes_black.png b/textures/minetest_errata_xpanes_black.png
index 98e835e..98e835e 100644
--- a/textures/errata_xpanes_black.png
+++ b/textures/minetest_errata_xpanes_black.png
Binary files differ
diff --git a/textures/errata_xpanes_pane_half_obsidian.png b/textures/minetest_errata_xpanes_pane_half_obsidian.png
index 2b3ce56..2b3ce56 100644
--- a/textures/errata_xpanes_pane_half_obsidian.png
+++ b/textures/minetest_errata_xpanes_pane_half_obsidian.png
Binary files differ
diff --git a/xpanes.lua b/xpanes.lua
index c271a5c..596ee47 100644
--- a/xpanes.lua
+++ b/xpanes.lua
@@ -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
+
+