summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/include/pluginscript/godot_pluginscript.h1
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp7
-rw-r--r--modules/gdnative/nativescript/nativescript.h3
-rw-r--r--modules/gdnative/pluginscript/pluginscript_language.cpp4
-rw-r--r--modules/gdnative/pluginscript/pluginscript_language.h1
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.cpp5
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.h2
7 files changed, 10 insertions, 13 deletions
diff --git a/modules/gdnative/include/pluginscript/godot_pluginscript.h b/modules/gdnative/include/pluginscript/godot_pluginscript.h
index ec109bac83..d1c210529c 100644
--- a/modules/gdnative/include/pluginscript/godot_pluginscript.h
+++ b/modules/gdnative/include/pluginscript/godot_pluginscript.h
@@ -129,6 +129,7 @@ typedef struct {
const char **comment_delimiters; // NULL terminated array
const char **string_delimiters; // NULL terminated array
godot_bool has_named_classes;
+ godot_bool supports_builtin_mode;
godot_string (*get_template_source_code)(godot_pluginscript_language_data *p_data, const godot_string *p_class_name, const godot_string *p_base_class_name);
godot_bool (*validate)(godot_pluginscript_language_data *p_data, const godot_string *p_script, int *r_line_error, int *r_col_error, godot_string *r_test_error, const godot_string *p_path, godot_pool_string_array *r_functions);
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index aa1fdc32da..c1df7def2e 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -270,10 +270,6 @@ bool NativeScript::is_tool() const {
return false;
}
-String NativeScript::get_node_type() const {
- return ""; // NOTE(karroffel): uhm?
-}
-
ScriptLanguage *NativeScript::get_language() const {
return NativeScriptLanguage::get_singleton();
}
@@ -908,6 +904,9 @@ Script *NativeScriptLanguage::create_script() const {
bool NativeScriptLanguage::has_named_classes() const {
return true;
}
+bool NativeScriptLanguage::supports_builtin_mode() const {
+ return true;
+}
int NativeScriptLanguage::find_function(const String &p_function, const String &p_code) const {
return -1;
}
diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h
index b5db641179..e8fc9e6880 100644
--- a/modules/gdnative/nativescript/nativescript.h
+++ b/modules/gdnative/nativescript/nativescript.h
@@ -142,8 +142,6 @@ public:
virtual bool is_tool() const;
- virtual String get_node_type() const;
-
virtual ScriptLanguage *get_language() const;
virtual bool has_script_signal(const StringName &p_signal) const;
@@ -271,6 +269,7 @@ public:
virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path, List<String> *r_functions) const;
virtual Script *create_script() const;
virtual bool has_named_classes() const;
+ virtual bool supports_builtin_mode() const;
virtual int find_function(const String &p_function, const String &p_code) const;
virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const;
diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp
index d4b86ae5b4..40feb5ae43 100644
--- a/modules/gdnative/pluginscript/pluginscript_language.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_language.cpp
@@ -133,6 +133,10 @@ bool PluginScriptLanguage::has_named_classes() const {
return _desc.has_named_classes;
}
+bool PluginScriptLanguage::supports_builtin_mode() const {
+ return _desc.supports_builtin_mode;
+}
+
int PluginScriptLanguage::find_function(const String &p_function, const String &p_code) const {
if (_desc.find_function) {
return _desc.find_function(_data, (godot_string *)&p_function, (godot_string *)&p_code);
diff --git a/modules/gdnative/pluginscript/pluginscript_language.h b/modules/gdnative/pluginscript/pluginscript_language.h
index a48dde97ce..79b95ff4e6 100644
--- a/modules/gdnative/pluginscript/pluginscript_language.h
+++ b/modules/gdnative/pluginscript/pluginscript_language.h
@@ -77,6 +77,7 @@ public:
virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path = "", List<String> *r_functions = NULL) const;
virtual Script *create_script() const;
virtual bool has_named_classes() const;
+ virtual bool supports_builtin_mode() const;
virtual bool can_inherit_from_file() { return true; }
virtual int find_function(const String &p_function, const String &p_code) const;
virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp
index 7dd10a8bdf..4169b07f63 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_script.cpp
@@ -346,11 +346,6 @@ bool PluginScript::get_property_default_value(const StringName &p_property, Vari
return false;
}
-String PluginScript::get_node_type() const {
- // Even GDscript doesn't know what to put here !
- return ""; // ?
-}
-
ScriptLanguage *PluginScript::get_language() const {
return _language;
}
diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h
index e6b8643cd9..5600bca5ef 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.h
+++ b/modules/gdnative/pluginscript/pluginscript_script.h
@@ -103,8 +103,6 @@ public:
bool is_tool() const { return _tool; }
- virtual String get_node_type() const;
-
virtual ScriptLanguage *get_language() const;
virtual bool has_script_signal(const StringName &p_signal) const;