ScriptEngine refactoring

This commit is contained in:
Simon Lübeß
2024-03-31 12:36:22 +02:00
parent abcacc84a9
commit 777f52ab49
4 changed files with 13 additions and 48 deletions
+4 -2
View File
@@ -146,14 +146,16 @@ internal class EntityEditor
return false;
}
public static void ShowDefaultEntityEditor(UUID entityId, Type entityType)
public static void ShowDefaultEntityEditor(UUID entityId)
{
// TODO: Call custom editors here!
ScriptGlue.Entity_GetScriptInstance(entityId, out object? instance);
if (instance != null)
ShowEditor(entityType, instance);
{
ShowEditor(instance.GetType(), instance);
}
}
private static T? GetAttribute<T>(IEnumerable<Attribute>? attributes) where T : Attribute