Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,12 @@ void AISkirmishPlayer::processBaseBuilding()
}
continue;
}
if (TheBuildAssistant->canMakeUnit(dozer, bldgPlan)!=CANMAKE_OK) {
// TheSuperHackers @bugfix mohamedelabbas1996 Pass the current build-list
// entry (curPlan) to canMakeUnit, not the accumulated candidate (bldgPlan,
// which is still null here). Using bldgPlan made the buildability check fail
// for entries relying on AutomaticallyBuild=Yes (or the default when the
// field is omitted), so the AI never selected them. Fixes issue #2407.
if (TheBuildAssistant->canMakeUnit(dozer, curPlan)!=CANMAKE_OK) {
if (info->isBuildable()) {
AsciiString bldgName = info->getTemplateName();
bldgName.concat(" - Dozer unable to build - money or technology missing.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,12 @@ void AISkirmishPlayer::processBaseBuilding()
}
continue;
}
if (TheBuildAssistant->canMakeUnit(dozer, bldgPlan)!=CANMAKE_OK) {
// TheSuperHackers @bugfix mohamedelabbas1996 Pass the current build-list
// entry (curPlan) to canMakeUnit, not the accumulated candidate (bldgPlan,
// which is still null here). Using bldgPlan made the buildability check fail
// for entries relying on AutomaticallyBuild=Yes (or the default when the
// field is omitted), so the AI never selected them. Fixes issue #2407.
if (TheBuildAssistant->canMakeUnit(dozer, curPlan)!=CANMAKE_OK) {
if (info->isBuildable()) {
AsciiString bldgName = info->getTemplateName();
bldgName.concat(" - Dozer unable to build - money or technology missing.");
Expand Down