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.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/core/script_language.h b/core/script_language.h
index 7e278b8555..1be1aabdab 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -40,15 +40,15 @@ class ScriptLanguage;
class ScriptServer {
enum {
-
+
MAX_LANGUAGES=4
};
-
+
static ScriptLanguage *_languages[MAX_LANGUAGES];
static int _language_count;
static bool scripting_enabled;
-public:
-
+public:
+
static void set_scripting_enabled(bool p_enabled);
static bool is_scripting_enabled();
static int get_language_count();
@@ -76,14 +76,14 @@ protected:
friend class PlaceHolderScriptInstance;
virtual void _placeholder_erased(PlaceHolderScriptInstance *p_placeholder) {}
public:
-
+
virtual bool can_instance() 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 bool instance_has(const Object *p_this) const=0;
-
+
virtual bool has_source_code() const=0;
virtual String get_source_code() const=0;
virtual void set_source_code(const String& p_code)=0;
@@ -102,7 +102,7 @@ public:
virtual void update_exports() {} //editor tool
-
+
Script() {}
};
@@ -148,13 +148,13 @@ class ScriptLanguage {
public:
virtual String get_name() const=0;
-
+
/* LANGUAGE FUNCTIONS */
- virtual void init()=0;
+ virtual void init()=0;
virtual String get_type() const=0;
virtual String get_extension() const=0;
- virtual Error execute_file(const String& p_path) =0;
- virtual void finish()=0;
+ virtual Error execute_file(const String& p_path) =0;
+ virtual void finish()=0;
/* EDITOR FUNCTIONS */
virtual void get_reserved_words(List<String> *p_words) const=0;
@@ -197,7 +197,7 @@ public:
virtual void frame();
- virtual ~ScriptLanguage() {};
+ virtual ~ScriptLanguage() {};
};
extern uint8_t script_encryption_key[32];