Console overhaul, part 2. New console is mostly working.
This commit is contained in:
@@ -223,17 +223,26 @@ UlxLuaValues *ALuprexGameModeBase::LuaCallEnd(AccessKind kind, AActor *place) {
|
||||
}
|
||||
}
|
||||
|
||||
FString ALuprexGameModeBase::LuaValidate(const FString &Code)
|
||||
FString ALuprexGameModeBase::ValidateLuaExpr(const FString &Code)
|
||||
{
|
||||
FTCHARToUTF8 UCode(*Code);
|
||||
FlxLockedWrapper w(LockableWrapper);
|
||||
uint32_t retpklen;
|
||||
const char *retpk;
|
||||
w->play_access(w.Get(), AccessKind::VALIDATE_LUA, 0, UCode.Length(), UCode.Get(), &retpklen, &retpk);
|
||||
w->play_access(w.Get(), AccessKind::VALIDATE_LUA_EXPR, 0, UCode.Length(), UCode.Get(), &retpklen, &retpk);
|
||||
FString Result(retpklen, (const UTF8CHAR*)retpk);
|
||||
return Result;
|
||||
}
|
||||
|
||||
void ALuprexGameModeBase::InvokeLuaExpr(const FString &Code)
|
||||
{
|
||||
FTCHARToUTF8 UCode(*Code);
|
||||
FlxLockedWrapper w(LockableWrapper);
|
||||
uint32_t retpklen;
|
||||
const char *retpk;
|
||||
w->play_access(w.Get(), AccessKind::INVOKE_LUA_EXPR, 0, UCode.Length(), UCode.Get(), &retpklen, &retpk);
|
||||
}
|
||||
|
||||
void ALuprexGameModeBase::OnWorldPreActorTick(UWorld* InWorld, ELevelTick InLevelTick, float deltaseconds)
|
||||
{
|
||||
if(Playing && TickEnabled && (GetWorld() == InWorld) && (InLevelTick == LEVELTICK_All))
|
||||
|
||||
Reference in New Issue
Block a user