SCMAI3 Second upload. Added ability to recognize and defend buildings