ScriptActorInterfaces, unbind on actor destroy.
This commit is contained in:
committed by
Matthias Mailänder
parent
fc1d8d2355
commit
215898c7ec
@@ -126,20 +126,19 @@ namespace OpenRA.Scripting
|
||||
{
|
||||
// Only expose defined public non-static methods that were explicitly declared by the author
|
||||
var flags = BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly;
|
||||
return t.GetMembers(flags).Where(mi =>
|
||||
foreach (var mi in t.GetMembers(flags))
|
||||
{
|
||||
// Properties are always wrappable
|
||||
if (mi is PropertyInfo)
|
||||
return true;
|
||||
yield return mi;
|
||||
|
||||
// Methods are allowed if they aren't generic, and aren't generated by the compiler
|
||||
var method = mi as MethodInfo;
|
||||
if (method != null && !method.IsGenericMethodDefinition && !method.IsSpecialName)
|
||||
return true;
|
||||
yield return mi;
|
||||
|
||||
// Fields aren't allowed
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static string[] RequiredTraitNames(Type t)
|
||||
|
||||
Reference in New Issue
Block a user