summaryrefslogtreecommitdiff
path: root/core/script_language.h
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-05-13 07:07:56 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-05-29 20:26:41 +0200
commit1400f6fdc444650ebf37c83bb4164e25e641bab1 (patch)
treeb90ceb3810e282de0caa8a9115e471a9776ead4e /core/script_language.h
parent46bab3abc71156cd2da95312368f2c72abe7b151 (diff)
Refactor RPCMode enum and checks
Diffstat (limited to 'core/script_language.h')
-rw-r--r--core/script_language.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/core/script_language.h b/core/script_language.h
index b4c55cac9e..ad66fc5528 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -31,6 +31,7 @@
#ifndef SCRIPT_LANGUAGE_H
#define SCRIPT_LANGUAGE_H
+#include "io/multiplayer_api.h"
#include "map.h"
#include "pair.h"
#include "resource.h"
@@ -157,16 +158,8 @@ public:
virtual bool is_placeholder() const { return false; }
- 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 MultiplayerAPI::RPCMode get_rpc_mode(const StringName &p_method) const = 0;
+ virtual MultiplayerAPI::RPCMode get_rset_mode(const StringName &p_variable) const = 0;
virtual ScriptLanguage *get_language() = 0;
virtual ~ScriptInstance();
@@ -332,8 +325,8 @@ public:
virtual bool is_placeholder() const { return true; }
- 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; }
+ 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; }
PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner);
~PlaceHolderScriptInstance();