Browse Source

Adds convenience command parameters show (list) and rm (del)

main
chksm 2 years ago
parent
commit
7cc948c1c2
  1. 4
      script/commands.lua

4
script/commands.lua

@ -21,7 +21,7 @@ commands.add_command("stat", "Used to control metrics in Statorio mod\n[add|list
argsArr = split(param.parameter, " ")
if argsArr[1] == "list" then
if argsArr[1] == "list" or argsArr[1] == "show" then
if table_size(global.statorio.metrics) > 0 then
for index, val in pairs(global.statorio.metrics) do
@ -41,7 +41,7 @@ commands.add_command("stat", "Used to control metrics in Statorio mod\n[add|list
table.insert(global.statorio.metrics, argsArr[2])
player.print("Added metric ["..table_size(global.statorio.metrics).."]")
elseif argsArr[1] == "del" then
elseif argsArr[1] == "del" or argsArr[1] == "rm" then
if not argsArr[2] then
player.print("Deleting requires the index number of a metric from the list command")

Loading…
Cancel
Save