From 3633df3fdc6dc0af4f9886fcb1e1d4a8d2b8d5aa Mon Sep 17 00:00:00 2001 From: ImVeryBad Date: Sun, 11 Jan 2026 10:22:18 +0100 Subject: [PATCH] Add makeVarArgs to ReflectUtil.hx --- source/funkin/util/ReflectUtil.hx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/funkin/util/ReflectUtil.hx b/source/funkin/util/ReflectUtil.hx index 1aa335b34..d265681eb 100644 --- a/source/funkin/util/ReflectUtil.hx +++ b/source/funkin/util/ReflectUtil.hx @@ -416,4 +416,13 @@ class ReflectUtil if (cls == null) return "Unknown"; return Type.getClassName(cls); } + + /** + * Transform a function taking an array of arguments into a function that can + * be called with any number of arguments. + */ + public static function makeVarArgs(f:Array->Dynamic):Dynamic + { + return Reflect.makeVarArgs(f); + } }