mirror of
https://github.com/lune-org/lune.git
synced 2024-12-13 21:40:40 +00:00
18 lines
638 B
Text
18 lines
638 B
Text
|
local roblox = require("@lune/roblox")
|
||
|
|
||
|
local db = roblox.getReflectionDatabase()
|
||
|
|
||
|
-- Make sure database class properties exist + their fields / properties are correct types
|
||
|
|
||
|
for _, className in db:GetClassNames() do
|
||
|
local class = db:GetClass(className)
|
||
|
assert(class ~= nil)
|
||
|
|
||
|
for name, prop in class.Properties do
|
||
|
assert(type(prop.Name) == "string", "Name property must be a string")
|
||
|
assert(type(prop.Datatype) == "string", "Datatype property must be a string")
|
||
|
assert(type(prop.Scriptability) == "string", "Scriptability property must be a string")
|
||
|
assert(type(prop.Tags) == "table", "Tags property must be a table")
|
||
|
end
|
||
|
end
|