Does findExitTo work with room names?
-
If not, how would a creep get the id of the spawn that's in their room?
-
According to https://docs.screeps.com/api/#Room.findExitTo,
findExitTo
can accept either a string (room name) or aRoom
object.I don't know why you need the spawn ID for this, but you can get spawns like this:
let spawn = room.find(FIND_MY_SPAWNS)[0];