-
Notifications
You must be signed in to change notification settings - Fork 105
Harvest
This command sends a number of units to collect resources.
Used as a single command, harvest sends <quantity>
of workers to collect resources from the closest deposit of resources, calculated considered the current position of the units. Harvest can be interpreted (composed) as:
Harvest is an action that only is performed by the Workers. To simplify the command, it only asks how many workers you want to use in the process to collect resources. By default, the workers will harvest from the closest collection point.
When one worker gets the resource from a collection point, it reduces the number of resources available in the collection point, as the pictures below illustrate. The total quantity of resources, that a player owns, is updated after the workers deliver the resource in a Base.
Used in a Loop (For)
Harvest can appear inside of a loop, however, the command can't receive a unit as a parameter, which means that this command will be used always as the stand-alone way.
CommandDSL ast_example = new CommandDSL("harvest(2)");
ast_example.translate()
--> print in Java console--> harvest(2)
ast_example.friendly_translate()
--> print in Java console--> harvest(2)
BuilderDSLTreeSingleton.formatedStructuredDSLTreePreOrderPrint((iNodeDSLTree) ast_example);
--> print in Java console--> c->harvest(2)