Differential D4632 Diff 20181 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 94 Lines • ▼ Show 20 Lines | |||||
}); | }); | ||||
AddMock(SYSTEM_ENTITY, IID_Timer, { | AddMock(SYSTEM_ENTITY, IID_Timer, { | ||||
"GetTime": function() { return 0; }, | "GetTime": function() { return 0; }, | ||||
"SetTimeout": function(ent, iid, funcname, time, data) { return 0; } | "SetTimeout": function(ent, iid, funcname, time, data) { return 0; } | ||||
}); | }); | ||||
AddMock(100, IID_Player, { | AddMock(100, IID_Player, { | ||||
"GetName": function() { return "Player 1"; }, | |||||
"GetCiv": function() { return "gaia"; }, | |||||
"GetColor": function() { return { "r": 1, "g": 1, "b": 1, "a": 1 }; }, | "GetColor": function() { return { "r": 1, "g": 1, "b": 1, "a": 1 }; }, | ||||
"CanControlAllUnits": function() { return false; }, | "CanControlAllUnits": function() { return false; }, | ||||
"GetPopulationCount": function() { return 10; }, | "GetPopulationCount": function() { return 10; }, | ||||
"GetPopulationLimit": function() { return 20; }, | "GetPopulationLimit": function() { return 20; }, | ||||
"GetMaxPopulation": function() { return 200; }, | "GetMaxPopulation": function() { return 200; }, | ||||
"GetResourceCounts": function() { return { "food": 100 }; }, | "GetResourceCounts": function() { return { "food": 100 }; }, | ||||
"GetResourceGatherers": function() { return { "food": 1 }; }, | "GetResourceGatherers": function() { return { "food": 1 }; }, | ||||
"GetPanelEntities": function() { return []; }, | "GetPanelEntities": function() { return []; }, | ||||
Show All 10 Lines | AddMock(100, IID_Player, { | ||||
"GetDisabledTemplates": function() { return {}; }, | "GetDisabledTemplates": function() { return {}; }, | ||||
"GetDisabledTechnologies": function() { return {}; }, | "GetDisabledTechnologies": function() { return {}; }, | ||||
"CanBarter": function() { return false; }, | "CanBarter": function() { return false; }, | ||||
"GetSpyCostMultiplier": function() { return 1; }, | "GetSpyCostMultiplier": function() { return 1; }, | ||||
"HasSharedDropsites": function() { return false; }, | "HasSharedDropsites": function() { return false; }, | ||||
"HasSharedLos": function() { return false; } | "HasSharedLos": function() { return false; } | ||||
}); | }); | ||||
AddMock(100, IID_Identity, { | |||||
"GetName": function() { return "Player 1"; }, | |||||
"GetCiv": function() { return "gaia"; }, | |||||
"GetRankTechName": function() { return undefined; } | |||||
}); | |||||
AddMock(100, IID_EntityLimits, { | AddMock(100, IID_EntityLimits, { | ||||
"GetLimits": function() { return { "Foo": 10 }; }, | "GetLimits": function() { return { "Foo": 10 }; }, | ||||
"GetCounts": function() { return { "Foo": 5 }; }, | "GetCounts": function() { return { "Foo": 5 }; }, | ||||
"GetLimitChangers": function() { return { "Foo": {} }; }, | "GetLimitChangers": function() { return { "Foo": {} }; }, | ||||
"GetMatchCounts": function() { return { "Bar": 0 }; } | "GetMatchCounts": function() { return { "Bar": 0 }; } | ||||
}); | }); | ||||
AddMock(100, IID_TechnologyManager, { | AddMock(100, IID_TechnologyManager, { | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | "GetSequences": function() { | ||||
}; | }; | ||||
}, | }, | ||||
"IncreaseTrainedUnitsCounter": function() { return 1; }, | "IncreaseTrainedUnitsCounter": function() { return 1; }, | ||||
"IncreaseConstructedBuildingsCounter": function() { return 1; }, | "IncreaseConstructedBuildingsCounter": function() { return 1; }, | ||||
"IncreaseBuiltCivCentresCounter": function() { return 1; } | "IncreaseBuiltCivCentresCounter": function() { return 1; } | ||||
}); | }); | ||||
AddMock(101, IID_Player, { | AddMock(101, IID_Player, { | ||||
"GetName": function() { return "Player 2"; }, | |||||
"GetCiv": function() { return "mace"; }, | |||||
"GetColor": function() { return { "r": 1, "g": 0, "b": 0, "a": 1 }; }, | "GetColor": function() { return { "r": 1, "g": 0, "b": 0, "a": 1 }; }, | ||||
"CanControlAllUnits": function() { return true; }, | "CanControlAllUnits": function() { return true; }, | ||||
"GetPopulationCount": function() { return 40; }, | "GetPopulationCount": function() { return 40; }, | ||||
"GetPopulationLimit": function() { return 30; }, | "GetPopulationLimit": function() { return 30; }, | ||||
"GetMaxPopulation": function() { return 300; }, | "GetMaxPopulation": function() { return 300; }, | ||||
"GetResourceCounts": function() { return { "food": 200 }; }, | "GetResourceCounts": function() { return { "food": 200 }; }, | ||||
"GetResourceGatherers": function() { return { "food": 3 }; }, | "GetResourceGatherers": function() { return { "food": 3 }; }, | ||||
"GetPanelEntities": function() { return []; }, | "GetPanelEntities": function() { return []; }, | ||||
Show All 10 Lines | AddMock(101, IID_Player, { | ||||
"GetDisabledTemplates": function() { return {}; }, | "GetDisabledTemplates": function() { return {}; }, | ||||
"GetDisabledTechnologies": function() { return {}; }, | "GetDisabledTechnologies": function() { return {}; }, | ||||
"CanBarter": function() { return false; }, | "CanBarter": function() { return false; }, | ||||
"GetSpyCostMultiplier": function() { return 1; }, | "GetSpyCostMultiplier": function() { return 1; }, | ||||
"HasSharedDropsites": function() { return false; }, | "HasSharedDropsites": function() { return false; }, | ||||
"HasSharedLos": function() { return false; } | "HasSharedLos": function() { return false; } | ||||
}); | }); | ||||
AddMock(101, IID_Identity, { | |||||
"GetName": function() { return "Player 2"; }, | |||||
"GetCiv": function() { return "mace"; }, | |||||
"GetRankTechName": function() { return undefined; } | |||||
}); | |||||
AddMock(101, IID_EntityLimits, { | AddMock(101, IID_EntityLimits, { | ||||
"GetLimits": function() { return { "Bar": 20 }; }, | "GetLimits": function() { return { "Bar": 20 }; }, | ||||
"GetCounts": function() { return { "Bar": 0 }; }, | "GetCounts": function() { return { "Bar": 0 }; }, | ||||
"GetLimitChangers": function() { return { "Bar": {} }; }, | "GetLimitChangers": function() { return { "Bar": {} }; }, | ||||
"GetMatchCounts": function() { return { "Foo": 0 }; } | "GetMatchCounts": function() { return { "Foo": 0 }; } | ||||
}); | }); | ||||
AddMock(101, IID_TechnologyManager, { | AddMock(101, IID_TechnologyManager, { | ||||
▲ Show 20 Lines • Show All 387 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator