Page MenuHomeWildfire Games

Don't exclude gaia soldiers and structures from the killed entities statistics
ClosedPublic

Authored by elexis on Mar 13 2018, 5:19 PM.

Details

Summary

As the title says. This is especially relevant on triggerscript maps and for the kill-death ratio.

Test Plan

Use the "gift from the gods" cheat on Danubius to train 25 cavalry and kill the gaia units near the campfire.
Observe the summary screen and notice that killing animals like Deer or Elephants still doesn't add to killed units.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

elexis created this revision.Mar 13 2018, 5:19 PM
elexis retitled this revision from Don't exclude gaia soldiers from the killed units statistics to Don't exclude gaia soldiers and structures from the killed entities statistics.Mar 13 2018, 5:21 PM
temple accepted this revision.Mar 13 2018, 6:03 PM

Seems like a good idea. (Only fauna has the Animal class, so e.g. war elephants will be counted in the killed stats, as they should.)

binaries/data/mods/public/simulation/components/StatisticsTracker.js
314 ↗(On Diff #6159)

remove this too

This revision is now accepted and ready to land.Mar 13 2018, 6:03 PM
bb added a subscriber: bb.Mar 13 2018, 6:08 PM

That check has been there ever since the summary screen has, can't think of another reason why the check was there than animals being counted (I guess back then noone expected these trigger OP gaia maps)

Vulcan added a subscriber: Vulcan.Mar 13 2018, 6:44 PM

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

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/StatisticsTracker.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/StatisticsTracker.js
| 567| 567| {
| 568| 568| 	if (typeof fromData == "object")
| 569| 569| 		for (let prop in fromData)
| 570|    |-		{
|    | 570|+		
| 571| 571| 			if (typeof toData[prop] != "object")
| 572| 572| 				toData[prop] = [fromData[prop]];
| 573| 573| 			else
| 574| 574| 				this.PushValue(fromData[prop], toData[prop]);
| 575|    |-		}
|    | 575|+		
| 576| 576| 	else
| 577| 577| 		toData.push(fromData);
| 578| 578| };

Link to build: https://jenkins.wildfiregames.com/job/differential/240/display/redirect

Imarok added a subscriber: Imarok.Mar 13 2018, 6:56 PM

Looks good, as units killed by gaia already count as lost. (I know you said that)

This revision was automatically updated to reflect the committed changes.