~fgaz/minetest-declarative_chatcmd

9372065c305bcba5999ed1d63ae41b0b55f49dee — Francesco Gazzetta 2 years ago 266cc15
More arg.type string defaulting
1 files changed, 2 insertions(+), 2 deletions(-)

M src/help.lua
M src/help.lua => src/help.lua +2 -2
@@ 5,11 5,11 @@ local utils = dofile(minetest.get_modpath(modname) .. "/src/utils.lua")

local function make_arg_string(i, arg)
  local arg_name = arg.name or "arg" .. i
  return "<" .. arg_name .. ":" .. arg.type .. ">"
  return "<" .. arg_name .. ":" .. (arg.type or "string") .. ">"
end

local function make_named_arg_string(arg_name, arg)
  return "[" .. arg_name .. "=" .. arg.type .. "]"
  return "[" .. arg_name .. "=" .. (arg.type or "string") .. "]"
end

function help.make_params_string(spec)