diff options
Diffstat (limited to 'core/script_language.h')
-rw-r--r-- | core/script_language.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/core/script_language.h b/core/script_language.h index ad66fc5528..b4c55cac9e 100644 --- a/core/script_language.h +++ b/core/script_language.h @@ -31,7 +31,6 @@ #ifndef SCRIPT_LANGUAGE_H #define SCRIPT_LANGUAGE_H -#include "io/multiplayer_api.h" #include "map.h" #include "pair.h" #include "resource.h" @@ -158,8 +157,16 @@ public: virtual bool is_placeholder() const { return false; } - virtual MultiplayerAPI::RPCMode get_rpc_mode(const StringName &p_method) const = 0; - virtual MultiplayerAPI::RPCMode get_rset_mode(const StringName &p_variable) const = 0; + enum RPCMode { + RPC_MODE_DISABLED, + RPC_MODE_REMOTE, + RPC_MODE_SYNC, + RPC_MODE_MASTER, + RPC_MODE_SLAVE, + }; + + virtual RPCMode get_rpc_mode(const StringName &p_method) const = 0; + virtual RPCMode get_rset_mode(const StringName &p_variable) const = 0; virtual ScriptLanguage *get_language() = 0; virtual ~ScriptInstance(); @@ -325,8 +332,8 @@ public: virtual bool is_placeholder() const { return true; } - virtual MultiplayerAPI::RPCMode get_rpc_mode(const StringName &p_method) const { return MultiplayerAPI::RPC_MODE_DISABLED; } - virtual MultiplayerAPI::RPCMode get_rset_mode(const StringName &p_variable) const { return MultiplayerAPI::RPC_MODE_DISABLED; } + virtual RPCMode get_rpc_mode(const StringName &p_method) const { return RPC_MODE_DISABLED; } + virtual RPCMode get_rset_mode(const StringName &p_variable) const { return RPC_MODE_DISABLED; } PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner); ~PlaceHolderScriptInstance(); |