-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIconIntegrity.client.lua
More file actions
24 lines (20 loc) · 993 Bytes
/
Copy pathIconIntegrity.client.lua
File metadata and controls
24 lines (20 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
local Icons=require(script.Parent.Parent.Services.Icons)
local names=Icons.List()
local seenAssets={}
assert(#names>=100,"Axiom must provide at least 100 official icons")
for index,name in ipairs(names) do
local asset=Icons.Get(name)
assert(type(name)=="string" and name~="","Invalid icon name")
assert(type(asset)=="string" and asset:match("^rbxassetid://%d+$"),"Invalid asset for "..name)
assert(not seenAssets[asset],string.format("Duplicate asset: %s and %s",seenAssets[asset] or "",name))
assert(index==1 or names[index-1]<name,"Icons.List() must be sorted")
seenAssets[asset]=name
end
assert(Icons.Exists("MapPin"))
assert(Icons.Exists("map_pin"))
assert(Icons.Exists("MAP PIN"))
assert(not Icons.Exists("not-a-real-icon"))
assert(Icons.Get("not-a-real-icon")==Icons.Get("info"))
assert(Icons.Get(123)=="rbxassetid://123")
assert(Icons.Get("rbxassetid://123")=="rbxassetid://123")
print(string.format("Axiom icon integrity passed: %d official icons",#names))