Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_Damage.js
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | function Test_Generic() | ||||
AddMock(SYSTEM_ENTITY, IID_DelayedDamage, { | AddMock(SYSTEM_ENTITY, IID_DelayedDamage, { | ||||
"MissileHit": () => { | "MissileHit": () => { | ||||
damageTaken = true; | damageTaken = true; | ||||
}, | }, | ||||
}); | }); | ||||
Engine.PostMessage = function(ent, iid, message) | Engine.PostMessage = function(ent, iid, message) | ||||
{ | { | ||||
TS_ASSERT_UNEVAL_EQUALS({ "type": type, "target": target, "attacker": attacker, "attackerOwner": attackerOwner, "damage": damage, "capture": 0, "statusEffects": [] }, message); | TS_ASSERT_UNEVAL_EQUALS({ | ||||
"type": type, | |||||
"target": target, | |||||
"attacker": attacker, | |||||
"attackerOwner": attackerOwner, | |||||
"damage": damage, | |||||
"capture": 0, | |||||
"statusEffects": [], | |||||
"fromStatusEffect": false | |||||
}, message); | |||||
}; | }; | ||||
AddMock(target, IID_Footprint, { | AddMock(target, IID_Footprint, { | ||||
"GetShape": () => ({ "type": "circle", "radius": 20 }), | "GetShape": () => ({ "type": "circle", "radius": 20 }), | ||||
}); | }); | ||||
AddMock(attacker, IID_Ownership, { | AddMock(attacker, IID_Ownership, { | ||||
"GetOwner": () => attackerOwner, | "GetOwner": () => attackerOwner, | ||||
▲ Show 20 Lines • Show All 452 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator