Differential D2376 Diff 14547 binaries/data/mods/public/simulation/components/tests/test_Garrisonable.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_Garrisonable.js
- This file was added.
Engine.LoadComponentScript("interfaces/Garrisonable.js"); | |||||
Engine.LoadComponentScript("Garrisonable.js"); | |||||
const garrisonHolderID = 1; | |||||
const garrisonableID = 2; | |||||
let cmpGarrisonable = ConstructComponent(garrisonableID, "Garrisonable", { | |||||
}); | |||||
TS_ASSERT(cmpGarrisonable.Garrison(garrisonHolderID)); | |||||
TS_ASSERT_UNEVAL_EQUALS(cmpGarrisonable.GetHolderID(), garrisonHolderID); | |||||
TS_ASSERT(!cmpGarrisonable.Garrison(garrisonHolderID)); | |||||
TS_ASSERT_UNEVAL_EQUALS(cmpGarrisonable.GetHolderID(), garrisonHolderID); | |||||
cmpGarrisonable.UnGarrison(); | |||||
TS_ASSERT_UNEVAL_EQUALS(cmpGarrisonable.GetHolderID(), INVALID_ENTITY); |
Wildfire Games · Phabricator