HomeWildfire Games

Make Promotion.js use the common Transform helper, add resource gatherer and…

Description

Make Promotion.js use the common Transform helper, add resource gatherer and promotion to said helper.

Fixes #4334

Differential Revision: https://code.wildfiregames.com/D2026

Details

Event Timeline

elexis raised a concern with this commit.Aug 25 2019, 12:43 AM
elexis added a subscriber: elexis.

r22777

Turn 3513 (500)...
WARNING: JavaScript warning: simulation/components/Promotion.js line 83
reference to undefined property this.promotedUnitEntity
WARNING: JavaScript warning: simulation/components/Promotion.js line 83
Script value conversion check failed: v.isNumber() (got type undefined)
WARNING: JavaScript warning: simulation/components/Promotion.js line 83
Script value conversion check failed: v.isNumber() (got type undefined)

If I was to guess I'd say it's related to entity death.

This commit now has outstanding concerns.Aug 25 2019, 12:43 AM
elexis removed an auditor: elexis.Aug 31 2019, 2:40 PM

Thanks for the fix. It would be good to compare the implementation against the paste some day.

This commit no longer requires audit.Aug 31 2019, 2:40 PM
Freagarach added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/components/Promotion.js
88–89
elexis raised a concern with this commit.EditedOct 5 2019, 12:45 PM

https://trac.wildfiregames.com/ticket/5610#comment:6

Thanks for the fix. It would be good to compare the implementation against the paste some day.

Or the new implementation against the removed implementation.

This commit now has outstanding concerns.Oct 5 2019, 12:45 PM
Freagarach added inline comments.Oct 5 2019, 7:35 PM
/ps/trunk/binaries/data/mods/public/simulation/helpers/Transform.js
65

Actually this should take care of the order transfer. I have no idea why it fails, but apparently it was already broken before? I'll check it.

Freagarach added a comment.EditedOct 5 2019, 8:50 PM

Was broken because previously the cheer order was added first and the rest of the orders thereafter. As per this commit that order was reversed, and the (faulty) cmpUnitAI.Cheer() did not push an order to the front but it replaced all orders (which it should not). D2358.

elexis removed an auditor: elexis.Jan 13 2020, 10:38 AM
This commit no longer requires audit.Jan 13 2020, 10:38 AM