Differential D3230 Diff 15723 ps/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
TestTargetEntityRenaming( | TestTargetEntityRenaming( | ||||
"INDIVIDUAL.GARRISON.APPROACHING", "INDIVIDUAL.IDLE", | "INDIVIDUAL.GARRISON.APPROACHING", "INDIVIDUAL.IDLE", | ||||
(unitAI, player_ent, target_ent) => { | (unitAI, player_ent, target_ent) => { | ||||
unitAI.CanGarrison = (target) => target == target_ent; | unitAI.CanGarrison = (target) => target == target_ent; | ||||
unitAI.MoveToGarrisonRange = (target) => target == target_ent; | unitAI.MoveToGarrisonRange = (target) => target == target_ent; | ||||
unitAI.AbleToMove = () => true; | unitAI.AbleToMove = () => true; | ||||
AddMock(target_ent, IID_GarrisonHolder, { | AddMock(target_ent, IID_GarrisonHolder, { | ||||
"GetLoadingRange": () => ({ "max": 100, "min": 0 }), | |||||
"CanPickup": () => false | "CanPickup": () => false | ||||
}); | }); | ||||
unitAI.Garrison(target_ent, false); | unitAI.Garrison(target_ent, false); | ||||
} | } | ||||
); | ); | ||||
TestTargetEntityRenaming( | TestTargetEntityRenaming( | ||||
▲ Show 20 Lines • Show All 375 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator