This repository has been archived on 2025-12-11. You can view files and clone it, but cannot push or open issues or pull requests.

43 lines
1.3 KiB
Lua
Raw Normal View History

2025-02-02 10:40:42 +01:00
exports('GetTunerMethLabObject', function()
return TunerMethLab
end)
TunerMethLab = {
InteriorId = 284673,
Entities = {
tintable_walls = true,
Set = function(name, state)
for entity, _ in pairs(TunerMethLab.Entities) do
if entity == name then
TunerMethLab.Entities[entity] = state
TunerMethLab.Entities.Clear()
TunerMethLab.Entities.Load()
end
end
end,
Load = function()
for entity, state in pairs(TunerMethLab.Entities) do
if type(entity) == 'string' and state then
ActivateInteriorEntitySet(TunerMethLab.InteriorId, entity)
end
end
end,
Clear = function()
for entity, _ in pairs(TunerMethLab.Entities) do
if type(entity) == 'string' then
DeactivateInteriorEntitySet(TunerMethLab.InteriorId, entity)
end
end
end
},
LoadDefault = function()
TunerMethLab.Entities.Load()
SetInteriorEntitySetColor(TunerMethLab.interiorId, TunerMethLab.Entities.tintable_walls, 3)
RefreshInterior(TunerMethLab.interiorId)
end
}