Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_Foundation.js
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | AddMock(foundationEnt, IID_Health, { | ||||
"Increase": hp => { | "Increase": hp => { | ||||
foundationHP = Math.min(foundationHP + hp, maxHP); | foundationHP = Math.min(foundationHP + hp, maxHP); | ||||
cmpFoundation.OnHealthChanged(); | cmpFoundation.OnHealthChanged(); | ||||
}, | }, | ||||
}); | }); | ||||
AddMock(foundationEnt, IID_Obstruction, { | AddMock(foundationEnt, IID_Obstruction, { | ||||
"GetBlockMovementFlag": () => true, | "GetBlockMovementFlag": () => true, | ||||
"GetUnitCollisions": () => [], | "GetEntityCollisions": () => [], | ||||
"SetDisableBlockMovementPathfinding": () => {}, | "SetDisableBlockMovementPathfinding": () => {}, | ||||
}); | }); | ||||
AddMock(foundationEnt, IID_Ownership, { | AddMock(foundationEnt, IID_Ownership, { | ||||
"GetOwner": () => player, | "GetOwner": () => player, | ||||
}); | }); | ||||
AddMock(foundationEnt, IID_Position, { | AddMock(foundationEnt, IID_Position, { | ||||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator