refactor phase1

create plantUpdate function.
todo: override buildings.js
refactor phase1