Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | (unitAI, player_ent, target_ent) => { | ||||
unitAI.MoveToTargetRange = (target) => target == target_ent; | unitAI.MoveToTargetRange = (target) => target == target_ent; | ||||
unitAI.AbleToMove = () => true; | unitAI.AbleToMove = () => true; | ||||
unitAI.Garrison(target_ent, false); | unitAI.Garrison(target_ent, false); | ||||
} | } | ||||
); | ); | ||||
TestTargetEntityRenaming( | TestTargetEntityRenaming( | ||||
"INDIVIDUAL.REPAIR.REPAIRING", "INDIVIDUAL.IDLE", | "INDIVIDUAL.REPAIR.REPAIRING", "INDIVIDUAL.REPAIR.REPAIRING", | ||||
Freagarach: I'm not sure how this was ever correct,,, | |||||
(unitAI, player_ent, target_ent) => { | (unitAI, player_ent, target_ent) => { | ||||
AddMock(player_ent, IID_Builder, { | |||||
"StartRepairing": () => true, | |||||
"StopRepairing": () => {} | |||||
}); | |||||
QueryBuilderListInterface = () => {}; | QueryBuilderListInterface = () => {}; | ||||
unitAI.CheckTargetRange = () => true; | unitAI.CheckTargetRange = () => true; | ||||
unitAI.CanRepair = (target) => target == target_ent; | unitAI.CanRepair = (target) => target == target_ent; | ||||
unitAI.Repair(target_ent, false, false); | unitAI.Repair(target_ent, false, false); | ||||
} | } | ||||
); | ); | ||||
▲ Show 20 Lines • Show All 441 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
I'm not sure how this was ever correct,,,