Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class StringOnlyRule : GodotApiRule<EnrichedClassTask>(), BaseMethodeRule {
append(".asCachedNodePath()")
}
}
if (method.isVararg && isNotEmpty()) append(",·")
if (method.isVararg && isNotEmpty()) append(",·*args")
}

addStatement("return·${method.name}($arguments)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ public object ClassDB : Object() {
`class`: String,
method: String,
vararg args: Any?,
): Any? = classCallStatic(`class`.asCachedStringName(), method.asCachedStringName(), )
): Any? = classCallStatic(`class`.asCachedStringName(), method.asCachedStringName(), *args)

/**
* Returns an array with the names all the integer constants of [class] or its ancestry.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2685,7 +2685,7 @@ public open class Node : Object() {
* (`get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED`).
*/
public final fun rpc(method: String, vararg args: Any?): Error =
rpc(method.asCachedStringName(), )
rpc(method.asCachedStringName(), *args)

/**
* Sends a [rpc] to a specific peer identified by [peerId] (see [MultiplayerPeer.setTargetPeer]).
Expand All @@ -2699,7 +2699,7 @@ public open class Node : Object() {
peerId: Long,
method: String,
vararg args: Any?,
): Error = rpcId(peerId, method.asCachedStringName(), )
): Error = rpcId(peerId, method.asCachedStringName(), *args)

/**
* This function is similar to [Object.callDeferred] except that the call will take place when the
Expand All @@ -2709,7 +2709,7 @@ public open class Node : Object() {
* called.
*/
public final fun callDeferredThreadGroup(method: String, vararg args: Any?): Any? =
callDeferredThreadGroup(method.asCachedStringName(), )
callDeferredThreadGroup(method.asCachedStringName(), *args)

/**
* Similar to [callDeferredThreadGroup], but for setting properties.
Expand All @@ -2723,7 +2723,7 @@ public open class Node : Object() {
* the call will become deferred. Otherwise, the call will go through directly.
*/
public final fun callThreadSafe(method: String, vararg args: Any?): Any? =
callThreadSafe(method.asCachedStringName(), )
callThreadSafe(method.asCachedStringName(), *args)

/**
* Similar to [callThreadSafe], but for setting properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ public open class SceneTree : MainLoop() {
group: String,
method: String,
vararg args: Any?,
) = callGroupFlags(flags, group.asCachedStringName(), method.asCachedStringName(), )
) = callGroupFlags(flags, group.asCachedStringName(), method.asCachedStringName(), *args)

/**
* Calls [Object.notification] with the given [notification] to all nodes inside this tree added
Expand Down Expand Up @@ -808,7 +808,7 @@ public open class SceneTree : MainLoop() {
group: String,
method: String,
vararg args: Any?,
) = callGroup(group.asCachedStringName(), method.asCachedStringName(), )
) = callGroup(group.asCachedStringName(), method.asCachedStringName(), *args)

/**
* Calls [Object.notification] with the given [notification] to all nodes inside this tree added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ public open class TreeItem internal constructor() : Object() {
* comma separated list.
*/
public final fun callRecursive(method: String, vararg args: Any?) =
callRecursive(method.asCachedStringName(), )
callRecursive(method.asCachedStringName(), *args)

public enum class TreeCellMode(
id: Long,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ public open class Object : KtObject() {
* each call.
*/
public final fun emitSignal(signal: String, vararg args: Any?): Error =
emitSignal(signal.asCachedStringName(), )
emitSignal(signal.asCachedStringName(), *args)

/**
* Calls the [method] on the object and returns the result. This method supports a variable number
Expand All @@ -1422,7 +1422,7 @@ public open class Object : KtObject() {
* each call.
*/
public final fun call(method: String, vararg args: Any?): Any? =
call(method.asCachedStringName(), )
call(method.asCachedStringName(), *args)

/**
* Calls the [method] on the object during idle time. Always returns `null`, **not** the method's
Expand Down Expand Up @@ -1469,7 +1469,7 @@ public open class Object : KtObject() {
* ```
*/
public final fun callDeferred(method: String, vararg args: Any?): Any? =
callDeferred(method.asCachedStringName(), )
callDeferred(method.asCachedStringName(), *args)

/**
* Assigns [value] to the given [property], at the end of the current frame. This is equivalent to
Expand Down
Loading