diff --git a/source/tools/rlclient/python/samples/arcadia.json b/source/tools/rlclient/python/samples/arcadia.json index 05ff80f097..9b9f987f95 100644 --- a/source/tools/rlclient/python/samples/arcadia.json +++ b/source/tools/rlclient/python/samples/arcadia.json @@ -8,7 +8,7 @@ "VictoryConditions": [ "conquest_units" ], - "Name": "Arcadia", + "mapName": "Arcadia", "mapType": "scenario", "AISeed": 0, "Seed": 0, diff --git a/source/tools/rlclient/python/tests/test_actions.py b/source/tools/rlclient/python/tests/test_actions.py index 0faa354a52..793c0d7a11 100644 --- a/source/tools/rlclient/python/tests/test_actions.py +++ b/source/tools/rlclient/python/tests/test_actions.py @@ -53,7 +53,13 @@ def test_gather(): collect_wood = zero_ad.actions.gather([female_citizen], nearby_tree) state = game.step([collect_wood]) - while len(state.unit(female_citizen.id()).data["resourceCarrying"]) == 0: + while ( + game.evaluate( + f"Engine.QueryInterface({female_citizen.id()}, " + f"IID_ResourceGatherer).GetCarryingStatus().length" + ) + == 0 + ): state = game.step() diff --git a/source/tools/rlclient/python/tests/test_evaluate.py b/source/tools/rlclient/python/tests/test_evaluate.py index 55b0bcdcef..3316bbc6d1 100644 --- a/source/tools/rlclient/python/tests/test_evaluate.py +++ b/source/tools/rlclient/python/tests/test_evaluate.py @@ -33,9 +33,9 @@ def test_return_string(): def test_fastactions(): state = game.reset(config) game.evaluate(fastactions) - female_citizens = state.units(owner=1, type="female_citizen") + female_citizens = state.units(owner=1, entity_type="female_citizen") house_tpl = "structures/spart/house" - len(state.units(owner=1, type=house_tpl)) + len(state.units(owner=1, entity_type=house_tpl)) x = 680 z = 640 build_house = zero_ad.actions.construct(female_citizens, house_tpl, x, z, autocontinue=True) @@ -43,7 +43,7 @@ def test_fastactions(): state = game.step([build_house]) def new_house(_=None): - return state.units(owner=1, type=house_tpl)[0] + return state.units(owner=1, entity_type=house_tpl)[0] initial_health = new_house().health(ratio=True) while new_house().health(ratio=True) == initial_health: