Move a lot of EngineWrapper interfaces out of LuprexGameModeBase

This commit is contained in:
2026-02-14 03:35:08 -05:00
parent d046ef8161
commit 2eacc12cad
10 changed files with 155 additions and 165 deletions

View File

@@ -82,38 +82,12 @@ public:
void LookAtChanged();
// Assemble a lua call. Note that this is the lowest-level interface.
// These functions are wrapped by the functions in UlxLuaCallLibrary,
// and those in turn are wrapped by the K2Node "LuaInvoke" and "LuaProbe".
// The Lua Call Assembly Buffer. Used by
// UlxLuaCallLibrary to build up a call across
// multiple UFUNCTION invocations.
//
// At this level, the process of calling Lua is:
//
// * Use LuaCallBegin
// * Get the lua call buffer:
// - add a class name
// - add a function name
// - add function parameters
// * Use LuaCallEnd.
// * Process any return values in the UlxLuaValues array.
//
FlxStreamBuffer &LuaCallBegin() { LuaCallBuffer.clear(); return LuaCallBuffer; }
FlxStreamBuffer &LuaCallGetBuffer() { return LuaCallBuffer; }
UlxLuaValues *LuaCallEnd(AccessKind kind);
UlxLuaValues *LuaCallEnd(AccessKind kind, int64 place_id);
UlxLuaValues *LuaCallEnd(AccessKind kind, AActor *place);
void LuaCallClear() { LuaCallBuffer.clear(); }
FlxStreamBuffer &GetLuaCallBuffer() { return LuaCallBuffer; }
// Validate some lua code. Returns an error message.
// If the lua is well-formed, the error message is the
// empty string. The syntax of the code is checked using
// an otherwise empty lua interpreter, so this is purely
// a syntax check.
//
FString ValidateLuaExpr(const FString &Code);
// Invoke some lua code.
//
void InvokeLuaExpr(const FString &Code);
// Get the Asset Lookup table.
const UlxAssetLookup *GetAssetLookup() const { return AssetLookup; }
@@ -164,8 +138,13 @@ public:
// The Luprex EngineWrapper, with a Mutex to protect it.
// To access it, construct a FlxLockedWrapper.
//
FlxLockableWrapper LockableWrapper;
// Get the LockableWrapper.
//
FlxLockableWrapper& GetLockableWrapper() { return LockableWrapper; }
// The Lua Call Assembly Buffer.
FlxStreamBuffer LuaCallBuffer;