From 9788f8d231368bac8c2dae36d2b49fa26f90ae16 Mon Sep 17 00:00:00 2001 From: NullBite <me@nullbite.com> Date: Wed, 16 Mar 2022 20:09:56 -0400 Subject: [PATCH] Use splitstring for command handling --- script.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/script.lua b/script.lua index 858eab2..3cafc58 100644 --- a/script.lua +++ b/script.lua @@ -216,21 +216,22 @@ end chat_prefix="./" chat.setFiguraCommandPrefix(chat_prefix) function onCommand(input) - if input == chat_prefix .. "vanilla" then + input=splitstring(input) + if input[1] == chat_prefix .. "vanilla" then ping.setVanilla() print("Toggled vanilla skin") end - if input == chat_prefix .. "toggle_custom" then + if input[1] == chat_prefix .. "toggle_custom" then for key, value in pairs(model) do value.setEnabled(not value.getEnabled()) end end - if input == chat_prefix .. "toggle_outer" then + if input[1] == chat_prefix .. "toggle_outer" then for k, v in pairs(VANILLA_OUTER) do v.setEnabled(not v.getEnabled()) end end - if input == chat_prefix .. "toggle_inner" then + if input[1] == chat_prefix .. "toggle_inner" then for k, v in pairs(VANILLA_INNER) do v.setEnabled(not v.getEnabled()) end