mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-05 13:53:54 -04:00
parent
dd155588a0
commit
8f57cadce9
4 changed files with 51 additions and 20 deletions
|
@ -19,6 +19,10 @@ function Component.new(name, populate)
|
|||
error("bad argument #1 to 'Component.new' (string expected, got "..type(name)..")", 2)
|
||||
end
|
||||
|
||||
if (string.match(name, Components.__REJECT_MATCH) ~= "") then
|
||||
error("bad argument #1 to 'Component.new' (Component names can't start with '"..Components.__REJECT_PREFIX.."', got "..name..")", 2)
|
||||
end
|
||||
|
||||
if (rawget(Components, name)) then
|
||||
error("bad argument #1 to 'Component.new' (ComponentClass with name '"..name.."' was already registerd)", 2) -- luacheck: ignore
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue