HomeWildfire Games

petra: allow the ai to use ranges for mod who support them, and add Archery…
AuditedrP21751

Description

petra: allow the ai to use ranges for mod who support them, and add Archery class to ranges to allow differentiating them from barracks

Details

Auditors
Angen
Committed
mimoApr 21 2018, 1:55 PM
Parents
rP21750: Reload batch size when changed in options
Branches
Unknown
Tags
Unknown
Build Status
Buildable 5925
Build 9896: Post-Commit BuildJenkins

Event Timeline

Angen raised a concern with this commit.May 14 2019, 10:51 AM
Angen added a subscriber: Angen.
Angen added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/ai/petra/headquarters.js
1918

actually template with stables does not remove class Barracks so this contains Stables as well, except persian stables (actually only active in game) which removes class Barracks so this behaviour is inconstant

This commit now has outstanding concerns.May 14 2019, 10:51 AM
Angen added inline comments.May 14 2019, 10:53 AM
/ps/trunk/binaries/data/mods/public/simulation/ai/petra/headquarters.js
1918

inconsistent

All concerns with this commit have now been addressed.May 31 2019, 6:51 PM
mimo added a comment.May 31 2019, 8:15 PM

Could you explain what is the point of raising a concern on a commit when the problem is created by a posterior commit? maybe just give some feeling of activity?

Angen added a comment.May 31 2019, 8:56 PM
In rP21751#33686, @mimo wrote:

Could you explain what is the point of raising a concern on a commit when the problem is created by a posterior commit? maybe just give some feeling of activity?

Jul 21 2015: pers_stables last change around classes https://code.wildfiregames.com/rP16874#change-k6WWRJymbNog
Mar 15 2018 Stables identity in barracks_stables https://code.wildfiregames.com/rP21556
Apr 11 2018 changes around *_stable not removed -Barracks or something https://code.wildfiregames.com/rP21691
Apr 21 2018: this commit

so again how this was not responsible?

mimo added a comment.May 31 2019, 9:44 PM

Just a hint: what was the only stable in game at that time? was it a barracks?
Then if people had commited (without any review) inconsistent stable templates, i would not have expected petra to create some hacky code to support them in the future, but to first make all templates consistent. It seems that this took 1 year.

Angen added a comment.May 31 2019, 9:58 PM

Before this commit:
let numStables = this.canBuild(gameState, "structures/{civ}_stables") ? gameState.getOwnEntitiesByClass("Stables", true).length : -1;
other civs than pers could not build it so numStables = -1 nothing happens for them

After this commit:
it allows to build stables for another civs but with different behaviour so I pointed that out and raised concern to mark this as a problem