Fix factory() being able to produce non-bot units

pyro-refactor
Fiftytwo 2020-07-30 11:11:51 +02:00
parent a92fa950e2
commit 2023756023
1 changed files with 2 additions and 0 deletions

View File

@ -5957,6 +5957,8 @@ Error CRobotMain::CanFactoryError(ObjectType type, int team)
if (type == OBJECT_MOBILEst && !IsResearchDone(RESEARCH_SUBM, team)) return ERR_BUILD_DISABLED;
if (type == OBJECT_MOBILEtg && !IsResearchDone(RESEARCH_TARGET, team)) return ERR_BUILD_RESEARCH;
if (tool == ToolType::Other && drive == DriveType::Other && type != OBJECT_MOBILEtg) return ERR_WRONG_OBJ;
return ERR_OK;
}