This commit is contained in:
lifestorm
2024-08-04 23:54:45 +03:00
parent 0e770b2b49
commit df294d03aa
7526 changed files with 4011945 additions and 15 deletions

View File

@@ -0,0 +1,54 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
Schema.voices = {}
Schema.voices.stored = {}
Schema.voices.classes = {}
function Schema.voices.Add(class, key, text, sound, global)
class = string.utf8lower(class)
key = string.utf8lower(key)
Schema.voices.stored[class] = Schema.voices.stored[class] or {}
Schema.voices.stored[class][key] = {
text = text,
sound = sound,
global = global
}
end
function Schema.voices.Get(class, key)
class = string.utf8lower(class)
key = string.utf8lower(key)
if (Schema.voices.stored[class]) then
return Schema.voices.stored[class][key]
end
end
function Schema.voices.AddClass(class, condition)
class = string.utf8lower(class)
Schema.voices.classes[class] = {
condition = condition
}
end
function Schema.voices.GetClass(client)
local classes = {}
for k, v in pairs(Schema.voices.classes) do
if (v.condition(client)) then
classes[#classes + 1] = k
end
end
return classes
end