I think there should a possibility to give our colonists work as "Guard" (in particular working hours). Also, give the opportunity to make some patrol paths on which they would patrol the whole colony. If there would be any danger nerby, they automatically use their weapons to defend without setting them to attack-mode.
So, while defending, the rest of the colony can work in peace :>.
So, while defending, the rest of the colony can work in peace :>.