diff --git a/README.md b/README.md index 113314c..c914484 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,8 @@ Maintenance updates: * Translation updates * Add support for playerphysics mod * Add description to every setting +* Add tooltip extensions for some interactive items (uses `tt` mod) +* Add crafting guide support for `unified_inventory` mod (honey) #### List of replaced files diff --git a/mod.conf b/mod.conf index 22fd86d..6f0ba15 100644 --- a/mod.conf +++ b/mod.conf @@ -2,5 +2,5 @@ name = xdecor title = X-Decor-libre description = A decoration mod meant to be simple and well-featured (libre version). depends = default, bucket, doors, farming, stairs, xpanes -optional_depends = playerphysics, player_api, fire, moreblocks, mesecons, unified_inventory +optional_depends = playerphysics, player_api, fire, moreblocks, mesecons, unified_inventory, tt min_minetest_version = 5.7.0 diff --git a/src/chess.lua b/src/chess.lua index 360d2eb..39f8394 100644 --- a/src/chess.lua +++ b/src/chess.lua @@ -1459,6 +1459,7 @@ local chessboarddef = { } if ENABLE_CHESS_GAMES then -- Extend chess board node definition if chess games are enabled + chessboarddef._tt_help = S("Play a game of Chess against another player or the computer") chessboarddef.on_blast = realchess.blast chessboarddef.can_dig = realchess.dig chessboarddef.on_construct = realchess.init diff --git a/src/cooking.lua b/src/cooking.lua index 395ec91..985956c 100644 --- a/src/cooking.lua +++ b/src/cooking.lua @@ -243,6 +243,7 @@ end xdecor.register("cauldron_empty", { description = S("Cauldron"), + _tt_help = S("For storing water and cooking soup"), groups = {cracky=2, oddly_breakable_by_hand=1,cauldron=1}, on_rotate = screwdriver.rotate_simple, tiles = {"xdecor_cauldron_top_empty.png", "xdecor_cauldron_sides.png"}, diff --git a/src/enchanting.lua b/src/enchanting.lua index b407033..881b654 100644 --- a/src/enchanting.lua +++ b/src/enchanting.lua @@ -222,6 +222,7 @@ end xdecor.register("enchantment_table", { description = S("Enchantment Table"), + _tt_help = S("Enchant your tools with mese crystals"), tiles = { "xdecor_enchantment_top.png", "xdecor_enchantment_bottom.png", "xdecor_enchantment_side.png", "xdecor_enchantment_side.png", diff --git a/src/hive.lua b/src/hive.lua index 8abaf19..bbf4fcc 100644 --- a/src/hive.lua +++ b/src/hive.lua @@ -121,6 +121,7 @@ end xdecor.register("hive", { description = S("Artificial Hive"), + _tt_help = S("Bees live here and produce honey"), tiles = {"xdecor_hive_top.png", "xdecor_hive_top.png", "xdecor_hive_side.png", "xdecor_hive_side.png", "xdecor_hive_side.png", "xdecor_hive_front.png"}, diff --git a/src/itemframe.lua b/src/itemframe.lua index d2d8f55..6a68db2 100644 --- a/src/itemframe.lua +++ b/src/itemframe.lua @@ -158,6 +158,7 @@ end xdecor.register("itemframe", { description = S("Item Frame"), + _tt_help = S("For presenting a single item"), groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, sounds = default.node_sound_wood_defaults(), on_rotate = screwdriver.disallow, diff --git a/src/mailbox.lua b/src/mailbox.lua index 5dc0856..c3ef1dc 100644 --- a/src/mailbox.lua +++ b/src/mailbox.lua @@ -180,6 +180,7 @@ end xdecor.register("mailbox", { description = S("Mailbox"), + _tt_help = S("Lets other players give you things"), tiles = {"xdecor_mailbox_top.png", "xdecor_mailbox_bottom.png", "xdecor_mailbox_side.png", "xdecor_mailbox_side.png", "xdecor_mailbox.png", "xdecor_mailbox.png"}, diff --git a/src/mechanisms.lua b/src/mechanisms.lua index 7d3202e..7c7a3b4 100644 --- a/src/mechanisms.lua +++ b/src/mechanisms.lua @@ -57,6 +57,7 @@ end function plate.register(material, desc, def) xdecor.register("pressure_" .. material .. "_off", { description = def.description or (desc .. " Pressure Plate"), + _tt_help = S("Opens doors when stepped on"), tiles = {"xdecor_pressure_" .. material .. ".png"}, use_texture_alpha = ALPHA_OPAQUE, drawtype = "nodebox", @@ -95,6 +96,7 @@ plate.register("stone", "Stone", { xdecor.register("lever_off", { description = S("Lever"), + _tt_help = S("Opens doors when pulled"), tiles = {"xdecor_lever_off.png"}, use_texture_alpha = ALPHA_OPAQUE, drawtype = "nodebox", diff --git a/src/nodes.lua b/src/nodes.lua index 8fc53d3..2c95177 100644 --- a/src/nodes.lua +++ b/src/nodes.lua @@ -89,6 +89,7 @@ end local function register_storage(name, desc, def) xdecor.register(name, { description = desc, + _tt_help = def._tt_help, inventory = {size = def.inv_size or 24}, infotext = desc, tiles = def.tiles, @@ -103,6 +104,7 @@ local function register_storage(name, desc, def) end register_storage("cabinet", S("Wooden Cabinet"), { + _tt_help = S("24 inventory slots"), on_rotate = screwdriver.rotate_simple, tiles = { "xdecor_cabinet_sides.png", "xdecor_cabinet_sides.png", @@ -113,6 +115,7 @@ register_storage("cabinet", S("Wooden Cabinet"), { register_storage("cabinet_half", S("Half Wooden Cabinet"), { inv_size = 8, + _tt_help = S("8 inventory slots"), node_box = xdecor.nodebox.slab_y(0.5, 0.5), on_rotate = screwdriver.rotate_simple, tiles = { @@ -128,6 +131,7 @@ else -- Node renamed from "Empty Shelf" because it was misleading. -- (you can still put things in it, making it non-empty) register_storage("empty_shelf", S("Plain Shelf"), { + _tt_help = S("24 inventory slots"), on_rotate = screwdriver.rotate_simple, tiles = { "default_wood.png", "default_wood.png", "default_wood.png", @@ -149,6 +153,7 @@ else end register_storage("multishelf", S("Multi Shelf"), { + _tt_help = S("24 inventory slots"), on_rotate = screwdriver.rotate_simple, tiles = { "default_wood.png", "default_wood.png", "default_wood.png", @@ -409,6 +414,7 @@ end xdecor.register("enderchest", { description = S("Ender Chest"), + _tt_help = S("Interdimensional inventory"), tiles = { "xdecor_enderchest_top.png", "xdecor_enderchest_top.png", "xdecor_enderchest_side.png", "xdecor_enderchest_side.png", diff --git a/src/workbench.lua b/src/workbench.lua index e7126a7..bc4bf5c 100644 --- a/src/workbench.lua +++ b/src/workbench.lua @@ -254,6 +254,7 @@ end xdecor.register("workbench", { description = S("Work Bench"), + _tt_help = S("For cutting blocks, repairing tools with a hammer, crafting and storing items"), groups = {cracky = 2, choppy = 2, oddly_breakable_by_hand = 1}, sounds = default.node_sound_wood_defaults(), tiles = {