Opened 12 years ago

Closed 12 years ago

#1327 closed defect (fixed)

Weird "GetCarryingStatus" behavior: appears to be lazily computed

Reported by: wraitii Owned by: Jonathan Waller
Priority: Should Have Milestone: Alpha 10
Component: UI & Simulation Keywords:
Cc: Patch:

Description

Fooling around with the new AI API, I noticed the "ResourceCarrying" function does not work: it returns an empty array. Tracing this back, it appears to call "GetCarryingStatus" in ResourceGatherer.js, which happens to loop through "this.carry", which is empty. However, when I activate "Display Selection State" and click on a specific unit, this functions works for that unit. This leads me to believe "this.carry" is not always updated/active, which seems like a bug. I'm unsure if it's only a problem with the AIs or other things too.

Factually, this mainly unallows the AIs to check if a unit is carrying something, to make it return the resources before doing something else.

Change History (1)

comment:1 by Jonathan Waller, 12 years ago

Owner: set to Jonathan Waller
Resolution: fixed
Status: newclosed

In 11547:

Handle updates for foundation progress, resource carrying and resource supply amount for AIProxy. Fixes #1327

Note: See TracTickets for help on using tickets.