summaryrefslogtreecommitdiff
path: root/core/script_language.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/script_language.h')
-rw-r--r--core/script_language.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/core/script_language.h b/core/script_language.h
index 2d86c5166d..b6c2a47245 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -112,7 +112,6 @@ class ScriptInstance;
class PlaceHolderScriptInstance;
class Script : public Resource {
-
GDCLASS(Script, Resource);
OBJ_SAVE_TYPE(Script);
@@ -135,6 +134,8 @@ public:
virtual Ref<Script> get_base_script() const = 0; //for script inheritance
+ virtual bool inherits_script(const Ref<Script> &p_script) const = 0;
+
virtual StringName get_instance_base_type() const = 0; // this may not work in all scripts, will return empty if so
virtual ScriptInstance *instance_create(Object *p_this) = 0;
virtual PlaceHolderScriptInstance *placeholder_instance_create(Object *p_this) { return nullptr; }
@@ -203,8 +204,9 @@ public:
virtual void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount);
virtual void notification(int p_notification) = 0;
virtual String to_string(bool *r_valid) {
- if (r_valid)
+ if (r_valid) {
*r_valid = false;
+ }
return String();
}
@@ -251,14 +253,12 @@ struct ScriptCodeCompletionOption {
KIND_FILE_PATH,
KIND_PLAIN_TEXT,
};
- Kind kind;
+ Kind kind = KIND_PLAIN_TEXT;
String display;
String insert_text;
RES icon;
- ScriptCodeCompletionOption() {
- kind = KIND_PLAIN_TEXT;
- }
+ ScriptCodeCompletionOption() {}
ScriptCodeCompletionOption(const String &p_text, Kind p_kind) {
display = p_text;
@@ -268,7 +268,6 @@ struct ScriptCodeCompletionOption {
};
class ScriptCodeCompletionCache {
-
static ScriptCodeCompletionCache *singleton;
public:
@@ -406,7 +405,6 @@ public:
extern uint8_t script_encryption_key[32];
class PlaceHolderScriptInstance : public ScriptInstance {
-
Object *owner;
List<PropertyInfo> properties;
Map<StringName, Variant> values;