---
#------------------------------------------------------------
# This is the schema for add on configuration version 3.0
#------------------------------------------------------------

#------------------------------------------------------------
# Type alias
#------------------------------------------------------------
type_alias:
  working_directory_type:
    type: map
    map_schema:
      register:
      append:
	  
  exe_type:
    type: map
    map_schema:
      path:
        type: map
        required: yes
        map_schema:
          relative:
          register:
      arguments_register:
      arguments:
      working_directory:
        type: working_directory_type
        required: yes
      description:
      background_image:

  online_exe_type:
    type: map
    map_schema:
      path:
        type: map
        required: yes
        map_schema:
          relative:
          register:
      arguments:
      arguments_register:
      working_directory:
        type: working_directory_type
        required: yes
      description:
      background_image:
      evil_updater:
        type: exe_type
      
  exe_list_type:
    type: list
    list_type: exe_type

  online_exe_list_type:
    type: list
    list_type: online_exe_type
      
  start_game_online_type:
    type: map
    map_schema:
      overlay_supported:
        type: yesno
      overlay_required:
        type: yesno
      after_game_report_enabled:
        type: yesno
      allow_multiple_instances:
        type: yesno
      executables:
        type: online_exe_list_type
        required: yes
        
  start_game_offline_type:
    type: map
    map_schema:
      after_game_report_enabled:
        type: yesno
      allow_multiple_instances:
        type: yesno
      executables:
        type: exe_list_type
        required: yes

  start_game_legacy_offline_type:
    type: map
    map_schema:
      executable:
        type: exe_type
        required: yes
  
  start_game_steam_type:
    type: map
    map_schema:
      overlay_supported:
        type: yesno
      overlay_required:
        type: yesno
      after_game_report_enabled:
        type: yesno
      legacy_offline_supported:
        type: yesno
      offline_supported:
        type: yesno
      offline_arguments:

  start_game_third_party_steam_type:
    type: map
    map_schema:
      steam_app_id:
      steam_installation_status_register:
      game_installation_status_register:
      
  start_game_type:
    type: map
    map_schema:
      online:
        type : start_game_online_type
      offline:
        type : start_game_offline_type
      legacy_offline:
        type : start_game_legacy_offline_type
      steam:
        type: start_game_steam_type
      third_party_steam:
        type: start_game_third_party_steam_type
  third_party_platform_type:
    type: map
    map_schema:
      name:
        required: yes
      trade_mark_notice:
        required: no
 

  #------------------------------------------------------------
  # Root type
  #------------------------------------------------------------
  root_type:
    type: map
    map_schema:
      name:
        required: yes
      description:
        required: no
      thumb_image:
        required: no
      cd_key_required:
        type: yesno
      shop_url:
        required: no
      start_game:
        type: start_game_type
        required: no
      cdn_provider:
        required: no
      third_party_platform:
        type: third_party_platform_type
      uplay_pipe_required:
        type: yesno
        required: no
      is_dlc:
        type: yesno
      is_ulc:
        type: yesno

#--------------------------------------------------------------
# Schema
#--------------------------------------------------------------
schema:
  type: map
  map_schema:
    # Specifies the version of the configuration
    version:
      required: yes
    # This is where the root of the configuration is found
    root:
      type: root_type
      required: yes
