diff --git a/core/object/script_language.h b/core/object/script_language.h index 8d76cbf4795..4754b01a070 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -274,13 +274,32 @@ public: String message; }; + enum TemplateLocation { + TEMPLATE_BUILT_IN, + TEMPLATE_EDITOR, + TEMPLATE_PROJECT + }; + + struct ScriptTemplate { + String inherit = "Object"; + String name; + String description; + String content; + int id = 0; + TemplateLocation origin = TemplateLocation::TEMPLATE_BUILT_IN; + + String get_hash() const { + return itos(origin) + inherit + name; + } + }; + void get_core_type_words(List *p_core_type_words) const; virtual void get_reserved_words(List *p_words) const = 0; virtual bool is_control_flow_keyword(String p_string) const = 0; virtual void get_comment_delimiters(List *p_delimiters) const = 0; virtual void get_string_delimiters(List *p_delimiters) const = 0; - virtual Ref