.isAA on droids - discrepancy between docs and code

For AI and campaign script related discussions and questions
Post Reply
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

.isAA on droids - discrepancy between docs and code

Post by aubergine »

Hi,

In the JS API docs, the droid object docs say:
isAA
True if the droid has anti-air capabilities. (3.2+ only)
In the code, and as previously advertised, however the property is ".canHitAir" - is there a planned change that's not been put in the code, or are the docs wrong?

I prefer .canHitAir (it's more descriptive than .isAA) and would make scripts more transparent as to what they're doing.

Also, .canHitGround is missing from the docs.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: .isAA on droids - discrepancy between docs and code

Post by aubergine »

Other stuff is missing too: .health, .cost, etc.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: .isAA on droids - discrepancy between docs and code

Post by Per »

Fixed. (Should be .canHitGroun and .canHitAir)
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: .isAA on droids - discrepancy between docs and code

Post by Emdek »

canHitGroun
I believe that missing d is only mistake in post?
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: .isAA on droids - discrepancy between docs and code

Post by NoQ »

I hope so, cause it works with "d" (:
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: .isAA on droids - discrepancy between docs and code

Post by aubergine »

Yes, I'm not sure using italics in javascript function names is the right direction to go. :lol2:
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Post Reply