@@ -113,14 +113,14 @@ export function enumeration<T extends godot.Object>(enumeration: string[], defau
113
113
}
114
114
}
115
115
116
- function makeRpcModeConfigDecorator ( mode : godot . MultiplayerAPI . RPCMode ) {
116
+ function make_rpc_mode_config_decorator ( mode : godot . MultiplayerAPI . RPCMode ) {
117
117
return function < T extends godot . Node > ( target : T , property : string , descriptor ?: any ) {
118
- const isMethod = typeof target [ property ] === 'function' ;
119
- const originalReady = target . _ready ;
118
+ const is_method = typeof target [ property ] === 'function' ;
119
+ const original_ready = target . _ready ;
120
120
target . _ready = function ( this : godot . Node ) {
121
- if ( isMethod ) this . rpc_config ( property , mode ) ;
121
+ if ( is_method ) this . rpc_config ( property , mode ) ;
122
122
else this . rset_config ( property , mode ) ;
123
- if ( originalReady ) return originalReady . call ( this ) ;
123
+ if ( original_ready ) return original_ready . call ( this ) ;
124
124
} ;
125
125
return descriptor ;
126
126
}
@@ -132,41 +132,41 @@ function makeRpcModeConfigDecorator(mode: godot.MultiplayerAPI.RPCMode) {
132
132
* Analogous to the `remote` keyword. Calls and property changes are accepted from all
133
133
* remote peers, no matter if they are node's master or puppets.
134
134
*/
135
- export const remote = makeRpcModeConfigDecorator ( godot . MultiplayerAPI . RPC_MODE_REMOTE )
135
+ export const remote = make_rpc_mode_config_decorator ( godot . MultiplayerAPI . RPC_MODE_REMOTE )
136
136
/**
137
137
* Used with `Node.rpc_config` or `Node.rset_config` to set a method to be called or
138
138
* a property to be changed only on the network master for this node.
139
139
* Analogous to the `master` keyword. Only accepts calls or property changes from the
140
140
* node's network puppets, see `Node.set_network_master`.
141
141
*/
142
- export const master = makeRpcModeConfigDecorator ( godot . MultiplayerAPI . RPC_MODE_MASTER )
142
+ export const master = make_rpc_mode_config_decorator ( godot . MultiplayerAPI . RPC_MODE_MASTER )
143
143
/**
144
144
* Used with `Node.rpc_config` or `Node.rset_config` to set a method to be called or
145
145
* a property to be changed only on puppets for this node.
146
146
* Analogous to the `puppet` keyword. Only accepts calls or property changes from the
147
147
* node's network master, see `Node.set_network_master`.
148
148
*/
149
- export const puppet = makeRpcModeConfigDecorator ( godot . MultiplayerAPI . RPC_MODE_PUPPET )
149
+ export const puppet = make_rpc_mode_config_decorator ( godot . MultiplayerAPI . RPC_MODE_PUPPET )
150
150
/**
151
151
* @deprecated Use `RPC_MODE_PUPPET` (@puppet) instead. Analogous to the `slave` keyword.
152
152
*/
153
- export const slave = makeRpcModeConfigDecorator ( godot . MultiplayerAPI . RPC_MODE_SLAVE )
153
+ export const slave = make_rpc_mode_config_decorator ( godot . MultiplayerAPI . RPC_MODE_SLAVE )
154
154
/**
155
155
* Behave like `RPC_MODE_REMOTE` (@remote) but also make the call or property change locally.
156
156
* Analogous to the `remotesync` keyword.
157
157
*/
158
- export const remote_sync = makeRpcModeConfigDecorator ( godot . MultiplayerAPI . RPC_MODE_REMOTESYNC )
158
+ export const remote_sync = make_rpc_mode_config_decorator ( godot . MultiplayerAPI . RPC_MODE_REMOTESYNC )
159
159
/**
160
160
* @deprecated Use `RPC_MODE_REMOTESYNC` (@remote_sync) instead. Analogous to the `sync` keyword
161
161
*/
162
- export const sync = makeRpcModeConfigDecorator ( godot . MultiplayerAPI . RPC_MODE_REMOTESYNC )
162
+ export const sync = make_rpc_mode_config_decorator ( godot . MultiplayerAPI . RPC_MODE_REMOTESYNC )
163
163
/**
164
164
* Behave like `RPC_MODE_MASTER` (@master) but also make the call or property change locally.
165
165
* Analogous to the `mastersync` keyword.
166
166
*/
167
- export const master_sync = makeRpcModeConfigDecorator ( godot . MultiplayerAPI . RPC_MODE_MASTERSYNC )
167
+ export const master_sync = make_rpc_mode_config_decorator ( godot . MultiplayerAPI . RPC_MODE_MASTERSYNC )
168
168
/**
169
169
* Behave like `RPC_MODE_PUPPET` (@puppet) but also make the call or property change locally.
170
170
* Analogous to the `puppetsync` keyword.
171
171
*/
172
- export const puppet_sync = makeRpcModeConfigDecorator ( godot . MultiplayerAPI . RPC_MODE_PUPPETSYNC )
172
+ export const puppet_sync = make_rpc_mode_config_decorator ( godot . MultiplayerAPI . RPC_MODE_PUPPETSYNC )
0 commit comments