Differential D1240 Diff 6012 binaries/data/mods/public/simulation/components/tests/test_GuiInterface.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_GuiInterface.js
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | return { | ||||
"buy": { "food": 150 }, | "buy": { "food": 150 }, | ||||
"sell": { "food": 25 } | "sell": { "food": 25 } | ||||
}; | }; | ||||
}, | }, | ||||
PlayerHasMarket: function () { return false; } | PlayerHasMarket: function () { return false; } | ||||
}); | }); | ||||
AddMock(SYSTEM_ENTITY, IID_EndGameManager, { | AddMock(SYSTEM_ENTITY, IID_EndGameManager, { | ||||
GetGameType: function() { return "conquest"; }, | GetVictoryConditions: () => ["conquest", "wonder"], | ||||
elexis: could buy some quotes and arrow functions for the changed lines | |||||
Not Done Inline Actionsbump elexis: bump | |||||
GetAlliedVictory: function() { return false; } | GetAlliedVictory: function() { return false; } | ||||
}); | }); | ||||
AddMock(SYSTEM_ENTITY, IID_PlayerManager, { | AddMock(SYSTEM_ENTITY, IID_PlayerManager, { | ||||
GetNumPlayers: function() { return 2; }, | GetNumPlayers: function() { return 2; }, | ||||
GetPlayerByID: function(id) { TS_ASSERT(id === 0 || id === 1); return 100+id; } | GetPlayerByID: function(id) { TS_ASSERT(id === 0 || id === 1); return 100+id; } | ||||
}); | }); | ||||
▲ Show 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | players: [ | ||||
vegetarianFood: 0 | vegetarianFood: 0 | ||||
}, | }, | ||||
percentMapExplored: 10 | percentMapExplored: 10 | ||||
} | } | ||||
} | } | ||||
], | ], | ||||
circularMap: false, | circularMap: false, | ||||
timeElapsed: 0, | timeElapsed: 0, | ||||
gameType: "conquest", | "victoryConditions": ["conquest", "wonder"], | ||||
alliedVictory: false | alliedVictory: false | ||||
}); | }); | ||||
TS_ASSERT_UNEVAL_EQUALS(cmp.GetExtendedSimulationState(), { | TS_ASSERT_UNEVAL_EQUALS(cmp.GetExtendedSimulationState(), { | ||||
"players": [ | "players": [ | ||||
{ | { | ||||
"name": "Player 1", | "name": "Player 1", | ||||
"civ": "gaia", | "civ": "gaia", | ||||
▲ Show 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | "players": [ | ||||
"teamPercentMapControlled": [0, 10], | "teamPercentMapControlled": [0, 10], | ||||
"peakPercentOfMapControlled": [0, 10], | "peakPercentOfMapControlled": [0, 10], | ||||
"teamPeakPercentOfMapControlled": [0, 10] | "teamPeakPercentOfMapControlled": [0, 10] | ||||
} | } | ||||
} | } | ||||
], | ], | ||||
"circularMap": false, | "circularMap": false, | ||||
"timeElapsed": 0, | "timeElapsed": 0, | ||||
"gameType": "conquest", | "victoryConditions": ["conquest", "wonder"], | ||||
"alliedVictory": false | "alliedVictory": false | ||||
}); | }); | ||||
AddMock(10, IID_Builder, { | AddMock(10, IID_Builder, { | ||||
GetEntitiesList: function() { | GetEntitiesList: function() { | ||||
return ["test1", "test2"]; | return ["test1", "test2"]; | ||||
}, | }, | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
could buy some quotes and arrow functions for the changed lines