Merge branch 'feature/trust_check' into master
This commit is contained in:
commit
9bf55c0835
61
script.lua
61
script.lua
@ -1,4 +1,5 @@
|
|||||||
-- vim: set foldmethod=marker :
|
-- vim: set foldmethod=marker :
|
||||||
|
--- Initial definitions ---
|
||||||
-- Texture dimensions --
|
-- Texture dimensions --
|
||||||
TEXTURE_WIDTH = 128
|
TEXTURE_WIDTH = 128
|
||||||
TEXTURE_HEIGHT = 128
|
TEXTURE_HEIGHT = 128
|
||||||
@ -10,6 +11,7 @@ step_v_face=16
|
|||||||
offset_u_face=64
|
offset_u_face=64
|
||||||
offset_v_face=0
|
offset_v_face=0
|
||||||
armor_enabled=true
|
armor_enabled=true
|
||||||
|
vanilla_enabled=true
|
||||||
|
|
||||||
-- utility functions -- {{{
|
-- utility functions -- {{{
|
||||||
--- dump table --
|
--- dump table --
|
||||||
@ -35,12 +37,15 @@ end
|
|||||||
|
|
||||||
-- Parts --
|
-- Parts --
|
||||||
HEAD=model.Head.Head
|
HEAD=model.Head.Head
|
||||||
|
VANILLA_OUTER={ vanilla_model.HAT, vanilla_model.JACKET, vanilla_model.LEFT_SLEEVE, vanilla_model.RIGHT_SLEEVE, vanilla_model.LEFT_PANTS_LEG, vanilla_model.RIGHT_PANTS_LEG }
|
||||||
-- Initial configuration --
|
VANILLA_INNER={
|
||||||
for key, value in pairs(vanilla_model) do
|
vanilla_model.HEAD,
|
||||||
value.setEnabled(false)
|
vanilla_model.TORSO,
|
||||||
end
|
vanilla_model.LEFT_ARM,
|
||||||
vanilla_model.CAPE.setEnabled(true)
|
vanilla_model.RIGHT_ARM,
|
||||||
|
vanilla_model.LEFT_LEG,
|
||||||
|
vanilla_model.RIGHT_LEG
|
||||||
|
}
|
||||||
|
|
||||||
-- Expression change -- {{{
|
-- Expression change -- {{{
|
||||||
function getExprUV(damage, expression)
|
function getExprUV(damage, expression)
|
||||||
@ -72,6 +77,16 @@ function resetExpression()
|
|||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
function setVanilla(state)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Initial configuration --
|
||||||
|
for key, value in pairs(vanilla_model) do
|
||||||
|
value.setEnabled(false)
|
||||||
|
end
|
||||||
|
vanilla_model.CAPE.setEnabled(true)
|
||||||
|
|
||||||
-- Action Wheel & Pings -- {{{
|
-- Action Wheel & Pings -- {{{
|
||||||
action_wheel.SLOT_1.setTitle('test expression')
|
action_wheel.SLOT_1.setTitle('test expression')
|
||||||
action_wheel.SLOT_1.setFunction(function() ping.expressionTest() end)
|
action_wheel.SLOT_1.setFunction(function() ping.expressionTest() end)
|
||||||
@ -110,6 +125,15 @@ function ping.setArmor(enabled)
|
|||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
--- Toggle Vanilla ---
|
||||||
|
function ping.setVanilla(state)
|
||||||
|
if state == nil then
|
||||||
|
vanilla_enabled=not vanilla_enabled
|
||||||
|
else
|
||||||
|
vanilla_enabled=state
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Timer (not mine lol) -- {{{
|
-- Timer (not mine lol) -- {{{
|
||||||
do
|
do
|
||||||
local timers = {}
|
local timers = {}
|
||||||
@ -169,3 +193,28 @@ function tick()
|
|||||||
old_health=player.getHealth()
|
old_health=player.getHealth()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Enable commands --
|
||||||
|
chat_prefix="./"
|
||||||
|
chat.setFiguraCommandPrefix(chat_prefix)
|
||||||
|
function onCommand(input)
|
||||||
|
if input == chat_prefix .. "vanilla" then
|
||||||
|
ping.setVanilla()
|
||||||
|
print("Toggled vanilla skin")
|
||||||
|
end
|
||||||
|
if input == 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
|
||||||
|
for k, v in pairs(VANILLA_OUTER) do
|
||||||
|
v.setEnabled(not v.getEnabled())
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if input == chat_prefix .. "toggle_inner" then
|
||||||
|
for k, v in pairs(VANILLA_INNER) do
|
||||||
|
v.setEnabled(not v.getEnabled())
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user