HomeWildfire Games

Move Danubius triggerscript function to compose random templates and garrison…

Description

Move Danubius triggerscript function to compose random templates and garrison all entities of a given identity class to TriggerHelper.

Delete the copy thereof in Elephantine, refs #4805, #5040.
Use absolute paths for template names.

Event Timeline

elexis added inline comments.Mar 5 2018, 3:16 AM
/ps/trunk/binaries/data/mods/public/maps/scripts/TriggerHelper.js
91

Should have used this new function from rP20659 instead of moving SpawnAndGarrison to this file here.

elexis added inline comments.Mar 6 2018, 1:12 PM
/ps/trunk/binaries/data/mods/public/maps/scripts/TriggerHelper.js
91

The functions are not fully duplicate but contain a bit of duplicate code.
SpawnAndGarrison iterates over all garrisonholders matching the given classes, while this one receives a single garrisonholder ID.

So renaming SpawnAndGarrison to SpawnAndGarrisonAtClasses and letting the latter call this function removes the possibility of confusion, removes a bit of duplication and fixes the gaia-hero-doubleclicking problem on Danubius reported in comment:10 of #4291.

268

TriggerHelper, not Trigger