Skip to content

Commit

Permalink
fix(engine): missing structure level check
Browse files Browse the repository at this point in the history
  • Loading branch information
artch committed Jun 14, 2017
1 parent a9a5108 commit 91c9bf0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils.js
Expand Up @@ -850,6 +850,10 @@ exports.checkStructureAgainstController = function(object, roomObjects, roomCont
}

let allowedRemaining = C.CONTROLLER_STRUCTURES[object.type][roomController.level];

if(allowedRemaining === 0) {
return false;
}

// if only one object ever allowed, this is it
if(C.CONTROLLER_STRUCTURES[object.type][8] === 1) {
Expand Down Expand Up @@ -883,7 +887,7 @@ exports.checkStructureAgainstController = function(object, roomObjects, roomCont
}
}
}

return true;
};

Expand Down

0 comments on commit 91c9bf0

Please sign in to comment.