I guess you could put the requirement on the building object itself as an instance variable. This is how I would do it:
So on the building object, an instance var :
WoodRequired : 1
Then global variables :
TotalWood : 1
Then to upgrade :
For building, if WoodRequired <= TotalWood, Set ! to visible