Currently, trigger scripts which want to spawn garrisoned units have first to spawn them around their garrisonHolder, and then order them to garrison (as done in danubius map for example). That's a lot of useless steps (finding some room for the units, and then moving them out of world), and is not always possible if we want to garrison inside a ship.
The patch allows to spawn units already garrisoned.
Details
Details
- Reviewers
- None
- Commits
- rP20659: Provide a TriggerHelper function to spawn garrisoned entities
Check that it does what is expected.
Diff Detail
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
Comment Actions
Successful build - Chance fights ever on the side of the prudent.
Updating workspaces... Build (release)... Build (debug)... Running release tests... Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK! Checking XML files...
Comment Actions
first to spawn them around their garrisonHolder, and then order them to garrison (as done in danubius map for example
Useless correction: That's the case for the buildings, but not for the ships, since orders are processed one or two turns later, so units spawned on a nearby island weren't able to garrison the ship anymore after that had moved away in that time. Besides the footprint performance issue fixed by temple recently.
Someone motivated could use the new function on danubius to shorten the code and fix the missing Autogarrison to allow selecting garrisoned gaia heroes in observermode.