When Mongols slaughtered the whole population from settlements that resisted or didn't opt to surrender  they often spared the engineers and other units  swiftly assimilating them into the Mongol armies.