diff --git a/src/game/rooms.js b/src/game/rooms.js index f2bac2e1..2cda00f5 100644 --- a/src/game/rooms.js +++ b/src/game/rooms.js @@ -1068,7 +1068,7 @@ exports.make = function(_runtimeData, _intents, _register, _globals) { return C.ERR_INVALID_TARGET; } - if(_(runtimeData.userObjects).filter({type: 'constructionSite'}).size() + createdConstructionSites >= C.MAX_CONSTRUCTION_SITES) { + if (_.size(register['constructionSite']) + createdConstructionSites >= C.MAX_CONSTRUCTION_SITES) { return C.ERR_FULL; }