summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-06-30 19:58:37 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-06-30 19:59:16 -0300
commitb3627e29f0bbb67813fe518ad55e9509b4752e6c (patch)
tree363792aa0155d5ebb1851e924c78583e365a4b4e /core
parent3852c5f8a0b439a8c0c6e72433d6fe82e3e596de (diff)
-Fixes to OBJ importer, option to disable optimization
-Fixes to script language, PlaceHolder can now get and check methods
Diffstat (limited to 'core')
-rw-r--r--core/script_language.cpp14
-rw-r--r--core/script_language.h4
2 files changed, 16 insertions, 2 deletions
diff --git a/core/script_language.cpp b/core/script_language.cpp
index 1dab58e29e..acbe3b34db 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -347,6 +347,20 @@ Variant::Type PlaceHolderScriptInstance::get_property_type(const StringName &p_n
return Variant::NIL;
}
+void PlaceHolderScriptInstance::get_method_list(List<MethodInfo> *p_list) const {
+
+ if (script.is_valid()) {
+ script->get_script_method_list(p_list);
+ }
+}
+bool PlaceHolderScriptInstance::has_method(const StringName &p_method) const {
+
+ if (script.is_valid()) {
+ return script->has_method(p_method);
+ }
+ return false;
+}
+
void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, const Map<StringName, Variant> &p_values) {
Set<StringName> new_values;
diff --git a/core/script_language.h b/core/script_language.h
index ad66fc5528..e7748f93e2 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -304,8 +304,8 @@ public:
virtual void get_property_list(List<PropertyInfo> *p_properties) const;
virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid = NULL) const;
- virtual void get_method_list(List<MethodInfo> *p_list) const {}
- virtual bool has_method(const StringName &p_method) const { return false; }
+ virtual void get_method_list(List<MethodInfo> *p_list) const;
+ virtual bool has_method(const StringName &p_method) const;
virtual Variant call(const StringName &p_method, VARIANT_ARG_LIST) { return Variant(); }
virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;