From 5f26da01f18f8073c27bd3ce461af3803069192b Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 17 Aug 2024 15:09:00 +0200 Subject: [PATCH] Use the_hub addon from example suite by the integration tests --- .../data/integration_tests/test_lua_api/player.lua | 14 +++++++------- .../data/integration_tests/test_lua_api/test.lua | 2 +- scripts/integration_tests.py | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/data/integration_tests/test_lua_api/player.lua b/scripts/data/integration_tests/test_lua_api/player.lua index 1da817e495..10d7fcf092 100644 --- a/scripts/data/integration_tests/test_lua_api/player.lua +++ b/scripts/data/integration_tests/test_lua_api/player.lua @@ -159,8 +159,8 @@ testing.registerLocalTest('playerDiagonalWalking', testing.registerLocalTest('findPath', function() - local src = util.vector3(4096, 4096, 867.237) - local dst = util.vector3(4500, 4500, 700.216) + local src = util.vector3(4096, 4096, 1745) + local dst = util.vector3(4500, 4500, 1745.95263671875) local options = { agentBounds = types.Actor.getPathfindingAgentBounds(self), includeFlags = nearby.NAVIGATOR_FLAGS.Walk + nearby.NAVIGATOR_FLAGS.Swim, @@ -180,7 +180,7 @@ testing.registerLocalTest('findPath', testing.registerLocalTest('findRandomPointAroundCircle', function() - local position = util.vector3(4096, 4096, 867.237) + local position = util.vector3(4096, 4096, 1745.95263671875) local maxRadius = 100 local options = { agentBounds = types.Actor.getPathfindingAgentBounds(self), @@ -193,8 +193,8 @@ testing.registerLocalTest('findRandomPointAroundCircle', testing.registerLocalTest('castNavigationRay', function() - local src = util.vector3(4096, 4096, 867.237) - local dst = util.vector3(4500, 4500, 700.216) + local src = util.vector3(4096, 4096, 1745) + local dst = util.vector3(4500, 4500, 1745.95263671875) local options = { agentBounds = types.Actor.getPathfindingAgentBounds(self), includeFlags = nearby.NAVIGATOR_FLAGS.Walk + nearby.NAVIGATOR_FLAGS.Swim, @@ -206,14 +206,14 @@ testing.registerLocalTest('castNavigationRay', testing.registerLocalTest('findNearestNavMeshPosition', function() - local position = util.vector3(4096, 4096, 1000) + local position = util.vector3(4096, 4096, 2000) local options = { agentBounds = types.Actor.getPathfindingAgentBounds(self), includeFlags = nearby.NAVIGATOR_FLAGS.Walk + nearby.NAVIGATOR_FLAGS.Swim, searchAreaHalfExtents = util.vector3(1000, 1000, 1000), } local result = nearby.findNearestNavMeshPosition(position, options) - local expected = util.vector3(4096, 4096, 872.674) + local expected = util.vector3(4096, 4096, 1746.27099609375) testing.expectLessOrEqual((result - expected):length(), 1, 'Navigation mesh position ' .. testing.formatActualExpected(result, expected)) end) diff --git a/scripts/data/integration_tests/test_lua_api/test.lua b/scripts/data/integration_tests/test_lua_api/test.lua index 86fb8e904c..726bbb9ad0 100644 --- a/scripts/data/integration_tests/test_lua_api/test.lua +++ b/scripts/data/integration_tests/test_lua_api/test.lua @@ -220,7 +220,7 @@ local function testMemoryLimit() end local function initPlayer() - player:teleport('', util.vector3(4096, 4096, 867.237), util.transform.identity) + player:teleport('', util.vector3(4096, 4096, 1745), util.transform.identity) coroutine.yield() end diff --git a/scripts/integration_tests.py b/scripts/integration_tests.py index 9e04ff52df..17f89fbe2f 100755 --- a/scripts/integration_tests.py +++ b/scripts/integration_tests.py @@ -21,6 +21,7 @@ example_suite_dir = Path(args.example_suite).resolve() content_paths = ( example_suite_dir / "game_template" / "data" / "template.omwgame", example_suite_dir / "example_animated_creature" / "data" / "landracer.omwaddon", + example_suite_dir / "the_hub" / "data" / "the_hub.omwaddon", ) for path in content_paths: if not path.is_file():