Victory conditions are not set for autostart games.
The changes to the ai are not part of the patch, only for test purposes.
Differential D1278
fix autostart for missing GameType mimo on Feb 3 2018, 5:52 PM. Authored by
Details
Victory conditions are not set for autostart games. The changes to the ai are not part of the patch, only for test purposes. Set a regicide autostart game, for example with ./pyrogenesis -autostart='random/mainland' -autostart-ai=1:petra -autostart-ai=2:petra -autostart-aidiff=1:5 -autostart-aidiff=2:5 -autostart-nonvisual -autostart-victory="regicide" Without the GameSetup.cpp changes, the gametype transfered to petra is the default conquest, no heroes are spawned and the game never stop.
Diff Detail
Event TimelineComment Actions Didn't test, hope for the best.
Comment Actions Successful build - Chance fights ever on the side of the prudent. Updating workspaces... Build (release)... Build (debug)... Running release tests... Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK! Checking XML files... Comment Actions Executing section Default... Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 0. |----| | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/ai/common-api/shared.js | |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/ai/common-api/shared.js | 74| 74| this.timeElapsed = state.timeElapsed; | 75| 75| this.circularMap = state.circularMap; | 76| 76| this.mapSize = state.mapSize; | 77| |-warn("petra victory " + state.gameType); | | 77|+ warn("petra victory " + state.gameType); | 78| 78| this.victoryConditions = new Set([state.gameType]); | 79| 79| this.alliedVictory = state.alliedVictory; | 80| 80| this.ceasefireActive = state.ceasefireActive; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 0. |----| | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/ai/common-api/shared.js | |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/ai/common-api/shared.js | 89| 89| error("AI shared component inconsistent sizes: map=" + this.mapSize + " while territory=" + this.territoryMap.width); | 90| 90| this.territoryMap.cellSize = this.mapSize / this.territoryMap.width; | 91| 91| | 92| |-/* | | 92|+ /* | 93| 93| let landPassMap = new Uint8Array(this.passabilityMap.data.length); | 94| 94| let waterPassMap = new Uint8Array(this.passabilityMap.data.length); | 95| 95| let obstructionMaskLand = this.passabilityClasses["default-terrain-only"]; | | [NORMAL] ESLintBear (comma-spacing): | | A space is required after ','. |----| | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/ai/common-api/shared.js | |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/ai/common-api/shared.js | 132| 132| for (let player of this._players) | 133| 133| { | 134| 134| this.gameState[player] = new m.GameState(); | 135| |- this.gameState[player].init(this,state, player); | | 135|+ this.gameState[player].init(this, state, player); | 136| 136| } | 137| 137| }; | 138| 138| | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'for-of'. |----| | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/ai/common-api/shared.js | |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/ai/common-api/shared.js | 201| 201| } | 202| 202| | 203| 203| for (let evt of state.events.EntityRenamed) | 204| |- { // Switch the metadata: TODO entityCollections are updated only because of the owner change. Should be done properly | | 204|+ // Switch the metadata: TODO entityCollections are updated only because of the owner change. Should be done properly | 205| 205| for (let player of this._players) | 206| 206| { | 207| 207| this._entityMetadata[player][evt.newentity] = this._entityMetadata[player][evt.entity]; | 208| 208| this._entityMetadata[player][evt.entity] = {}; | 209| 209| } | 210| |- } | | 210|+ | 211| 211| | 212| 212| for (let evt of state.events.TrainingFinished) | 213| 213| { // Apply metadata stored in training queues | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'for-of'. |----| | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/ai/common-api/shared.js | |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/ai/common-api/shared.js | 210| 210| } | 211| 211| | 212| 212| for (let evt of state.events.TrainingFinished) | 213| |- { // Apply metadata stored in training queues | | 213|+ // Apply metadata stored in training queues | 214| 214| for (let entId of evt.entities) | 215| 215| if (this._entities.has(entId)) | 216| 216| for (let key in e |