[Cleanup] Cleanup Object Type Code (#4375)

* [Cleanup] Cleanup Object Type Code

* Move to object.cpp/object.h
This commit is contained in:
Alex King
2024-06-14 12:58:59 -04:00
committed by GitHub
parent 9cebba5911
commit 0b2493beb8
8 changed files with 211 additions and 147 deletions
+10
View File
@@ -1293,3 +1293,13 @@ void Object::FixZ()
}
}
}
std::string ObjectType::GetName(uint32 object_type)
{
return IsValid(object_type) ? object_types[object_type] : "UNKNOWN OBJECT TYPE";
}
bool ObjectType::IsValid(uint32 object_type)
{
return object_types.find(object_type) != object_types.end();
}