From f2a6b5531a6efeb53f95554909d09777cc90ed34 Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Thu, 10 Oct 2024 09:21:34 -0700 Subject: [PATCH] code documentation tweaks --- worldeditadditions_tools/init.lua | 1 + worldeditadditions_tools/lib/register_tool.lua | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/worldeditadditions_tools/init.lua b/worldeditadditions_tools/init.lua index 7c50cc2..876a863 100644 --- a/worldeditadditions_tools/init.lua +++ b/worldeditadditions_tools/init.lua @@ -1,3 +1,4 @@ +---@diagnostic disable-next-line: lowercase-global worldeditadditions_tools = { player_data = {}, registered_tools = {}, diff --git a/worldeditadditions_tools/lib/register_tool.lua b/worldeditadditions_tools/lib/register_tool.lua index 2182ea4..5ce61c9 100644 --- a/worldeditadditions_tools/lib/register_tool.lua +++ b/worldeditadditions_tools/lib/register_tool.lua @@ -27,7 +27,13 @@ end --- Registers a new WorldEditAdditions tool. --- @param tool string The name of the tool to register. +-- @param tool string The name of the tool to register (sans the ":worldeditadditions:" prefix). +--[[ + === WARNING === + ":worldeditadditions:" will be prepended to the `tool` param so + calling `register_tool(":worldeditadditions:", def_table)` + may cause errors. +--]] -- @param options table A table of options for the tool: -- - `description` (string) A description of the tool. -- - `inventory_image` (string) The path to the image for the tool.