AI will now build radar.

This commit is contained in:
Justin Marshall
2020-08-05 19:13:37 -07:00
parent e592847172
commit 6ad9ef2571
+10
View File
@@ -5799,6 +5799,16 @@ int HouseClass::AI_Building(void)
}
}
if (BQuantity[STRUCT_RADAR] == 0) {
b = &BuildingTypeClass::As_Reference(STRUCT_RADAR);
if (Can_Build(b, ActLike) && (b->Cost_Of() < money || hasincome)) {
choiceptr = BuildChoice.Alloc();
if (choiceptr != NULL) {
*choiceptr = BuildChoiceClass(URGENCY_MEDIUM, b->Type);
}
}
}
/*
** Build some air defense.
*/