You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Revert "Expose get_rpc_config and get_node_rpc_config"
This reverts commit 8835f326b1.
This commit is contained in:
@@ -172,8 +172,6 @@ void Script::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("is_tool"), &Script::is_tool);
|
ClassDB::bind_method(D_METHOD("is_tool"), &Script::is_tool);
|
||||||
ClassDB::bind_method(D_METHOD("is_abstract"), &Script::is_abstract);
|
ClassDB::bind_method(D_METHOD("is_abstract"), &Script::is_abstract);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_rpc_config"), &Script::get_rpc_config);
|
|
||||||
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "source_code", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_source_code", "get_source_code");
|
ADD_PROPERTY(PropertyInfo(Variant::STRING, "source_code", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_source_code", "get_source_code");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ public:
|
|||||||
|
|
||||||
virtual bool is_placeholder_fallback_enabled() const { return false; }
|
virtual bool is_placeholder_fallback_enabled() const { return false; }
|
||||||
|
|
||||||
virtual Variant get_rpc_config() const = 0;
|
virtual const Variant get_rpc_config() const = 0;
|
||||||
|
|
||||||
Script() {}
|
Script() {}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ public:
|
|||||||
|
|
||||||
GDVIRTUAL0RC_REQUIRED(Variant, _get_rpc_config)
|
GDVIRTUAL0RC_REQUIRED(Variant, _get_rpc_config)
|
||||||
|
|
||||||
virtual Variant get_rpc_config() const override {
|
virtual const Variant get_rpc_config() const override {
|
||||||
Variant ret;
|
Variant ret;
|
||||||
GDVIRTUAL_CALL(_get_rpc_config, ret);
|
GDVIRTUAL_CALL(_get_rpc_config, ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -538,12 +538,6 @@
|
|||||||
[b]Note:[/b] The returned value will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using [code]delta[/code] for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].
|
[b]Note:[/b] The returned value will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using [code]delta[/code] for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_rpc_config" qualifiers="const">
|
|
||||||
<return type="Variant" />
|
|
||||||
<description>
|
|
||||||
Returns a [Dictionary] mapping method names to their RPC configuration defined for this node using [method rpc_config].
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_scene_instance_load_placeholder" qualifiers="const">
|
<method name="get_scene_instance_load_placeholder" qualifiers="const">
|
||||||
<return type="bool" />
|
<return type="bool" />
|
||||||
<description>
|
<description>
|
||||||
|
|||||||
@@ -58,12 +58,6 @@
|
|||||||
Returns the default value of the specified property.
|
Returns the default value of the specified property.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_rpc_config" qualifiers="const">
|
|
||||||
<return type="Variant" />
|
|
||||||
<description>
|
|
||||||
Returns a [Dictionary] mapping method names to their RPC configuration defined by this script.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_script_constant_map">
|
<method name="get_script_constant_map">
|
||||||
<return type="Dictionary" />
|
<return type="Dictionary" />
|
||||||
<description>
|
<description>
|
||||||
|
|||||||
@@ -922,7 +922,7 @@ void GDScript::get_members(HashSet<StringName> *p_members) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant GDScript::get_rpc_config() const {
|
const Variant GDScript::get_rpc_config() const {
|
||||||
return rpc_config;
|
return rpc_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ public:
|
|||||||
virtual void get_constants(HashMap<StringName, Variant> *p_constants) override;
|
virtual void get_constants(HashMap<StringName, Variant> *p_constants) override;
|
||||||
virtual void get_members(HashSet<StringName> *p_members) override;
|
virtual void get_members(HashSet<StringName> *p_members) override;
|
||||||
|
|
||||||
virtual Variant get_rpc_config() const override;
|
virtual const Variant get_rpc_config() const override;
|
||||||
|
|
||||||
void unload_static() const;
|
void unload_static() const;
|
||||||
|
|
||||||
|
|||||||
@@ -2737,7 +2737,7 @@ int CSharpScript::get_member_line(const StringName &p_member) const {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant CSharpScript::get_rpc_config() const {
|
const Variant CSharpScript::get_rpc_config() const {
|
||||||
return rpc_config;
|
return rpc_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ public:
|
|||||||
|
|
||||||
int get_member_line(const StringName &p_member) const override;
|
int get_member_line(const StringName &p_member) const override;
|
||||||
|
|
||||||
Variant get_rpc_config() const override;
|
const Variant get_rpc_config() const override;
|
||||||
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
bool is_placeholder_fallback_enabled() const override {
|
bool is_placeholder_fallback_enabled() const override {
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ const SceneRPCInterface::RPCConfigCache &SceneRPCInterface::_get_node_config(con
|
|||||||
return rpc_cache[oid];
|
return rpc_cache[oid];
|
||||||
}
|
}
|
||||||
RPCConfigCache cache;
|
RPCConfigCache cache;
|
||||||
_parse_rpc_config(p_node->get_rpc_config(), true, cache);
|
_parse_rpc_config(p_node->get_node_rpc_config(), true, cache);
|
||||||
if (p_node->get_script_instance()) {
|
if (p_node->get_script_instance()) {
|
||||||
_parse_rpc_config(p_node->get_script_instance()->get_rpc_config(), false, cache);
|
_parse_rpc_config(p_node->get_script_instance()->get_rpc_config(), false, cache);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -849,7 +849,7 @@ void Node::rpc_config(const StringName &p_method, const Variant &p_config) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant Node::get_rpc_config() const {
|
const Variant Node::get_node_rpc_config() const {
|
||||||
return data.rpc_config;
|
return data.rpc_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3980,7 +3980,6 @@ void Node::_bind_methods() {
|
|||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_multiplayer"), &Node::get_multiplayer);
|
ClassDB::bind_method(D_METHOD("get_multiplayer"), &Node::get_multiplayer);
|
||||||
ClassDB::bind_method(D_METHOD("rpc_config", "method", "config"), &Node::rpc_config);
|
ClassDB::bind_method(D_METHOD("rpc_config", "method", "config"), &Node::rpc_config);
|
||||||
ClassDB::bind_method(D_METHOD("get_rpc_config"), &Node::get_rpc_config);
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("set_editor_description", "editor_description"), &Node::set_editor_description);
|
ClassDB::bind_method(D_METHOD("set_editor_description", "editor_description"), &Node::set_editor_description);
|
||||||
ClassDB::bind_method(D_METHOD("get_editor_description"), &Node::get_editor_description);
|
ClassDB::bind_method(D_METHOD("get_editor_description"), &Node::get_editor_description);
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ private:
|
|||||||
void *process_group = nullptr; // to avoid cyclic dependency
|
void *process_group = nullptr; // to avoid cyclic dependency
|
||||||
|
|
||||||
int multiplayer_authority = 1; // Server by default.
|
int multiplayer_authority = 1; // Server by default.
|
||||||
Variant rpc_config = Dictionary();
|
Variant rpc_config;
|
||||||
|
|
||||||
// Variables used to properly sort the node when processing, ignored otherwise.
|
// Variables used to properly sort the node when processing, ignored otherwise.
|
||||||
int process_priority = 0;
|
int process_priority = 0;
|
||||||
@@ -786,7 +786,7 @@ public:
|
|||||||
bool is_multiplayer_authority() const;
|
bool is_multiplayer_authority() const;
|
||||||
|
|
||||||
void rpc_config(const StringName &p_method, const Variant &p_config); // config a local method for RPC
|
void rpc_config(const StringName &p_method, const Variant &p_config); // config a local method for RPC
|
||||||
Variant get_rpc_config() const;
|
const Variant get_node_rpc_config() const;
|
||||||
|
|
||||||
template <typename... VarArgs>
|
template <typename... VarArgs>
|
||||||
Error rpc(const StringName &p_method, VarArgs... p_args);
|
Error rpc(const StringName &p_method, VarArgs... p_args);
|
||||||
|
|||||||
Reference in New Issue
Block a user