1
This commit is contained in:
commit
a85391509d
211 files changed
+28903
No files matched your search
@@ -0,0 +1,28 @@
|
||||
--!strict
|
||||
local entries = table.freeze({
|
||||
table.freeze({ id = "BlueFlame", name = "Голубое пламя", accent = Color3.fromRGB(100, 223, 255) }),
|
||||
table.freeze({ id = "ThunderBlade", name = "Грозовой клинок", accent = Color3.fromRGB(193, 142, 255) }),
|
||||
table.freeze({ id = "CrimsonSeal", name = "Алая печать", accent = Color3.fromRGB(255, 113, 81) }),
|
||||
table.freeze({ id = "Sakura", name = "Сакура", accent = Color3.fromRGB(255, 161, 209) }),
|
||||
table.freeze({ id = "NeonGlitch", name = "Неоновый сбой", accent = Color3.fromRGB(138, 255, 80) }),
|
||||
table.freeze({ id = "LunarOrbit", name = "Лунная орбита", accent = Color3.fromRGB(255, 210, 120) }),
|
||||
})
|
||||
|
||||
local Catalog = {}
|
||||
|
||||
local function indexOf(id: unknown): number
|
||||
for index, entry in entries do
|
||||
if id == entry.id then return index end
|
||||
end
|
||||
return 1
|
||||
end
|
||||
|
||||
function Catalog.get(id: unknown)
|
||||
return entries[indexOf(id)]
|
||||
end
|
||||
|
||||
function Catalog.next(id: unknown)
|
||||
return entries[indexOf(id) % #entries + 1]
|
||||
end
|
||||
|
||||
return table.freeze(Catalog)
|
||||
Reference in new issue
Block a user