original_docstring: Looks .cat and .dat files in the game's root directory and records
          them in self.data_files. Those files will be loaded lazily when needed.
          Returns the number of data files recorded.
  
          It looks for files in format 01.cat 01.dat, 02.cat 02.dat, ... until
          no more pairs are found or it reaches 99.cat 99.dat.
          File priority goes from lowest to highest. Higher-numbered files will
          override entries from lower-numbered files.
          
docstring: Looks .cat and .dat files in the game's root directory and records
  them in self.data_files. Those files will be loaded lazily when needed.
  Returns the number of data files recorded.
  
  
docstring_tokens: Looks . cat and . dat files in the game ' s root directory and records them in self . data_files . Those files will be loaded lazily when needed . Returns the number of data files recorded .
code: def load_from_game_root(self):
          """Looks .cat and .dat files in the game's root directory and records
          them in self.data_files. Those files will be loaded lazily when needed.
          Returns the number of data files recorded.
  
          It looks for files in format 01.cat 01.dat, 02.cat 02.dat, ... until
          no more pairs are found or it reaches 99.cat 99.dat.
          File priority goes from lowest to highest. Higher-numbered files will
          override entries from lower-numbered files.
          """
          loaded = 0
          data_files = []
  
          for i in range(1, 100):
              cat_name = '{:02d}.cat'.format(i)
              dat_name = '{:02d}.dat'.format(i)
  
              cat_path = os.path.join(self.fs_root, cat_name)
              dat_path = os.path.join(self.fs_root, dat_name)
  
              if os.path.isfile(cat_path) and os.path.isfile(dat_path):
                  data_files.append((cat_path, dat_path))
                  loaded += 1
              else:
                  break
  
          self.data_files = data_files + self.data_files
  
          return loaded
code_tokens: def load_from_game_root ( self ) : loaded = 0 data_files = [ ] for i in range ( 1 , 100 ) : cat_name = '{:02d}.cat' . format ( i ) dat_name = '{:02d}.dat' . format ( i ) cat_path = os . path . join ( self . fs_root , cat_name ) dat_path = os . path . join ( self . fs_root , dat_name ) if os . path . isfile ( cat_path ) and os . path . isfile ( dat_path ) : data_files . append ( ( cat_path , dat_path ) ) loaded += 1 else : break self . data_files = data_files + self . data_files return loaded
short_docstring: Looks .cat and .dat files in the game's root directory and records
  them in self.data_files.
short_docstring_tokens: Looks . cat and . dat files in the game ' s root directory and records them in self . data_files .
comment: """Looks .cat and .dat files in the game's root directory and records
          them in self.data_files. Those files will be loaded lazily when needed.
          Returns the number of data files recorded.
  
          It looks for files in format 01.cat 01.dat, 02.cat 02.dat, ... until
          no more pairs are found or it reaches 99.cat 99.dat.
          File priority goes from lowest to highest. Higher-numbered files will
          override entries from lower-numbered files.
          """