Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1164 closed enhancement (fixed)

[PATCH] Add garrison related functions to AI common API

Reported by: gudo Owned by: Jonathan Waller
Priority: Nice to Have Milestone: Alpha 9
Component: UI & Simulation Keywords: patch, ai
Cc: Patch:

Description

While sorting through the changes that Rootbot made to entity.js, I came across a few garrison related changes that I think could be useful for inclusion in the official common API.

Attachments (1)

entity.js.patch (1.2 KB ) - added by gudo 12 years ago.

Download all attachments as: .zip

Change History (4)

by gudo, 12 years ago

Attachment: entity.js.patch added

comment:1 by historic_bruno, 12 years ago

Milestone: BacklogAlpha 9

comment:2 by Jonathan Waller, 12 years ago

Resolution: fixed
Status: newclosed

In 11067:

Added some extra garrison related functions. Fixes #1164.

comment:3 by Jonathan Waller, 12 years ago

Keywords: review removed

Thanks for the patch, I have applied a slightly modified version. This is what I changed:

garrisonableClasses() and garrisonMax() are both functions which read the template data so I have moved them from the Entity class to the EntityTemplate class.

garrisonMax had some bad indenting.

garrisonspaceavaliable doesn't use the camelcase convention, this makes it harder to read the function name.

Note: See TracTickets for help on using tickets.