0ad/binaries/data/mods/public/simulation/components/interfaces/GarrisonHolder.js
wraitii 9330975d54 Fix Athens not researching civ phase. Make the AI adapt automatically to changing the max gatherers on fields.
Fix auto-researched technologies not being properly researched on init.
Fix the tests (amazing!).
GarrisonHolder sends which entities were added or removed (mostly for AI
purposes but could benefit other things).
Streamline AIInterface events.

This was SVN commit r14612.
2014-01-18 20:26:52 +00:00

10 lines
465 B
JavaScript

Engine.RegisterInterface("GarrisonHolder");
// Message of the form { "added":[], "removed":[] } (and use GetEntities if you want the current details),
// sent to the current entity whenever the garrisoned units change.
Engine.RegisterMessageType("GarrisonedUnitsChanged");
// Message of the form { "holder": this.entity, "unit" : unit } sent to the AlertRaiser
// which ordered the unit "unit" to garrison.
Engine.RegisterMessageType("UnitGarrisonedAfterAlert");