Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4377 closed enhancement (fixed)

[PATCH] AI Influence group type should become a descriptive string

Reported by: elexis Owned by: elexis
Priority: Nice to Have Milestone: Alpha 22
Component: AI Keywords: patch
Cc: Patch:

Description

#3934 exposed the AI configuration (aiAnalysisInfluenceGroup for resources to moddable JSON files. As discussed in https://wildfiregames.com/forum/index.php?/topic/21404-adding-new-resources/ these three values (0, 1, 2) should become (ignore, abundant, spare) to make it obvious that other values are not supported and making the code easier to read and grep.

Attachments (1)

rename_ai_influence_group_v1.patch (4.3 KB ) - added by elexis 7 years ago.

Download all attachments as: .zip

Change History (7)

by elexis, 7 years ago

comment:1 by mimo, 7 years ago

Looks good to me, thanks for writing it. There is only one old typo in common-api/shared.js where "spare" should have been "sparse". So the corresponding string should be changed to "sparse".

comment:2 by elexis, 7 years ago

(was wondering already)

comment:3 by Stan, 7 years ago

Shouldn'it be scarce ? (Unless it means the resource is spread)

comment:4 by mimo, 7 years ago

It's more connected to the fact that the resource is spread, and not necessarily scarce as each amount can be very big. It is only that when a resource is spread, its footprint in the resource map is bigger, to ensure that we won't miss a potentially good position if there are already a lot of obstructions around.

Last edited 7 years ago by mimo (previous) (diff)

comment:5 by elexis, 7 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 19012:

Use strings instead of integers for the values of aiAnalysisInfluenceGroup (used by petra to position dropsites). Reviewed by mimo, fixes #4377.

comment:6 by elexis, 7 years ago

Keywords: review removed
Milestone: Work In ProgressAlpha 22

Thanks for the review!

Note: See TracTickets for help on using tickets.