Add trust check, disable model if untrusted

This commit is contained in:
NullBite 2022-03-19 01:04:39 -04:00
parent f109c763c1
commit 7f64ee43c9
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -6,7 +6,7 @@ TEXTURE_HEIGHT = 128
-- local state variables (do not access within pings) -- -- local state variables (do not access within pings) --
armor_enabled=true armor_enabled=true
vanilla_enabled=true vanilla_enabled=false
-- utility functions -- {{{ -- utility functions -- {{{
--- dump table -- --- dump table --
@ -205,8 +205,14 @@ function player_init()
old_health=player.getHealth() old_health=player.getHealth()
end end
-- Initial configuration -- -- Initial configuration --
for key, value in pairs(vanilla_model) do if meta.getCanModifyVanilla() then
value.setEnabled(false) for key, value in pairs(vanilla_model) do
value.setEnabled(false)
end
else
for _, v in pairs(model) do
v.setEnabled(false)
end
end end
vanilla_model.CAPE.setEnabled(true) vanilla_model.CAPE.setEnabled(true)