Page MenuHomeWildfire Games

Fix warning with disabled templates in rP23843
ClosedPublic

Authored by wraitii on Jul 25 2020, 9:07 AM.

Details

Summary

The code assumed that a player was being passed when it wasn't.

Reported by @Angen on rP23843.

I think I could change the whole thing to use the new token system, but this seems like a larger change and I'll see that later.

Test Plan

Disable spies and run a game.

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

wraitii created this revision.Jul 25 2020, 9:07 AM

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

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

binaries/data/mods/public/simulation/components/Player.js
| 346| »   for·(var·type·in·amounts)
|    | [NORMAL] JSHintBear:
|    | 'type' is already defined.
Executing section cli...

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

bb accepted this revision.Jul 27 2020, 6:53 PM
bb added a subscriber: bb.

Looks correct, greps complete

This revision is now accepted and ready to land.Jul 27 2020, 6:53 PM
This revision was automatically updated to reflect the committed changes.