From 1e9042d3f6fd291fd981ba0eaa9186a840c2a648 Mon Sep 17 00:00:00 2001 From: asquared31415 <34665709+asquared31415@users.noreply.github.com> Date: Sat, 2 Mar 2024 17:11:51 -0500 Subject: [PATCH] constructionSites scan fewer objects --- src/game/rooms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }