mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-17 13:53:57 -07:00
The task of the production queue should first and foremost be that; a queue for production items. Hence, the specifics of training/researching are delegated to specific components. As a side effect, this improves the test coverage and fixes: - Resource not refunding when hitting the entity limit. Introduced inb8758c8941. - Autoqueue changing when unable to spawn. Introduced in956b3f96db. Modders can change their templates using https://code.wildfiregames.com/P256. Differential revision: https://code.wildfiregames.com/D4333 Fixes: #6363 Comments by: @Silier Refs. #6364 This was SVN commit r26000.
13 lines
459 B
JavaScript
13 lines
459 B
JavaScript
Engine.RegisterInterface("Trainer");
|
|
|
|
/**
|
|
* Message of the form { "entity": number }
|
|
* sent from Trainer component to the current entity whenever a unit is about to be trained.
|
|
*/
|
|
Engine.RegisterMessageType("TrainingStarted");
|
|
|
|
/**
|
|
* Message of the form { "entities": number[], "owner": number, "metadata": object }
|
|
* sent from Trainer component to the current entity whenever a unit has been trained.
|
|
*/
|
|
Engine.RegisterMessageType("TrainingFinished");
|