diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/generation/rule/MethodRule.kt b/kt/api-generator/src/main/kotlin/godot/codegen/generation/rule/MethodRule.kt index 61543b280a..12fbef4776 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/generation/rule/MethodRule.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/generation/rule/MethodRule.kt @@ -287,7 +287,7 @@ class StringOnlyRule : GodotApiRule(), BaseMethodeRule { append(".asCachedNodePath()") } } - if (method.isVararg && isNotEmpty()) append(",·") + if (method.isVararg && isNotEmpty()) append(",·*args") } addStatement("return·${method.name}($arguments)") diff --git a/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/ClassDB.kt b/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/ClassDB.kt index 2224e9b6f4..7a593d29bd 100644 --- a/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/ClassDB.kt +++ b/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/ClassDB.kt @@ -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. diff --git a/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/Node.kt b/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/Node.kt index 7f243de6bd..511e69a362 100644 --- a/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/Node.kt +++ b/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/Node.kt @@ -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]). @@ -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 @@ -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. @@ -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. diff --git a/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/SceneTree.kt b/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/SceneTree.kt index 0117df948a..c95ea52f8d 100644 --- a/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/SceneTree.kt +++ b/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/SceneTree.kt @@ -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 @@ -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 diff --git a/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/TreeItem.kt b/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/TreeItem.kt index 5a1c52130a..e8eb9ef6d4 100644 --- a/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/TreeItem.kt +++ b/kt/godot-library/godot-api-library/src/main/kotlin/godot/api/TreeItem.kt @@ -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, diff --git a/kt/godot-library/godot-core-library/src/main/kotlin/gen/godot/api/Object.kt b/kt/godot-library/godot-core-library/src/main/kotlin/gen/godot/api/Object.kt index 170acade11..b7a07dbb7c 100644 --- a/kt/godot-library/godot-core-library/src/main/kotlin/gen/godot/api/Object.kt +++ b/kt/godot-library/godot-core-library/src/main/kotlin/gen/godot/api/Object.kt @@ -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 @@ -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 @@ -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