Implement initial engio experiments

This commit is contained in:
2023-10-24 17:12:03 -04:00
parent 5381b5708a
commit 0ccc08c7dc
2 changed files with 17 additions and 5 deletions

View File

@@ -134,9 +134,19 @@ void AIntegrationGameModeBase::UpdateTangibles() {
void AIntegrationGameModeBase::ExecuteDebuggingCommand(const FString &fs) {
if (fs == "\\invokeplayer") {
// FlxLockedWrapper w(LockableWrapper);
// int64 player = w.GetActor();
// w->play_invoke_player(w.Get(), player, datapk);
DPrint(TEXT("Trying to invoke 'myfunction' in lua"));
FlxLockedWrapper w(LockableWrapper);
FlxStreamBuffer sb;
sb.write_string("myfunction");
sb.write_simple_dynamic_tag(SimpleDynamicTag::NUMBER);
sb.write_double(3.0);
sb.write_simple_dynamic_tag(SimpleDynamicTag::STRING);
sb.write_string("Howdy");
sb.write_simple_dynamic_tag(SimpleDynamicTag::BOOLEAN);
sb.write_bool(true);
std::string_view datapk = sb.view();
int64 player = w.GetActor();
w->play_invoke_engio(w.Get(), player, datapk.size(), datapk.data());
} else {
ConsoleOutput.AppendLine(TEXT("Unknown Command"));
}