diff --git a/binaries/data/mods/public/maps/random/new_rms_test.js b/binaries/data/mods/public/maps/random/new_rms_test.js index 39d94a71e4..f8cf1c3f2c 100644 --- a/binaries/data/mods/public/maps/random/new_rms_test.js +++ b/binaries/data/mods/public/maps/random/new_rms_test.js @@ -5,6 +5,8 @@ export function* generateMap() { globalThis.g_Map = new RandomMap(0, "grass1_spring"); + yield 50; + placePlayerBases({ "PlayerPlacement": playerPlacementCircle(fractionToTiles(0.39)) }); diff --git a/binaries/data/mods/public/maps/random/tests/test_Constraint.js b/binaries/data/mods/public/maps/random/tests/test_Constraint.js index 34d300d223..3e2cdde659 100644 --- a/binaries/data/mods/public/maps/random/tests/test_Constraint.js +++ b/binaries/data/mods/public/maps/random/tests/test_Constraint.js @@ -15,6 +15,8 @@ export function* generateMap() g_MapSettings = { "Size": 512 }; globalThis.g_Map = new RandomMap(0, "blackness"); + yield 50; + const tileClass = new TileClass(g_Map.getSize()); const addedPos = new Vector2D(5, 0); diff --git a/binaries/data/mods/public/maps/random/tests/test_DiskPlacer.js b/binaries/data/mods/public/maps/random/tests/test_DiskPlacer.js index 89541c17ed..7ab065c041 100644 --- a/binaries/data/mods/public/maps/random/tests/test_DiskPlacer.js +++ b/binaries/data/mods/public/maps/random/tests/test_DiskPlacer.js @@ -47,6 +47,8 @@ export function* generateMap() TS_ASSERT(area.contains(new Vector2D(0, 0))); } + yield 50; + { // Contains points outside map disk range on CircularMap g_MapSettings = { "Size": 512, "CircularMap": true }; diff --git a/binaries/data/mods/public/maps/random/tests/test_LayeredPainter.js b/binaries/data/mods/public/maps/random/tests/test_LayeredPainter.js index 4ac5211513..b40aad995c 100644 --- a/binaries/data/mods/public/maps/random/tests/test_LayeredPainter.js +++ b/binaries/data/mods/public/maps/random/tests/test_LayeredPainter.js @@ -15,6 +15,8 @@ export function* generateMap() g_MapSettings = { "Size": 512 }; globalThis.g_Map = new RandomMap(0, "blackness"); + yield 50; + const min = new Vector2D(4, 4); const max = new Vector2D(10, 10); diff --git a/binaries/data/mods/public/maps/random/tests/test_RectPlacer.js b/binaries/data/mods/public/maps/random/tests/test_RectPlacer.js index 54d79f5fd1..00000a3bdc 100644 --- a/binaries/data/mods/public/maps/random/tests/test_RectPlacer.js +++ b/binaries/data/mods/public/maps/random/tests/test_RectPlacer.js @@ -15,6 +15,8 @@ export function* generateMap() g_MapSettings = { "Size": 512 }; globalThis.g_Map = new RandomMap(0, "blackness"); + yield 50; + const min = new Vector2D(5, 5); const max = new Vector2D(7, 7); diff --git a/binaries/data/mods/public/maps/random/tests/test_SmoothingPainter.js b/binaries/data/mods/public/maps/random/tests/test_SmoothingPainter.js index f379a3cbc0..25de852fc5 100644 --- a/binaries/data/mods/public/maps/random/tests/test_SmoothingPainter.js +++ b/binaries/data/mods/public/maps/random/tests/test_SmoothingPainter.js @@ -21,6 +21,8 @@ export function* generateMap() const minHeight = 20; const maxHeight = 25; + yield 50; + // Test SmoothingPainter { globalThis.g_Map = new RandomMap(0, "blackness"); diff --git a/binaries/data/mods/public/maps/random/tests/test_TileClass.js b/binaries/data/mods/public/maps/random/tests/test_TileClass.js index 0a6faf4d7d..07c52243bc 100644 --- a/binaries/data/mods/public/maps/random/tests/test_TileClass.js +++ b/binaries/data/mods/public/maps/random/tests/test_TileClass.js @@ -15,6 +15,8 @@ export function* generateMap() g_MapSettings = { "Size": 512 }; globalThis.g_Map = new RandomMap(0, "blackness"); + yield 50; + // Test that that it checks by value, not by reference { const tileClass = new TileClass(2); diff --git a/binaries/data/mods/public/maps/random/wall_demo.js b/binaries/data/mods/public/maps/random/wall_demo.js index 3952a7c456..58bdbb2e7e 100644 --- a/binaries/data/mods/public/maps/random/wall_demo.js +++ b/binaries/data/mods/public/maps/random/wall_demo.js @@ -5,6 +5,8 @@ export function* generateMap() { globalThis.g_Map = new RandomMap(0, "grass1"); + yield 50; + /** * Demonstration code for wall placement. * diff --git a/eslint.config.mjs b/eslint.config.mjs index 2663892791..89c6c6a70a 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -82,6 +82,7 @@ const configEslintRecommended = { "no-useless-escape": "warn", "no-with": "warn", "use-isnan": "warn", + "require-yield": "warn", "valid-typeof": "warn", } };