diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-08-19 16:48:08 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-08-19 16:48:41 -0300 |
commit | 1add52b55e038a4fa789c64f3919f7fcab808e91 (patch) | |
tree | dd7878449dd1d2301684a5e5aa34b8466744b168 /modules/visual_script | |
parent | 56fa741b7a729bd5a00cff17e4382af547de92ad (diff) |
Brand new networked multiplayer
Diffstat (limited to 'modules/visual_script')
-rw-r--r-- | modules/visual_script/visual_script.cpp | 13 | ||||
-rw-r--r-- | modules/visual_script/visual_script.h | 5 | ||||
-rw-r--r-- | modules/visual_script/visual_script_func_nodes.cpp | 6 |
3 files changed, 18 insertions, 6 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 91219679db..469ceaac20 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -992,7 +992,7 @@ bool VisualScript::get_property_default_value(const StringName& p_property,Varia r_value=variables[ script_variable_remap[p_property] ].default_value; return true; } -void VisualScript::get_method_list(List<MethodInfo> *p_list) const { +void VisualScript::get_script_method_list(List<MethodInfo> *p_list) const { for (Map<StringName,Function>::Element *E=functions.front();E;E=E->next()) { @@ -1767,7 +1767,7 @@ Variant VisualScriptInstance::_call_internal(const StringName& p_method, void* p } -Variant VisualScriptInstance::call(const StringName& p_method,const Variant** p_args,int p_argcount,Variant::CallError &r_error){ +Variant VisualScriptInstance::call(const StringName& p_method, const Variant** p_args, int p_argcount, Variant::CallError &r_error){ r_error.error=Variant::CallError::CALL_OK; //ok by default @@ -1871,6 +1871,15 @@ Ref<Script> VisualScriptInstance::get_script() const{ return script; } +ScriptInstance::RPCMode VisualScriptInstance::get_rpc_mode(const StringName& p_method) const { + + return RPC_MODE_DISABLED; +} +ScriptInstance::RPCMode VisualScriptInstance::get_rset_mode(const StringName& p_variable) const { + + return RPC_MODE_DISABLED; +} + void VisualScriptInstance::create(const Ref<VisualScript>& p_script,Object *p_owner) { diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h index 786b9b873e..398df95664 100644 --- a/modules/visual_script/visual_script.h +++ b/modules/visual_script/visual_script.h @@ -320,7 +320,7 @@ public: virtual void get_script_signal_list(List<MethodInfo> *r_signals) const; virtual bool get_property_default_value(const StringName& p_property,Variant& r_value) const; - virtual void get_method_list(List<MethodInfo> *p_list) const; + virtual void get_script_method_list(List<MethodInfo> *p_list) const; virtual bool has_method(const StringName& p_method) const; virtual MethodInfo get_method_info(const StringName& p_method) const; @@ -413,6 +413,9 @@ public: virtual ScriptLanguage *get_language(); + virtual RPCMode get_rpc_mode(const StringName& p_method) const; + virtual RPCMode get_rset_mode(const StringName& p_variable) const; + VisualScriptInstance(); ~VisualScriptInstance(); }; diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index 4006dab4a5..14bc0bc828 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -1951,7 +1951,7 @@ PropertyInfo VisualScriptScriptCall::get_input_value_port_info(int p_idx) const{ return PropertyInfo(); List<MethodInfo> functions; - script->get_method_list(&functions); + script->get_script_method_list(&functions); for (List<MethodInfo>::Element *E=functions.front();E;E=E->next()) { if (E->get().name==function) { if (p_idx<0 || p_idx>=E->get().arguments.size()) @@ -2118,7 +2118,7 @@ void VisualScriptScriptCall::_validate_property(PropertyInfo& property) const { Ref<VisualScript> vs = get_visual_script(); if (vs.is_valid()) { - vs->get_method_list(&methods); + vs->get_script_method_list(&methods); } } else { @@ -2130,7 +2130,7 @@ void VisualScriptScriptCall::_validate_property(PropertyInfo& property) const { if (!script.is_valid()) return; - script->get_method_list(&methods); + script->get_script_method_list(&methods); } |