From aa2e4ea7757dd48855169ce05338d65c055e27ce Mon Sep 17 00:00:00 2001 From: David Franke Date: Fri, 3 May 2024 16:41:06 +0200 Subject: [PATCH] refactor: Removed unused utility function. --- src/utilities.ts | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/utilities.ts b/src/utilities.ts index 0b07f17..fa29623 100644 --- a/src/utilities.ts +++ b/src/utilities.ts @@ -1,7 +1,4 @@ -/* global hivemind PathFinder Room RoomPosition TERRAIN_MASK_WALL REACTIONS -STRUCTURE_RAMPART STRUCTURE_ROAD BODYPART_COST -TOP TOP_RIGHT RIGHT BOTTOM_RIGHT BOTTOM BOTTOM_LEFT LEFT TOP_LEFT -STRUCTURE_PORTAL STRUCTURE_KEEPER_LAIR */ +/* global PathFinder RoomPosition REACTIONS BODYPART_COST */ import cache from 'utils/cache'; import hivemind from 'hivemind'; @@ -118,24 +115,6 @@ const utilities = { return PathFinder.search(startPosition, endPosition, options); }, - /** - * Returns closest target to a room object. - * - * @param {RoomObject} roomObject - * The room object the search originates from. - * @param {RoomObject[]} targets - * A list of room objects to check. - * - * @return {RoomObject} - * The closest target. - */ - getClosest(roomObject, targets) { - if (targets.length > 0) { - const target = roomObject.pos.findClosestByRange(targets); - return target && target.id; - } - }, - /** * Gets most highly rated option from a list. *