Skip to content

Commit

Permalink
refactor: Removed unused utility function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirroar committed May 3, 2024
1 parent 09a71bd commit aa2e4ea
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions src/utilities.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit aa2e4ea

Please sign in to comment.