Workaround TriggerHelper.js not being able to spawn units correctly because of promotion.
commit9001edf4fa09a3e762562a82f6041786e6847df1
authorStan <Stan@3db68df2-c116-0410-a063-a993310a9797>
Wed, 10 May 2023 15:13:52 +0000 (10 15:13 +0000)
committerStan <Stan@3db68df2-c116-0410-a063-a993310a9797>
Wed, 10 May 2023 15:13:52 +0000 (10 15:13 +0000)
tree5f860ec1ea55f5eebcb7c223ae1e6cf284a23f39
parent06cf6b7a9038aceb2200fcd246996227707d0d9b
Workaround TriggerHelper.js not being able to spawn units correctly because of promotion.
Avoid duplication by moving the function to Transform.js.
Add tests to Transform.js
Add tests to TurretHolder.js
Optimize slightly Trainer.js by removing some useless Engine.QueryInterface calls.
Refs #6784 (symptoms in TriggerHelper.js are fixed underlying cause not)

`SkirmishReplacer` is called before the Modifier Manager so it does not suffer the same fate.
Entities using `ChangeEntityTemplate` function are still affected.
Maps calling Engine.AddEntity directly are still affected.

Ideally this should be handled by hotloading components instead of creating new entities each time. See => https://code.wildfiregames.com/D4991
Tested using: https://github.com/0ADMods/trailer_tools/commit/908dd631d950b5050d1784530c65f29ccfc67913

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

git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@27636 3db68df2-c116-0410-a063-a993310a9797
binaries/data/mods/public/maps/scripts/TriggerHelper.js
binaries/data/mods/public/simulation/components/Trainer.js
binaries/data/mods/public/simulation/components/TurretHolder.js
binaries/data/mods/public/simulation/components/tests/test_Trainer.js
binaries/data/mods/public/simulation/components/tests/test_TurretHolder.js
binaries/data/mods/public/simulation/helpers/Transform.js