Differential D2919 Diff 13674 ps/trunk/binaries/data/mods/public/simulation/components/tests/test_GuiInterface.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/tests/test_GuiInterface.js
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
AddMock(SYSTEM_ENTITY, IID_Barter, { | AddMock(SYSTEM_ENTITY, IID_Barter, { | ||||
"GetPrices": function() { | "GetPrices": function() { | ||||
return { | return { | ||||
"buy": { "food": 150 }, | "buy": { "food": 150 }, | ||||
"sell": { "food": 25 } | "sell": { "food": 25 } | ||||
}; | }; | ||||
}, | } | ||||
"PlayerHasMarket": function() { return false; } | |||||
}); | }); | ||||
AddMock(SYSTEM_ENTITY, IID_EndGameManager, { | AddMock(SYSTEM_ENTITY, IID_EndGameManager, { | ||||
"GetVictoryConditions": () => ["conquest", "wonder"], | "GetVictoryConditions": () => ["conquest", "wonder"], | ||||
"GetAlliedVictory": function() { return false; } | "GetAlliedVictory": function() { return false; } | ||||
}); | }); | ||||
AddMock(SYSTEM_ENTITY, IID_PlayerManager, { | AddMock(SYSTEM_ENTITY, IID_PlayerManager, { | ||||
Show All 34 Lines | AddMock(100, IID_Player, { | ||||
"GetCheatsEnabled": function() { return false; }, | "GetCheatsEnabled": function() { return false; }, | ||||
"GetDiplomacy": function() { return [-1, 1]; }, | "GetDiplomacy": function() { return [-1, 1]; }, | ||||
"IsAlly": function() { return false; }, | "IsAlly": function() { return false; }, | ||||
"IsMutualAlly": function() { return false; }, | "IsMutualAlly": function() { return false; }, | ||||
"IsNeutral": function() { return false; }, | "IsNeutral": function() { return false; }, | ||||
"IsEnemy": function() { return true; }, | "IsEnemy": function() { return true; }, | ||||
"GetDisabledTemplates": function() { return {}; }, | "GetDisabledTemplates": function() { return {}; }, | ||||
"GetDisabledTechnologies": function() { return {}; }, | "GetDisabledTechnologies": function() { return {}; }, | ||||
"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_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 }; }, | ||||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | AddMock(101, IID_Player, { | ||||
"GetCheatsEnabled": function() { return false; }, | "GetCheatsEnabled": function() { return false; }, | ||||
"GetDiplomacy": function() { return [-1, 1]; }, | "GetDiplomacy": function() { return [-1, 1]; }, | ||||
"IsAlly": function() { return true; }, | "IsAlly": function() { return true; }, | ||||
"IsMutualAlly": function() {return false; }, | "IsMutualAlly": function() {return false; }, | ||||
"IsNeutral": function() { return false; }, | "IsNeutral": function() { return false; }, | ||||
"IsEnemy": function() { return false; }, | "IsEnemy": function() { return false; }, | ||||
"GetDisabledTemplates": function() { return {}; }, | "GetDisabledTemplates": function() { return {}; }, | ||||
"GetDisabledTechnologies": function() { return {}; }, | "GetDisabledTechnologies": function() { return {}; }, | ||||
"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_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 }; }, | ||||
▲ Show 20 Lines • Show All 388 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator