diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-01-23 21:42:15 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-01-23 21:42:15 -0300 |
commit | a74138a0dc5862d2c26eb78a141ba3c3f9d01c6d (patch) | |
tree | b813df7f8b217100fcf71dcf06eec58fe2b7354e /core/script_language.cpp | |
parent | 6c27df8df609337867c108c5adb66174393e190b (diff) |
-Some changes to how scenes and scripts are overriden in scene instance and inheritance
-Fixes #3127 and also properly fixes #2958
Diffstat (limited to 'core/script_language.cpp')
-rw-r--r-- | core/script_language.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/script_language.cpp b/core/script_language.cpp index 2ce3844ba3..0eac39e7d1 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -92,6 +92,22 @@ void ScriptServer::init_languages() { } } +void ScriptInstance::get_property_state(List<Pair<StringName, Variant> > &state) { + + List<PropertyInfo> pinfo; + get_property_list(&pinfo); + for (List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) { + + if (E->get().usage&PROPERTY_USAGE_STORAGE) { + Pair<StringName,Variant> p; + p.first=E->get().name; + if (get(p.first,p.second)) + state.push_back(p); + } + } +} + + Variant ScriptInstance::call(const StringName& p_method,VARIANT_ARG_DECLARE) { VARIANT_ARGPTRS; |