Remove Engine::custom_types.

This commit is contained in:
Stephen Chung
2022-03-29 08:18:20 +08:00
parent 2b9b84a764
commit 1b6de25007
6 changed files with 35 additions and 15 deletions

View File

@@ -421,6 +421,15 @@ impl Module {
pub fn set_custom_type<T>(&mut self, name: &str) {
self.custom_types.add_type::<T>(name)
}
/// Map a custom type to a friendly display name.
#[inline(always)]
pub fn set_custom_type_raw(
&mut self,
type_name: impl Into<Identifier>,
name: impl Into<Identifier>,
) {
self.custom_types.add(type_name, name)
}
/// Get the display name of a registered custom type.
#[inline(always)]
pub fn get_custom_type(&self, key: &str) -> Option<&str> {