Page MenuHomeWildfire Games

Add build order to unit commands to play different sounds for build and repair
AcceptedPublic

Authored by Angen on Sep 9 2019, 7:35 PM.

Details

Reviewers
Freagarach
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#5374
Summary

Entities have different sound entries for build and repair orders in templates but currently only one is used.
This patch is using build order for foundations and repair order for anything else keeping hotkeys, mouse clicks and actions modified with button grouped,
so there is no change for user.

Test Plan
  1. Check code
  2. Check logic
  3. Check sound is played in both situations

Event Timeline

Angen created this revision.Sep 9 2019, 7:35 PM
Owners added a subscriber: Restricted Owners Package.Sep 9 2019, 7:35 PM
Vulcan added a comment.Sep 9 2019, 7:36 PM

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

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

Vulcan added a comment.Sep 9 2019, 7:39 PM

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

Linter detected issues:
Executing section Source...
Executing section JS...

binaries/data/mods/public/gui/session/unit_actions.js
| 625| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
Executing section cli...

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

Angen updated this revision to Diff 9688.Sep 9 2019, 7:48 PM
Angen edited the test plan for this revision. (Show Details)

add entry to template, fix repair command back

Vulcan added a comment.Sep 9 2019, 7:49 PM

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

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

Stan awarded a token.Sep 9 2019, 7:50 PM
Vulcan added a comment.Sep 9 2019, 7:51 PM

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

Linter detected issues:
Executing section Source...
Executing section JS...

binaries/data/mods/public/gui/session/unit_actions.js
| 625| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
Executing section cli...

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

Angen updated the Trac tickets for this revision.Sep 17 2019, 7:12 AM
elexis added a subscriber: elexis.Sep 18 2019, 4:45 PM
elexis added inline comments.
binaries/data/mods/public/gui/session/unit_actions.js
433

I guess this is the only difference between the two objects, so it might be good to consider avoiding the duplication and checking for the target entity type instead.

Angen updated this revision to Diff 9841.Sep 18 2019, 5:06 PM

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

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

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

Linter detected issues:
Executing section Source...
Executing section JS...

binaries/data/mods/public/gui/session/unit_actions.js
| 563| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
Executing section cli...

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

Do you mind extending it to template_unit_support_female_citizen and template_unit_support_slave?

Angen planned changes to this revision.Tue, Nov 12, 12:38 PM

Female citizen has it, I ll add that one for slave.

Angen updated this revision to Diff 10318.Wed, Nov 13, 6:12 PM

add sound entry for slave

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

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

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

Linter detected issues:
Executing section Source...
Executing section JS...

binaries/data/mods/public/gui/session/unit_actions.js
| 563| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
Executing section cli...

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

Angen added a reviewer: Restricted Owners Package.Fri, Nov 15, 5:23 AM
Freagarach accepted this revision.Fri, Nov 15, 8:14 AM
  • Works like a charm.
  • Code looks good.
    • No deduplication possible.
    • No extension possible/needed.
  • Nice addition.
binaries/data/mods/public/gui/session/unit_actions.js
367

Perhaps split in newlines?

This revision is now accepted and ready to land.Fri, Nov 15, 8:14 AM