Page MenuHomeWildfire Games

Let "GetPrimaryMember"-function of "Formation"-component actually return something of a primary member.
Needs ReviewPublic

Authored by Freagarach on Jul 10 2019, 5:58 PM.


Group Reviewers
Restricted Owners Package(Owns No Changed Paths)

There was a ToDo in Formation.js to let the function actually return some kind of primary member.

Test Plan

Currently the code is not called, but that does not mean it will never ;)

  1. Add this.PlaySound(...) to a formation order in UnitAI.
  2. Combine several entities into a formation.
  3. Give the above mentioned order to the formation.
    1. Verify that the correct sound is played (that of the "most important" entity).

Diff Detail

rP 0 A.D. Public Repository
Lint OK
No Unit Test Coverage
Build Status
Buildable 8280
Build 13508: Vulcan BuildJenkins
Build 13507: arc lint + arc unit

Event Timeline

Freagarach created this revision.Jul 10 2019, 5:58 PM

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

Link to build:

smiley added a subscriber: smiley.Jul 10 2019, 7:26 PM

I am not so sure whether this is any less arbitrary. In other games, the primary member seems to be the bulk of the army. That doesn’t necessarily mean numerically.
(Just a random thought, do what the reviewer says and you will be good)