RoomPosition.lookFor(LOOK_TERRAIN) returns a string instead of an array
-
RoomPosition.lookFor() is supposed to return an array, however in the specific case of using it with LOOK_TERRAIN, it returns a single string containing the type of the terrain.
All other LOOK_* types seem to properly return an array.
Room.lookForAt(LOOK_TERRAIN, ...) properly returns an array with a single terrain type as a string inside it, as expected.
-
I'd suggest you use
http://support.screeps.com/hc/en-us/articles/203079191-Map#getTerrainAt
In the meantime until this is fixed.
Could you try that out?
-
@dissi actually I'm just reporting an issue that someone mentioned a few days ago on Slack, and we already suggested him to do that, but thanks
-
Thanks for reporting, fixed.