summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/SCsub4
-rw-r--r--core/class_db.cpp7
-rw-r--r--core/class_db.h23
-rw-r--r--core/script_language.cpp6
4 files changed, 9 insertions, 31 deletions
diff --git a/core/SCsub b/core/SCsub
index 4c541d7269..c1e57f6840 100644
--- a/core/SCsub
+++ b/core/SCsub
@@ -18,7 +18,7 @@ gd_cpp = '#include "project_settings.h"\n'
gd_cpp += gd_inc
gd_cpp += "void ProjectSettings::register_global_defaults() {\n" + gd_call + "\n}\n"
-f = open("global_defaults.gen.cpp", "wb")
+f = open("global_defaults.gen.cpp", "w")
f.write(gd_cpp)
f.close()
@@ -47,7 +47,7 @@ if ("SCRIPT_AES256_ENCRYPTION_KEY" in os.environ):
txt = "0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0"
print("Invalid AES256 encryption key, not 64 bits hex: " + e)
-f = open("script_encryption_key.gen.cpp", "wb")
+f = open("script_encryption_key.gen.cpp", "w")
f.write("#include \"project_settings.h\"\nuint8_t script_encryption_key[32]={" + txt + "};\n")
f.close()
diff --git a/core/class_db.cpp b/core/class_db.cpp
index 53bac3e349..1cb287a143 100644
--- a/core/class_db.cpp
+++ b/core/class_db.cpp
@@ -46,11 +46,6 @@
#ifdef DEBUG_METHODS_ENABLED
-ParamDef::ParamDef(const Variant &p_variant)
- : used(true),
- val(p_variant) {
-}
-
MethodDefinition D_METHOD(const char *p_name) {
MethodDefinition md;
@@ -865,7 +860,7 @@ void ClassDB::add_property(StringName p_class, const PropertyInfo &p_pinfo, cons
MethodBind *mb_get = NULL;
if (p_getter) {
- MethodBind *mb_get = get_method(p_class, p_getter);
+ mb_get = get_method(p_class, p_getter);
#ifdef DEBUG_METHODS_ENABLED
if (!mb_get) {
diff --git a/core/class_db.h b/core/class_db.h
index 25a5000572..f6b97748b0 100644
--- a/core/class_db.h
+++ b/core/class_db.h
@@ -38,29 +38,6 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-struct ParamHint {
-
- String name;
- PropertyHint hint;
- String hint_text;
- Variant default_val;
-
- ParamHint(const String &p_name = "", PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_text = "", const Variant &p_default_val = Variant())
- : name(p_name),
- hint(p_hint),
- hint_text(p_hint_text),
- default_val(p_default_val) {
- }
-};
-
-struct ParamDef {
- bool used;
- Variant val;
- _FORCE_INLINE_ ParamDef() { used = false; }
- ParamDef(const Variant &p_variant);
-};
-
-//#define DEFVAL( m_defval ) ParamDef(m_defval)
#define DEFVAL(m_defval) (m_defval)
//#define SIMPLE_METHODDEF
diff --git a/core/script_language.cpp b/core/script_language.cpp
index 9a891f9e52..f2be15897e 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -54,6 +54,12 @@ void Script::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_source_code"), &Script::get_source_code);
ClassDB::bind_method(D_METHOD("set_source_code", "source"), &Script::set_source_code);
ClassDB::bind_method(D_METHOD("reload", "keep_state"), &Script::reload, DEFVAL(false));
+
+ ClassDB::bind_method(D_METHOD("has_method", "method_name"), &Script::has_method);
+ ClassDB::bind_method(D_METHOD("has_script_signal", "signal_name"), &Script::has_script_signal);
+
+ ClassDB::bind_method(D_METHOD("is_tool"), &Script::is_tool);
+ ClassDB::bind_method(D_METHOD("get_node_type"), &Script::get_node_type);
}
void ScriptServer::set_scripting_enabled(bool p_enabled) {