Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#5810 closed enhancement (fixed)

For X in [Attack, Build, Gather, Heal]: Do X using cmpX instead of UnitAI.

Reported by: Freagarach Owned by:
Priority: Nice to Have Milestone: Alpha 25
Component: Simulation Keywords:
Cc: Patch:

Description (last modified by Freagarach)

Currently UnitAI performs several tasks that could be done in their respective components. E.g. attacking, building (Phab:D3812), gathering (Phab:D2662) and healing (Phab:D2680).

This would decouple the activities from UnitAI, allowing structures to perform the same tasks without much duplication. See also discussion early on in Phab:D2662.

Change History (4)

comment:1 by Freagarach, 4 years ago

Type: defectenhancement

comment:2 by Freagarach, 3 years ago

Description: modified (diff)
Milestone: BacklogAlpha 25

Building: r25208
Gathering: r25206
Healing: r25207

comment:3 by Freagarach, 3 years ago

Resolution: fixed
Status: newclosed

One could maybe argue equal measures for Patrol and/or Guard, but those seem more like UnitAI actions (for now).

comment:4 by Freagarach, 3 years ago

In r25235:
Attack using cmpAttack instead of UnitAI.

Keep responsibilities separated, allow easier modding of attacking behaviour. Ideally the BuildingAI attacking routine would be merged in here as well, but not done for now.

Part of #5810
Differential revision: D3816
Comments by: @smiley, @Stan

Note: See TracTickets for help on using tickets.