Ticket #4385: aiinfluence_guiinterface_tests_v2.patch
File aiinfluence_guiinterface_tests_v2.patch, 1.4 KB (added by , 7 years ago) |
---|
-
binaries/data/mods/public/simulation/components/tests/test_GuiInterface.js
Resources = { 40 40 "food": "Food", 41 41 "metal": "Metal", 42 42 "stone": "Stone", 43 43 "wood": "Wood" 44 44 }), 45 "GetResource": () => ({}), 45 "GetResource": resource => ({ 46 "aiAnalysisInfluenceGroup": 47 resource == "food" ? "ignore" : 48 resource == "wood" ? "abundant" : "sparse" 49 }), 46 50 }; 47 51 48 52 var cmp = ConstructComponent(SYSTEM_ENTITY, "GuiInterface"); 49 53 50 54 … … TS_ASSERT_UNEVAL_EQUALS(cmp.GetSimulatio 355 359 "metal": "Metal", 356 360 "stone": "Stone", 357 361 "wood": "Wood", 358 362 }, 359 363 "aiInfluenceGroups": { 360 "food": 0,361 "metal": 0,362 "stone": 0,363 "wood": 0,364 "food": "ignore", 365 "metal": "sparse", 366 "stone": "sparse", 367 "wood": "abundant", 364 368 } 365 369 }, 366 370 }); 367 371 368 372 TS_ASSERT_UNEVAL_EQUALS(cmp.GetExtendedSimulationState(), { … … TS_ASSERT_UNEVAL_EQUALS(cmp.GetExtendedS 493 497 "metal": "Metal", 494 498 "stone": "Stone", 495 499 "wood": "Wood", 496 500 }, 497 501 "aiInfluenceGroups": { 498 "food": 0,499 "metal": 0,500 "stone": 0,501 "wood": 0,502 "food": "ignore", 503 "metal": "sparse", 504 "stone": "sparse", 505 "wood": "abundant", 502 506 } 503 507 }, 504 508 }); 505 509 506 510