Page MenuHomeWildfire Games

Missing tileclass in archipelago
Needs ReviewPublic

Authored by smiley on Jan 3 2019, 7:08 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This would cause fishes to be spawned on land under a specific set of conditions. Cases where the concerned land is not painted clPlayer for example (which fish also avoids). Occurring in nomad mode.

Test Plan

.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 6679
Build 10996: Vulcan BuildJenkins
Build 10995: arc lint + arc unit

Event Timeline

smiley created this revision.Jan 3 2019, 7:08 PM
Owners added a subscriber: Restricted Owners Package.Jan 3 2019, 7:08 PM
Vulcan added a subscriber: Vulcan.Jan 3 2019, 7:10 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 152| 152| 
| 153| 153| var [forestTrees, stragglerTrees] = getTreeCounts(...rBiomeTreeCount(1));
| 154| 154| createForests(
| 155|    |- [tMainTerrain, tForestFloor1, tForestFloor2, pForest1, pForest2],
|    | 155|+	[tMainTerrain, tForestFloor1, tForestFloor2, pForest1, pForest2],
| 156| 156|  [avoidClasses(clPlayer, 20, clForest, 17, clHill, 0), stayClasses(clLand, 4)],
| 157| 157|  clForest,
| 158| 158|  forestTrees);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 153| 153| var [forestTrees, stragglerTrees] = getTreeCounts(...rBiomeTreeCount(1));
| 154| 154| createForests(
| 155| 155|  [tMainTerrain, tForestFloor1, tForestFloor2, pForest1, pForest2],
| 156|    |- [avoidClasses(clPlayer, 20, clForest, 17, clHill, 0), stayClasses(clLand, 4)],
|    | 156|+	[avoidClasses(clPlayer, 20, clForest, 17, clHill, 0), stayClasses(clLand, 4)],
| 157| 157|  clForest,
| 158| 158|  forestTrees);
| 159| 159| Engine.SetProgress(50);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 154| 154| createForests(
| 155| 155|  [tMainTerrain, tForestFloor1, tForestFloor2, pForest1, pForest2],
| 156| 156|  [avoidClasses(clPlayer, 20, clForest, 17, clHill, 0), stayClasses(clLand, 4)],
| 157|    |- clForest,
|    | 157|+	clForest,
| 158| 158|  forestTrees);
| 159| 159| Engine.SetProgress(50);
| 160| 160| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 155| 155|  [tMainTerrain, tForestFloor1, tForestFloor2, pForest1, pForest2],
| 156| 156|  [avoidClasses(clPlayer, 20, clForest, 17, clHill, 0), stayClasses(clLand, 4)],
| 157| 157|  clForest,
| 158|    |- forestTrees);
|    | 158|+	forestTrees);
| 159| 159| Engine.SetProgress(50);
| 160| 160| 
| 161| 161| g_Map.log("Creating dirt patches");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 160| 160| 
| 161| 161| g_Map.log("Creating dirt patches");
| 162| 162| createLayeredPatches(
| 163|    |- [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)],
|    | 163|+	[scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)],
| 164| 164|  [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
| 165| 165|  [1,1],
| 166| 166|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 161| 161| g_Map.log("Creating dirt patches");
| 162| 162| createLayeredPatches(
| 163| 163|  [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)],
| 164|    |- [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
|    | 164|+	[[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
| 165| 165|  [1,1],
| 166| 166|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 167| 167|  scaleByMapSize(15, 45),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 161| 161| g_Map.log("Creating dirt patches");
| 162| 162| createLayeredPatches(
| 163| 163|  [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)],
| 164|    |- [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
|    | 164|+ [[tMainTerrain, tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
| 165| 165|  [1,1],
| 166| 166|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 167| 167|  scaleByMapSize(15, 45),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 161| 161| g_Map.log("Creating dirt patches");
| 162| 162| createLayeredPatches(
| 163| 163|  [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)],
| 164|    |- [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
|    | 164|+ [[tMainTerrain,tTier1Terrain], [tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
| 165| 165|  [1,1],
| 166| 166|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 167| 167|  scaleByMapSize(15, 45),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 161| 161| g_Map.log("Creating dirt patches");
| 162| 162| createLayeredPatches(
| 163| 163|  [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)],
| 164|    |- [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
|    | 164|+ [[tMainTerrain,tTier1Terrain],[tTier1Terrain, tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
| 165| 165|  [1,1],
| 166| 166|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 167| 167|  scaleByMapSize(15, 45),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 161| 161| g_Map.log("Creating dirt patches");
| 162| 162| createLayeredPatches(
| 163| 163|  [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)],
| 164|    |- [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
|    | 164|+ [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain, tTier3Terrain]],
| 165| 165|  [1,1],
| 166| 166|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 167| 167|  scaleByMapSize(15, 45),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 162| 162| createLayeredPatches(
| 163| 163|  [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)],
| 164| 164|  [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
| 165|    |- [1,1],
|    | 165|+	[1,1],
| 166| 166|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 167| 167|  scaleByMapSize(15, 45),
| 168| 168|  clDirt);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 162| 162| createLayeredPatches(
| 163| 163|  [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)],
| 164| 164|  [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
| 165|    |- [1,1],
|    | 165|+ [1, 1],
| 166| 166|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 167| 167|  scaleByMapSize(15, 45),
| 168| 168|  clDirt);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 163| 163|  [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)],
| 164| 164|  [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
| 165| 165|  [1,1],
| 166|    |- [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
|    | 166|+	[avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 167| 167|  scaleByMapSize(15, 45),
| 168| 168|  clDirt);
| 169| 169| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 164| 164|  [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]],
| 165| 165|  [1,1],
| 166| 166|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 167|    |- scaleByMapSize(15, 45),
|    | 167|+	scaleByMapSize(15, 45),
| 168| 168|  clDirt);
| 169| 169| 
| 170| 170| g_Map.log("Creating grass patches");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 165| 165|  [1,1],
| 166| 166|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 167| 167|  scaleByMapSize(15, 45),
| 168|    |- clDirt);
|    | 168|+	clDirt);
| 169| 169| 
| 170| 170| g_Map.log("Creating grass patches");
| 171| 171| createPatches(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 169| 169| 
| 170| 170| g_Map.log("Creating grass patches");
| 171| 171| createPatches(
| 172|    |- [scaleByMapSize(2, 4), scaleByMapSize(3, 7), scaleByMapSize(5, 15)],
|    | 172|+	[scaleByMapSize(2, 4), scaleByMapSize(3, 7), scaleByMapSize(5, 15)],
| 173| 173|  tTier4Terrain,
| 174| 174|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 175| 175|  scaleByMapSize(15, 45),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 170| 170| g_Map.log("Creating grass patches");
| 171| 171| createPatches(
| 172| 172|  [scaleByMapSize(2, 4), scaleByMapSize(3, 7), scaleByMapSize(5, 15)],
| 173|    |- tTier4Terrain,
|    | 173|+	tTier4Terrain,
| 174| 174|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 175| 175|  scaleByMapSize(15, 45),
| 176| 176|  clDirt);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 171| 171| createPatches(
| 172| 172|  [scaleByMapSize(2, 4), scaleByMapSize(3, 7), scaleByMapSize(5, 15)],
| 173| 173|  tTier4Terrain,
| 174|    |- [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
|    | 174|+	[avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 175| 175|  scaleByMapSize(15, 45),
| 176| 176|  clDirt);
| 177| 177| Engine.SetProgress(55);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 172| 172|  [scaleByMapSize(2, 4), scaleByMapSize(3, 7), scaleByMapSize(5, 15)],
| 173| 173|  tTier4Terrain,
| 174| 174|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 175|    |- scaleByMapSize(15, 45),
|    | 175|+	scaleByMapSize(15, 45),
| 176| 176|  clDirt);
| 177| 177| Engine.SetProgress(55);
| 178| 178| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 173| 173|  tTier4Terrain,
| 174| 174|  [avoidClasses(clForest, 0, clHill, 0, clDirt, 3, clPlayer, 12), stayClasses(clLand, 7)],
| 175| 175|  scaleByMapSize(15, 45),
| 176|    |- clDirt);
|    | 176|+	clDirt);
| 177| 177| Engine.SetProgress(55);
| 178| 178| 
| 179| 179| g_Map.log("Creating stone mines");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 178| 178| 
| 179| 179| g_Map.log("Creating stone mines");
| 180| 180| createMines(
| 181|    |- [
|    | 181|+	[
| 182| 182|   [new SimpleObject(oStoneSmall, 0, 2, 0, 4, 0, 2 * Math.PI, 1), new SimpleObject(oStoneLarge, 1, 1, 0, 4, 0, 2 * Math.PI, 4)],
| 183| 183|   [new SimpleObject(oStoneSmall, 2,5, 1,3)]
| 184| 184|  ],
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 2 spaces.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 179| 179| g_Map.log("Creating stone mines");
| 180| 180| createMines(
| 181| 181|  [
| 182|    |-  [new SimpleObject(oStoneSmall, 0, 2, 0, 4, 0, 2 * Math.PI, 1), new SimpleObject(oStoneLarge, 1, 1, 0, 4, 0, 2 * Math.PI, 4)],
|    | 182|+		[new SimpleObject(oStoneSmall, 0, 2, 0, 4, 0, 2 * Math.PI, 1), new SimpleObject(oStoneLarge, 1, 1, 0, 4, 0, 2 * Math.PI, 4)],
| 183| 183|   [new SimpleObject(oStoneSmall, 2,5, 1,3)]
| 184| 184|  ],
| 185| 185|  [avoidClasses(clForest, 1, clPlayer, 7, clRock, 10, clHill, 1), stayClasses(clLand, 6)],
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 2 spaces.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 180| 180| createMines(
| 181| 181|  [
| 182| 182|   [new SimpleObject(oStoneSmall, 0, 2, 0, 4, 0, 2 * Math.PI, 1), new SimpleObject(oStoneLarge, 1, 1, 0, 4, 0, 2 * Math.PI, 4)],
| 183|    |-  [new SimpleObject(oStoneSmall, 2,5, 1,3)]
|    | 183|+		[new SimpleObject(oStoneSmall, 2,5, 1,3)]
| 184| 184|  ],
| 185| 185|  [avoidClasses(clForest, 1, clPlayer, 7, clRock, 10, clHill, 1), stayClasses(clLand, 6)],
| 186| 186|  clRock
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 180| 180| createMines(
| 181| 181|  [
| 182| 182|   [new SimpleObject(oStoneSmall, 0, 2, 0, 4, 0, 2 * Math.PI, 1), new SimpleObject(oStoneLarge, 1, 1, 0, 4, 0, 2 * Math.PI, 4)],
| 183|    |-  [new SimpleObject(oStoneSmall, 2,5, 1,3)]
|    | 183|+  [new SimpleObject(oStoneSmall, 2, 5, 1,3)]
| 184| 184|  ],
| 185| 185|  [avoidClasses(clForest, 1, clPlayer, 7, clRock, 10, clHill, 1), stayClasses(clLand, 6)],
| 186| 186|  clRock
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 180| 180| createMines(
| 181| 181|  [
| 182| 182|   [new SimpleObject(oStoneSmall, 0, 2, 0, 4, 0, 2 * Math.PI, 1), new SimpleObject(oStoneLarge, 1, 1, 0, 4, 0, 2 * Math.PI, 4)],
| 183|    |-  [new SimpleObject(oStoneSmall, 2,5, 1,3)]
|    | 183|+  [new SimpleObject(oStoneSmall, 2,5, 1, 3)]
| 184| 184|  ],
| 185| 185|  [avoidClasses(clForest, 1, clPlayer, 7, clRock, 10, clHill, 1), stayClasses(clLand, 6)],
| 186| 186|  clRock
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 181| 181|  [
| 182| 182|   [new SimpleObject(oStoneSmall, 0, 2, 0, 4, 0, 2 * Math.PI, 1), new SimpleObject(oStoneLarge, 1, 1, 0, 4, 0, 2 * Math.PI, 4)],
| 183| 183|   [new SimpleObject(oStoneSmall, 2,5, 1,3)]
| 184|    |- ],
|    | 184|+	],
| 185| 185|  [avoidClasses(clForest, 1, clPlayer, 7, clRock, 10, clHill, 1), stayClasses(clLand, 6)],
| 186| 186|  clRock
| 187| 187| );
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 182| 182|   [new SimpleObject(oStoneSmall, 0, 2, 0, 4, 0, 2 * Math.PI, 1), new SimpleObject(oStoneLarge, 1, 1, 0, 4, 0, 2 * Math.PI, 4)],
| 183| 183|   [new SimpleObject(oStoneSmall, 2,5, 1,3)]
| 184| 184|  ],
| 185|    |- [avoidClasses(clForest, 1, clPlayer, 7, clRock, 10, clHill, 1), stayClasses(clLand, 6)],
|    | 185|+	[avoidClasses(clForest, 1, clPlayer, 7, clRock, 10, clHill, 1), stayClasses(clLand, 6)],
| 186| 186|  clRock
| 187| 187| );
| 188| 188| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 183| 183|   [new SimpleObject(oStoneSmall, 2,5, 1,3)]
| 184| 184|  ],
| 185| 185|  [avoidClasses(clForest, 1, clPlayer, 7, clRock, 10, clHill, 1), stayClasses(clLand, 6)],
| 186|    |- clRock
|    | 186|+	clRock
| 187| 187| );
| 188| 188| 
| 189| 189| g_Map.log("Creating metal mines");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 188| 188| 
| 189| 189| g_Map.log("Creating metal mines");
| 190| 190| createMines(
| 191|    |- [
|    | 191|+	[
| 192| 192|   [new SimpleObject(oMetalLarge, 1,1, 0,4)]
| 193| 193|  ],
| 194| 194|  [avoidClasses(clForest, 1, clPlayer, 7, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 6)],
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 2 spaces.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 189| 189| g_Map.log("Creating metal mines");
| 190| 190| createMines(
| 191| 191|  [
| 192|    |-  [new SimpleObject(oMetalLarge, 1,1, 0,4)]
|    | 192|+		[new SimpleObject(oMetalLarge, 1,1, 0,4)]
| 193| 193|  ],
| 194| 194|  [avoidClasses(clForest, 1, clPlayer, 7, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 6)],
| 195| 195|  clMetal
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 189| 189| g_Map.log("Creating metal mines");
| 190| 190| createMines(
| 191| 191|  [
| 192|    |-  [new SimpleObject(oMetalLarge, 1,1, 0,4)]
|    | 192|+  [new SimpleObject(oMetalLarge, 1, 1, 0,4)]
| 193| 193|  ],
| 194| 194|  [avoidClasses(clForest, 1, clPlayer, 7, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 6)],
| 195| 195|  clMetal
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 189| 189| g_Map.log("Creating metal mines");
| 190| 190| createMines(
| 191| 191|  [
| 192|    |-  [new SimpleObject(oMetalLarge, 1,1, 0,4)]
|    | 192|+  [new SimpleObject(oMetalLarge, 1,1, 0, 4)]
| 193| 193|  ],
| 194| 194|  [avoidClasses(clForest, 1, clPlayer, 7, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 6)],
| 195| 195|  clMetal
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 190| 190| createMines(
| 191| 191|  [
| 192| 192|   [new SimpleObject(oMetalLarge, 1,1, 0,4)]
| 193|    |- ],
|    | 193|+	],
| 194| 194|  [avoidClasses(clForest, 1, clPlayer, 7, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 6)],
| 195| 195|  clMetal
| 196| 196| );
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 191| 191|  [
| 192| 192|   [new SimpleObject(oMetalLarge, 1,1, 0,4)]
| 193| 193|  ],
| 194|    |- [avoidClasses(clForest, 1, clPlayer, 7, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 6)],
|    | 194|+	[avoidClasses(clForest, 1, clPlayer, 7, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 6)],
| 195| 195|  clMetal
| 196| 196| );
| 197| 197| Engine.SetProgress(65);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 1 space.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/maps/random/archipelago.js
| 192| 192|   [new SimpleObject(oMetalLarge, 1,1, 0,4)]
| 193| 193|  ],
| 194| 194|  [avoidClasses(clForest, 1, clPlayer, 7, clMetal, 10, clRock, 5, clHill, 1), stayClasses(clLand, 6)],
| 195|    |- clMetal
|    | 195|+	clMetal
| 196| 196| );
| 197| 197| Engine.SetProgress(65);
| 198| 198| 
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/893/

elexis added a subscriber: FeXoR.Jan 7 2019, 2:55 PM

I am like 93.24% sure this issue would exist in another form in at least one other map.

elexis added a subscriber: elexis.Jan 15 2019, 3:15 PM

One can test the correctness of constraints by painting every tile red that matches the Constraint of the fish. (createArea(new MapBoundsPlacer(), new TerrainPainter("red"), constraint);)

Occurring in nomad mode

If my memory doesn't fail me, it also happens in non-nomad mode.

Not all maps have the same connotation for clPlayer:

  • Sometimes it's only the CC footprint
  • sometimes it's something like a clump of 12 tiles around the CC
    • sometimes it's a starting player island area

These differences are problematic, easy to introduce bugs when changing the same function of multiple files involving these tileclasses. I think this bugfix is an example of this class of bugs.
The most common connotation is the clump around the CC. This area should be left empty of random resources (except starting resources), so that the players have space to build their initial base and don't get too many resource imbalances in their starting territory.

rP20476 changed the clPlayer connotation from the uncommon island-area to the more common starting clump-around-cc area and might have reintroduced this bug in both nomad and nonnomad mode.
Making clPlayer more consistent was right. Just the previous bugfix from rP18870 should have used your patch.

In D1729#70264, @smiley wrote:

I am like 93.24% sure this issue would exist in another form in at least one other map.

Caledonian Meadows had some unconventional fish placement IIRC, but I don't recall any second random map with this problem.
See also 3746#comment:5:

This is the only random map script affected by this bug. Every other map either places the clWater / clLand class correctly (i.e. for exactly the tiles that are water/land) or also avoid the clPlayer class which on those maps stands for the initial player base terrain.

So it looks like your patch is correct, but the previous bugfix, the clPlayer constraint is useless for the fish if the connotation of clLand is changed to actually encompass all land.

Now notice that changing the connotation of clLand to encompass all land actually reverts the intentional change to archipelago in rP20476.
Before that commit, the trees were too far away from the starting base, which forced the map (normal size 4v4) to only have wood in the middle which can be taken by one player and the remaining 7 players then have no wood, some of them on deserted islands.
The commit moved the trees and other resources closer to the CC by removing clLand from the initial player island area.

General Conclusion: Having inconsistent code leads to a mess with bugs where each commit is just the next workaround, making it only worse if not reversed, which is why I mention such things, even if it's only one line changed. Superficial views on oneline fixes that seem to work is different from ruling out unintended consequences of a patch, whereas looking at every indirect consequence of the affected stack and looking up revision history with time allows to find such systematic mistakes and antipatterns. So the conclusion is blablabla, I write long stories for short patches that noone (maybe except you) cares about and people seem to just think I'm exaggerating or even being uncooperative by pointing it out.

Conclusion about the fate of the patch: If I read the code correctly and it reintroduces this "center-only-forest" phenomenon, the distances of the resources should be modified. (I guess the massive wood treasure players get on this map is still justified as some players can still be islanders and it's supposed to have lots of water, regional lacks of wood.)

Thanks for the patch, so far, this fish on land is annoying as a player.

binaries/data/mods/public/maps/random/archipelago.js
251

fish constraint^