summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/global_constants.cpp10
-rw-r--r--core/method_bind.h1
-rw-r--r--modules/gdscript/gd_script.cpp1
3 files changed, 12 insertions, 0 deletions
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index 92e50a8b96..89d918fed9 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -476,6 +476,16 @@ static _GlobalConstant _global_constants[]={
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_EDITOR ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_NETWORK ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_DEFAULT ),
+
+ BIND_GLOBAL_CONSTANT( METHOD_FLAG_NORMAL ),
+ BIND_GLOBAL_CONSTANT( METHOD_FLAG_EDITOR ),
+ BIND_GLOBAL_CONSTANT( METHOD_FLAG_NOSCRIPT ),
+ BIND_GLOBAL_CONSTANT( METHOD_FLAG_CONST ),
+ BIND_GLOBAL_CONSTANT( METHOD_FLAG_REVERSE ),
+ BIND_GLOBAL_CONSTANT( METHOD_FLAG_VIRTUAL ),
+ BIND_GLOBAL_CONSTANT( METHOD_FLAG_FROM_SCRIPT ),
+ BIND_GLOBAL_CONSTANT( METHOD_FLAGS_DEFAULT ),
+
{"TYPE_NIL",Variant::NIL},
{"TYPE_BOOL",Variant::BOOL},
{"TYPE_INT",Variant::INT},
diff --git a/core/method_bind.h b/core/method_bind.h
index 4c2598e50c..da3d7c1062 100644
--- a/core/method_bind.h
+++ b/core/method_bind.h
@@ -50,6 +50,7 @@ enum MethodFlags {
METHOD_FLAG_CONST=8,
METHOD_FLAG_REVERSE=16, // used for events
METHOD_FLAG_VIRTUAL=32,
+ METHOD_FLAG_FROM_SCRIPT=64,
METHOD_FLAGS_DEFAULT=METHOD_FLAG_NORMAL,
};
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp
index 62c5eb735a..8f48a3d6a7 100644
--- a/modules/gdscript/gd_script.cpp
+++ b/modules/gdscript/gd_script.cpp
@@ -2456,6 +2456,7 @@ void GDInstance::get_method_list(List<MethodInfo> *p_list) const {
MethodInfo mi;
mi.name=E->key();
+ mi.flags|=METHOD_FLAG_FROM_SCRIPT;
for(int i=0;i<E->get().get_argument_count();i++)
mi.arguments.push_back(PropertyInfo(Variant::NIL,"arg"+itos(i)));
p_list->push_back(mi);