Use splitstring for command handling
This commit is contained in:
parent
cf2a52eb8b
commit
9788f8d231
@ -216,21 +216,22 @@ end
|
|||||||
chat_prefix="./"
|
chat_prefix="./"
|
||||||
chat.setFiguraCommandPrefix(chat_prefix)
|
chat.setFiguraCommandPrefix(chat_prefix)
|
||||||
function onCommand(input)
|
function onCommand(input)
|
||||||
if input == chat_prefix .. "vanilla" then
|
input=splitstring(input)
|
||||||
|
if input[1] == chat_prefix .. "vanilla" then
|
||||||
ping.setVanilla()
|
ping.setVanilla()
|
||||||
print("Toggled vanilla skin")
|
print("Toggled vanilla skin")
|
||||||
end
|
end
|
||||||
if input == chat_prefix .. "toggle_custom" then
|
if input[1] == chat_prefix .. "toggle_custom" then
|
||||||
for key, value in pairs(model) do
|
for key, value in pairs(model) do
|
||||||
value.setEnabled(not value.getEnabled())
|
value.setEnabled(not value.getEnabled())
|
||||||
end
|
end
|
||||||
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
|
for k, v in pairs(VANILLA_OUTER) do
|
||||||
v.setEnabled(not v.getEnabled())
|
v.setEnabled(not v.getEnabled())
|
||||||
end
|
end
|
||||||
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
|
for k, v in pairs(VANILLA_INNER) do
|
||||||
v.setEnabled(not v.getEnabled())
|
v.setEnabled(not v.getEnabled())
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user