Package horizons :: Package util :: Module yamlcache
[hide private]
[frames] | no frames]

Module yamlcache

source code

Classes [hide private]
  YamlCache
Loads and caches YAML files in a persistent cache.
Functions [hide private]
 
construct_yaml_str(self, node) source code
 
parse_token(token, token_klass)
Helper function that tries to parse a constant name.
source code
 
convert_game_data(data)
Translates convenience symbols into actual game data usable by machines
source code
Function Details [hide private]

parse_token(token, token_klass)

source code 

Helper function that tries to parse a constant name. Does not do error detection, but passes unparseable stuff through. Allowed values: integer or token_klass.LIKE_IN_CONSTANTS

Parameters:
  • token_klass - "TIER", "RES", "UNITS" or "BUILDINGS"