Original: Work on the cathedral was finally completed and consecrated in 1318 by Bishop Lamberton with Robert The Bruce (1306-29) present at the ceremony.
Simplified: It was not completed and consecrated until 1318 in the reign of Robert the Bruce (1306-29).