You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[Net] Single rpc annotation. "sync" no longer part of mode.
- Move the "sync" property for RPCs to RPCConfig.
- Unify GDScript annotations into a single one:
- `@rpc(master)` # default
- `@rpc(puppet)`
- `@rpc(any)` # former `@remote`
- Implement three additional `@rpc` options:
- The second parameter is the "sync" option (which also calls the
function locally when RPCing). One of "sync", "nosync".
- The third parameter is the transfer mode (reliable, unreliable,
ordered).
- The third parameter is the channel (unused for now).
This commit is contained in:
@@ -695,7 +695,9 @@ Dictionary ExtendGDScriptParser::dump_function_api(const GDScriptParser::Functio
|
||||
ERR_FAIL_NULL_V(p_func, func);
|
||||
func["name"] = p_func->identifier->name;
|
||||
func["return_type"] = p_func->get_datatype().to_string();
|
||||
func["rpc_mode"] = p_func->rpc_mode;
|
||||
func["rpc_mode"] = p_func->rpc_config.rpc_mode;
|
||||
func["rpc_transfer_mode"] = p_func->rpc_config.transfer_mode;
|
||||
func["rpc_transfer_channel"] = p_func->rpc_config.channel;
|
||||
Array parameters;
|
||||
for (int i = 0; i < p_func->parameters.size(); i++) {
|
||||
Dictionary arg;
|
||||
|
||||
Reference in New Issue
Block a user