Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Get the list of objects at the specified room area.
- *
- * @type {function}
- *
- * @param {RoomPosition} pos The center position of the area.
- * @param {number} range The range to search around the position.
- *
- * @return {Array} An array with all the objects in the specified range
- */
- Object.defineProperty(Room.prototype, "lookInRange", {
- value: function (pos, range) {
- return this.lookAtArea(pos.y - range, pos.x - range, pos.y + range, pos.x + range, true);
- },
- configurable: true,
- enumerable: false,
- });
- /**
- * Get the list of objects with the given type at the specified room area.
- *
- * @type {function}
- *
- * @param {string} type One of the LOOK_* constants.
- * @param {RoomPosition} pos The center position of the area.
- * @param {number} range The range to search around the position.
- *
- * @return {Array} An array with all the objects of the given type in the specified range
- */
- Object.defineProperty(Room.prototype, "lookForInRange", {
- value: function (type, pos, range) {
- return this.lookForAtArea(type, pos.y - range, pos.x - range, pos.y + range, pos.x + range, true);
- },
- configurable: true,
- enumerable: false,
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement