From 9c5cdf78a7f5c0073437bdd6d7f03092c910d687 Mon Sep 17 00:00:00 2001 From: praydog Date: Tue, 10 Oct 2023 12:58:47 -0700 Subject: [PATCH] Plugins: Add UEVR_UStructFunctions::find_function --- include/uevr/API.h | 1 + src/mods/PluginLoader.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/uevr/API.h b/include/uevr/API.h index 8c64e2a4..626bedfc 100644 --- a/include/uevr/API.h +++ b/include/uevr/API.h @@ -191,6 +191,7 @@ typedef struct { typedef struct { UEVR_UStructHandle (*get_super_struct)(UEVR_UStructHandle klass); UEVR_FFieldHandle (*get_child_properties)(UEVR_UStructHandle klass); + UEVR_UFunctionHandle (*find_function)(UEVR_UStructHandle klass, const wchar_t* name); } UEVR_UStructFunctions; typedef struct { diff --git a/src/mods/PluginLoader.cpp b/src/mods/PluginLoader.cpp index 6f746563..9a1a32a5 100644 --- a/src/mods/PluginLoader.cpp +++ b/src/mods/PluginLoader.cpp @@ -287,6 +287,10 @@ UEVR_UStructFunctions g_ustruct_functions { [](UEVR_UStructHandle strct) { return (UEVR_FFieldHandle)USTRUCT(strct)->get_child_properties(); }, + // find_function + [](UEVR_UStructHandle strct, const wchar_t* name) { + return (UEVR_UFunctionHandle)USTRUCT(strct)->find_function(name); + }, }; #define UCLASS(x) ((sdk::UClass*)x)