What is the best way to detect the transformation of Construction site into Structure?
I can only detect the moment when construction site disapears from the room and find the construction on the same place. Like this:
var disappear = Game.getObjectById(constructionId) === undefined;
var appear = position.lookFor('structure').length > 0;
if (disappear && appear) {
//it happened
}
But I think this way isn't good. Any suggestions?