Differential D2376 Diff 14941 ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Garrisonable.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Garrisonable.js
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
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.HolderID(), garrisonHolderID); | |||||
TS_ASSERT(!cmpGarrisonable.Garrison(garrisonHolderID)); | |||||
TS_ASSERT_UNEVAL_EQUALS(cmpGarrisonable.HolderID(), garrisonHolderID); | |||||
cmpGarrisonable.UnGarrison(); | |||||
TS_ASSERT_UNEVAL_EQUALS(cmpGarrisonable.HolderID(), INVALID_ENTITY); |
Wildfire Games · Phabricator