FSO.SimAntics.VMContext.GetRoomAt C# (CSharp) Method

GetRoomAt() public method

public GetRoomAt ( FSO.LotView.Model.LotTilePos pos ) : ushort
pos FSO.LotView.Model.LotTilePos
return ushort
        public ushort GetRoomAt(LotTilePos pos)
        {
            if (pos.TileX < 0 || pos.TileX >= _Arch.Width) return 0;
            else if (pos.TileY < 0 || pos.TileY >= _Arch.Height) return 0;
            else if (pos.Level < 1 || pos.Level > _Arch.Stories) return 0;
            else return (ushort)Architecture.Rooms[pos.Level-1].Map[pos.TileX + pos.TileY * _Arch.Width];
        }