-changed assertion infos
This commit is contained in:
parent
71c7df2ab3
commit
b0760228b1
1 changed files with 5 additions and 5 deletions
|
|
@ -673,31 +673,31 @@ class EntityManager
|
||||||
foreach (iii, name; componentsInfo.req)
|
foreach (iii, name; componentsInfo.req)
|
||||||
{
|
{
|
||||||
ushort comp = components_map.get(cast(char[]) name, ushort.max);
|
ushort comp = components_map.get(cast(char[]) name, ushort.max);
|
||||||
assert(comp != ushort.max, "Can not register system: component not present");
|
assert(comp != ushort.max, "Can't register system \""~Sys.stringof~"\" due to non existing component \""~name~"\".");
|
||||||
system.m_components[iii] = comp;
|
system.m_components[iii] = comp;
|
||||||
}
|
}
|
||||||
foreach (iii, name; componentsInfo.excluded)
|
foreach (iii, name; componentsInfo.excluded)
|
||||||
{
|
{
|
||||||
ushort comp = components_map.get(cast(char[]) name, ushort.max);
|
ushort comp = components_map.get(cast(char[]) name, ushort.max);
|
||||||
assert(comp != ushort.max, "Can not register system: component not present");
|
assert(comp != ushort.max, "Can't register system \""~Sys.stringof~"\" due to non existing component \""~name~"\".");
|
||||||
system.m_excluded_components[iii] = comp;
|
system.m_excluded_components[iii] = comp;
|
||||||
}
|
}
|
||||||
foreach (iii, name; componentsInfo.optional)
|
foreach (iii, name; componentsInfo.optional)
|
||||||
{
|
{
|
||||||
ushort comp = components_map.get(cast(char[]) name, ushort.max);
|
ushort comp = components_map.get(cast(char[]) name, ushort.max);
|
||||||
assert(comp != ushort.max, "Can not register system: component not present");
|
assert(comp != ushort.max, "Can't register system \""~Sys.stringof~"\" due to non existing component \""~name~"\".");
|
||||||
system.m_optional_components[iii] = comp;
|
system.m_optional_components[iii] = comp;
|
||||||
}
|
}
|
||||||
foreach (iii, name; componentsInfo.readonly)
|
foreach (iii, name; componentsInfo.readonly)
|
||||||
{
|
{
|
||||||
ushort comp = components_map.get(cast(char[]) name, ushort.max);
|
ushort comp = components_map.get(cast(char[]) name, ushort.max);
|
||||||
assert(comp != ushort.max, "Can not register system: component not present");
|
assert(comp != ushort.max, "Can't register system \""~Sys.stringof~"\" due to non existing component \""~name~"\".");
|
||||||
system.m_read_only_components[iii] = comp;
|
system.m_read_only_components[iii] = comp;
|
||||||
}
|
}
|
||||||
foreach (iii, name; componentsInfo.mutable)
|
foreach (iii, name; componentsInfo.mutable)
|
||||||
{
|
{
|
||||||
ushort comp = components_map.get(cast(char[]) name, ushort.max);
|
ushort comp = components_map.get(cast(char[]) name, ushort.max);
|
||||||
assert(comp != ushort.max, "Can not register system: component not present");
|
assert(comp != ushort.max, "Can't register system \""~Sys.stringof~"\" due to non existing component \""~name~"\".");
|
||||||
system.m_modified_components[iii] = comp;
|
system.m_modified_components[iii] = comp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue