Improve consistency of naming in 'invoke/access' pipeline.

This commit is contained in:
2025-06-13 21:03:13 -04:00
parent 676b5bd119
commit f150b14d30
13 changed files with 71 additions and 71 deletions

View File

@@ -217,7 +217,7 @@ void UlxLuaCallLibrary::LuaCallInvoke(UObject *context, AActor *place)
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(context);
FlxStreamBuffer &sb = mode->LuaCallGetBuffer();
if (NotInitialized(sb)) return;
mode->LuaCallEnd(InvocationKind::LUA_INVOKE, place);
mode->LuaCallEnd(AccessKind::INVOKE_LUA_CALL, place);
}
@@ -226,7 +226,7 @@ bool UlxLuaCallLibrary::LuaCallProbe(UObject *context, AActor *place, UlxLuaValu
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(context);
FlxStreamBuffer &sb = mode->LuaCallGetBuffer();
if (NotInitialized(sb)) return false;
ReturnArray = mode->LuaCallEnd(InvocationKind::LUA_PROBE, place);
ReturnArray = mode->LuaCallEnd(AccessKind::PROBE_LUA_CALL, place);
if ((ReturnArray == nullptr) || (ReturnArray->Length() < 1))
{
UE_LOG(LogLuprexIntegration, Error, TEXT("corruption in lua_probe"));

View File

@@ -175,14 +175,14 @@ void ALuprexGameModeBase::UpdatePossessedTangible() {
}
}
UlxLuaValues *ALuprexGameModeBase::LuaCallEnd(InvocationKind kind, int64 place_id) {
UlxLuaValues *ALuprexGameModeBase::LuaCallEnd(AccessKind kind, int64 place_id) {
std::string_view datapk = LuaCallBuffer.view();
FlxLockedWrapper w(LockableWrapper);
if (place_id == 0) place_id = w.GetActor();
uint32_t retpklen;
const char *retpk;
w->play_call_function(w.Get(), kind, place_id, datapk.size(), datapk.data(), &retpklen, &retpk);
if (kind == InvocationKind::LUA_PROBE)
w->play_access(w.Get(), kind, place_id, datapk.size(), datapk.data(), &retpklen, &retpk);
if (kind == AccessKind::PROBE_LUA_CALL)
{
UlxLuaValues *Result = NewObject<UlxLuaValues>(this);
Result->Initialize(std::string_view(retpk, retpklen));
@@ -191,11 +191,11 @@ UlxLuaValues *ALuprexGameModeBase::LuaCallEnd(InvocationKind kind, int64 place_i
else return nullptr;
}
UlxLuaValues *ALuprexGameModeBase::LuaCallEnd(InvocationKind kind) {
UlxLuaValues *ALuprexGameModeBase::LuaCallEnd(AccessKind kind) {
return LuaCallEnd(kind, int64(0));
}
UlxLuaValues *ALuprexGameModeBase::LuaCallEnd(InvocationKind kind, AActor *place) {
UlxLuaValues *ALuprexGameModeBase::LuaCallEnd(AccessKind kind, AActor *place) {
if (place == nullptr) {
return LuaCallEnd(kind, int64(0));
} else {

View File

@@ -108,9 +108,9 @@ public:
//
FlxStreamBuffer &LuaCallBegin() { LuaCallBuffer.clear(); return LuaCallBuffer; }
FlxStreamBuffer &LuaCallGetBuffer() { return LuaCallBuffer; }
UlxLuaValues *LuaCallEnd(InvocationKind kind);
UlxLuaValues *LuaCallEnd(InvocationKind kind, int64 place_id);
UlxLuaValues *LuaCallEnd(InvocationKind kind, AActor *place);
UlxLuaValues *LuaCallEnd(AccessKind kind);
UlxLuaValues *LuaCallEnd(AccessKind kind, int64 place_id);
UlxLuaValues *LuaCallEnd(AccessKind kind, AActor *place);
void LuaCallClear() { LuaCallBuffer.clear(); }
// Execute a debugging command, typed on the GUI.