aboutsummaryrefslogtreecommitdiff
path: root/core/script_language.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/script_language.cpp')
-rw-r--r--core/script_language.cpp35
1 files changed, 33 insertions, 2 deletions
diff --git a/core/script_language.cpp b/core/script_language.cpp
index 031fcb0c4..b7a0f579f 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -85,6 +85,13 @@ void ScriptServer::register_language(ScriptLanguage *p_language) {
_languages[_language_count++]=p_language;
}
+void ScriptServer::init_languages() {
+
+ for(int i=0;i<_language_count;i++) {
+ _languages[i]->init();
+ }
+}
+
Variant ScriptInstance::call(const StringName& p_method,VARIANT_ARG_DECLARE) {
VARIANT_ARGPTRS;
@@ -129,6 +136,14 @@ ScriptInstance::~ScriptInstance() {
}
+
+ScriptCodeCompletionCache *ScriptCodeCompletionCache::singleton=NULL;
+ScriptCodeCompletionCache::ScriptCodeCompletionCache() {
+ singleton=this;
+}
+
+
+
void ScriptLanguage::frame() {
@@ -252,6 +267,20 @@ void PlaceHolderScriptInstance::get_property_list(List<PropertyInfo> *p_properti
}
}
+Variant::Type PlaceHolderScriptInstance::get_property_type(const StringName& p_name,bool *r_is_valid) const {
+
+ if (values.has(p_name)) {
+ if (r_is_valid)
+ *r_is_valid=true;
+ return values[p_name].get_type();
+ }
+ if (r_is_valid)
+ *r_is_valid=false;
+
+ return Variant::NIL;
+}
+
+
void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties,const Map<StringName,Variant>& p_values) {
@@ -283,8 +312,10 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties,co
to_remove.pop_front();
}
- if (owner && owner->get_script_instance()==this)
+ if (owner && owner->get_script_instance()==this) {
+
owner->_change_notify();
+ }
//change notify
}