Page MenuHomeWildfire Games

Do not require a garrisonHolder to have health.
Needs ReviewPublic

Authored by Freagarach on Oct 15 2019, 8:51 AM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

Refs. D1268.

Test Plan

Verify that a garrisonHolder without health can be garrisoned and a garrisonHolder with health still behaves as usual.

Event Timeline

Freagarach created this revision.Oct 15 2019, 8:51 AM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/456/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/457/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/971/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/972/display/redirect

bb added a subscriber: bb.Wed, Feb 12, 8:17 PM
bb added inline comments.
binaries/data/mods/public/simulation/components/GarrisonHolder.js
12–13

Is it me or does it sound weird to have this set for units without a health component?

binaries/data/mods/public/simulation/components/tests/test_GarrisonHolder.js
181–183

Don't add a disabled health component, rather test it before adding the health mock.

One could consider testing more stuff without a health component (garrisoning and ejecting and stuff)

Freagarach planned changes to this revision.Thu, Feb 13, 5:59 PM

Fair points.

Freagarach updated this revision to Diff 11344.Thu, Feb 13, 8:41 PM
Freagarach marked 2 inline comments as done.
  • Eject health optional.
  • Extended test.

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_GarrisonHolder.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_GarrisonHolder.js
| 135| 135| 	TS_ASSERT_EQUALS(cmpGarrisonHolder.IsFull(), false);
| 136| 136| 	TS_ASSERT_EQUALS(cmpGarrisonHolder.UnloadAll(), true);
| 137| 137| 	TS_ASSERT_UNEVAL_EQUALS(cmpGarrisonHolder.GetEntities(), []);
| 138|    |-}
|    | 138|+};
| 139| 139| 
| 140| 140| // No health component yet.
| 141| 141| testGarrisonAllowed();

binaries/data/mods/public/simulation/components/tests/test_GarrisonHolder.js
| 138| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1753/display/redirect