Add trust check, disable model if untrusted
This commit is contained in:
parent
f109c763c1
commit
7f64ee43c9
12
script.lua
12
script.lua
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user