From a19a71adece5693d5ff558a674f024e4c6962225 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Wed, 7 Jun 2023 16:34:53 -0400 Subject: [PATCH] xdecor - fix possible bad array on enchanting code, related to some bugs * update mod to f6d0f0b2a5c1d435217bb3409a76da9eb36fe889 with node info --- mods/README.md | 2 +- mods/xdecor/README.md | 249 +++++++++++++++++++++++++++++++-- mods/xdecor/init.lua | 4 + mods/xdecor/src/enchanting.lua | 5 +- mods/xdecor/src/workbench.lua | 5 +- 5 files changed, 246 insertions(+), 19 deletions(-) diff --git a/mods/README.md b/mods/README.md index d7f4694..f548ef0 100644 --- a/mods/README.md +++ b/mods/README.md @@ -40,7 +40,7 @@ For information check [../README.md](../README.md) | weather | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | | wool | https://codeberg.org/minenux/minetest-mod-wool | https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a | [wool/README.md](wool/README.md) | | xpanes | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | | -| xdecor | https://codeberg.org/minenux/minetest-game-xdecor | https://codeberg.org/minenux/minetest-game-xdecor/commit/542d430537f3537b07bf5c919831160123498a2b | [xdecor/README.md](xdecor/README.md) | +| xdecor | https://codeberg.org/minenux/minetest-game-xdecor | https://codeberg.org/minenux/minetest-game-xdecor/commit/f6d0f0b2a5c1d435217bb3409a76da9eb36fe889 | [xdecor/README.md](xdecor/README.md) | The default mod was splitted now sethome and player_api are mods, binoculars from v5 are just separate privilegies for zoom, butterflies and fireflies from v5 can be set diff --git a/mods/xdecor/README.md b/mods/xdecor/README.md index 3aea3b6..9f076ca 100644 --- a/mods/xdecor/README.md +++ b/mods/xdecor/README.md @@ -1,18 +1,247 @@ -## X-Decor ## +minetest mod XDecor +=================== -[![ContentDB](https://content.minetest.net/packages/jp/xdecor/shields/downloads/)](https://content.minetest.net/packages/jp/xdecor/) +Decoration lightweight alternative to HomeDecor -A decoration mod meant to be simple and well-featured. -It adds a bunch of cute cubes, various mechanisms and stuff for [cutting](https://forum.minetest.net/viewtopic.php?f=11&t=14085), [enchanting](https://forum.minetest.net/viewtopic.php?f=11&t=14087), cooking, etc. -This mod is a lightweight alternative to HomeDecor and MoreBlocks. +Information +----------- -### Requirements ### +This mod add cute cubes to decoration and minimal set of "moreblock" (some elements of picture may not be available) -This mod requires at least version 0.4.16 of Minetest. +![](screenshot.png) + + +Tech information +---------------- + +This mod is forked more reduced version, more focused on speed over media. + +#### Dependencies + +* default +* bucket +* doors +* farming +* stairs +* xpanes + +Optional: + +* fire +* oresplus +* moreblocks +* mesecons + +#### LBM + +| LBM name | node action | notes and observations | +| ------------------------- | ------------------------ | ---------------------- | +| xdecor:create_book_entity | xdecor:enchantment_table | recreate book entity | + +#### Nodes + +| Node name | Observacion and notes | +| ------------------------- | ---------------------- | +| realchess:chessboard | Chess Board, playable | +| xdecor:tv | Television"), | +| xdecor:radio | Radio | +| xdecor:speaker | Speaker | +| xdecor:cauldron_empty | Cauldron | +| xdecor:cauldron_idle | Cauldron (idle) | +| xdecor:cauldron_boiling | Cauldron (active) to put foods inside to make a soup | +| xdecor:cauldron_soup | Cauldron (active) to eat the soup | +| xdecor:hive | Artificial Hive | +| xdecor:itemframe | Item Frame, event huge amoutn only one | +| xdecor:mailbox | Mailbox for little exchange | +| xdecor:pressure_wood_on | Wooden Pressure Plate | +| xdecor:pressure_wood_off | Wooden Pressure Plate (off) | +| xdecor:pressure_stone_on | Stone Pressure Plate | +| xdecor:pressure_stone_off | Stone Pressure Plate (off) | +| xdecor:bamboo_frame | Bamboo Frame | +| xdecor:chainlink | Chainlink | +| xdecor:rusty_bar | Rusty Iron Bars | +| xdecor:baricade | Baricade"), | +| xdecor:barrel | Barrel"), | +| xdecor:cabinet | Wooden Cabinet | +| xdecor:cabinet_half | Half Wooden Cabinet | +| xdecor:empty_shelf | Same as moreblocks:empty_shelf | +| xdecor:multishelf | Multi Shelf | +| xdecor:candle | Candle | +| xdecor:chair | Chair | +| xdecor:cobweb | Cobweb | +| xdecor:cushion | Cushion | +| xdecor:cushion_block | Cushion Block | +| xdecor:enderchest | Ender Chest | +| xdecor:ivy | Ivy | +| xdecor:rooster | Rooster | +| xdecor:lantern | Lantern | +| xdecor:painting_1 | Painting | +| xdecor:stonepath | Garden Stone Path | +| xdecor:cactusbrick | Cactus Brick | +| xdecor:coalstone_tile | Coal Stone Tile | +| xdecor:desertstone_tile | Desert Stone Tile | +| xdecor:hard_clay | Hardened Clay | +| xdecor:moonbrick | Moon Brick | +| xdecor:stone_tile | Stone Tile | +| xdecor:stone_rune | Runestone | +| xdecor:packed_ice | Packed Ice | +| xdecor:wood_tile | Wooden Tile | +| xdecor:table | Table | +| xdecor:tatami | Tatami | +| xdecor:trampoline | Trampoline | +| xdecor:woodframed_glass | Wood Framed Glass | +| xdecor:rope | Rope | +| xdecor:hammer | Hammer, use it on workbench | +| xdecor:workbench | Work Bench, to reapir tools | + +#### Crafts + +realchess:chessboard 1 + +``` + {"dye:black", "dye:white", "dye:black" }, + {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"} +``` + +xdecor:bowl 3 + +``` + {"group:wood", "", "group:wood"}, + {"", "group:wood", "" } +``` + +xdecor:cauldron_empty 1 + +``` + {"default:iron_lump", "", "default:iron_lump"}, + {"default:iron_lump", "", "default:iron_lump"}, + {"default:iron_lump", "default:iron_lump", "default:iron_lump"} +``` + +xdecor:enchantment_table 1 + +``` + {"", "default:book", "" }, + {"default:diamond", "default:obsidian", "default:diamond" }, + {"default:obsidian", "default:obsidian", "default:obsidian"} +``` + +xdecor:hive 1 + +``` + {"group:stick", "group:stick", "group:stick" }, + {"default:paper", "default:paper", "default:paper"}, + {"group:stick", "group:stick", "group:stick" } +``` + +xdecor:itemframe 1 + +``` + {"group:stick", "group:stick", "group:stick"}, + {"group:stick", "default:paper", "group:stick"}, + {"group:stick", "group:stick", "group:stick"} +``` + +xdecor:mailbox 1 + +``` + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"dye:red", "default:paper", "dye:red"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"} +``` + +xdecor:pressure_stone_off + +``` + {"group:stone", "group:stone"} +``` + +xdecor:pressure_wood_off", + +``` + {"group:wood", "group:wood"} +``` + +xdecor:lever_off + +``` + {"group:stick"}, + {"group:stone"} +``` + +xdecor:bamboo_frame + +``` + {"default:papyrus", "default:papyrus", "default:papyrus"}, + {"default:papyrus", "farming:cotton", "default:papyrus"}, + {"default:papyrus", "default:papyrus", "default:papyrus"} +``` + +xdecor:chainlink + +``` + {"default:steel_ingot", "", "default:steel_ingot"}, + {"", "default:steel_ingot", ""}, + {"default:steel_ingot", "", "default:steel_ingot"} +``` + +xdecor:rusty_bar + +``` + {"", "default:dirt", ""}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"} +``` + +xdecor:rope 1 + +``` + {"farming:string"}, + {"farming:string"}, + {"farming:string"} +``` + + + + +xdecor:hammer 1 + +``` + {"default:steel_ingot", "group:stick", "default:steel_ingot"}, + {"", "group:stick", ""} +``` + + +xdecor:workbench 1 + +``` + {"group:wood", "group:wood"}, + {"group:wood", "group:wood"} +``` + +TODO: + + +xdecor:curtain_ + +``` + {"", "wool:xxxx", ""}, + {"", "wool:xxxx", ""} +``` + +xdecor:potted_ + +``` + {"default:clay_brick", "flowers:", "default:clay_brick"}, + {"", "default:clay_brick", ""} +``` ### Credits ### -Special thanks to Gambit for the textures from the PixelBOX pack for Minetest. -Thanks to all contributors who keep this mod alive. +Gambit makes the textures from the PixelBOX pack for Minetest. + +This is a fork from original using ideas from [cutting](https://forum.minetest.net/viewtopic.php?f=11&t=14085), [enchanting](https://forum.minetest.net/viewtopic.php?f=11&t=14087), etc + +[![ContentDB](https://content.minetest.net/packages/jp/xdecor/shields/downloads/)](https://content.minetest.net/packages/jp/xdecor/) + -![Preview](http://i.imgur.com/AVoyCQy.png) diff --git a/mods/xdecor/init.lua b/mods/xdecor/init.lua index 79d63aa..b2c333d 100644 --- a/mods/xdecor/init.lua +++ b/mods/xdecor/init.lua @@ -27,12 +27,16 @@ else end xdecor.S = S +xdecor.reparaible_tools = {"pick", "axe", "shovel", "sword"} dofile(modpath .. "/handlers/animations.lua") dofile(modpath .. "/handlers/helpers.lua") dofile(modpath .. "/handlers/nodeboxes.lua") dofile(modpath .. "/handlers/registration.lua") +if ar_api then xdecor.repairable_tools = {"pick", "axe", "shovel", "sword", "hoe", "armor", "shield"} +else xdecor.repairable_tools = {"pick", "axe", "shovel", "hoe"} end + dofile(modpath .. "/src/nodes.lua") dofile(modpath .. "/src/recipes.lua") diff --git a/mods/xdecor/src/enchanting.lua b/mods/xdecor/src/enchanting.lua index 508d42e..5a76ce8 100644 --- a/mods/xdecor/src/enchanting.lua +++ b/mods/xdecor/src/enchanting.lua @@ -92,10 +92,7 @@ end function enchanting.on_put(pos, listname, _, stack) if listname == "tool" then local stackname = stack:get_name() - local tool_groups = { - "axe, pick, shovel", - "sword", - } + local tool_groups = xdecor.reparaible_tools for idx, tools in ipairs(tool_groups) do if tools:find(stackname:match(":(%w+)")) then diff --git a/mods/xdecor/src/workbench.lua b/mods/xdecor/src/workbench.lua index 09d28de..bc12333 100644 --- a/mods/xdecor/src/workbench.lua +++ b/mods/xdecor/src/workbench.lua @@ -35,10 +35,7 @@ workbench.defs = { {"stair_inner", 1, nil } } -local repairable_tools = {"pick", "axe", "shovel"} - -if ar_api then repairable_tools = {"pick", "axe", "shovel", "sword", "hoe", "armor", "shield"} -else repairable_tools = {"pick", "axe", "shovel", "hoe"} end +local repairable_tools = xdecor.reparaible_tools local custom_repairable = {} function xdecor:register_repairable(item)