<?xml version="1.0" encoding="utf-8"?>
<Mod id="5aceed03-8639-4a81-8cbf-03f54d543502" version="1">
  <Properties>
    <Name>Quick Deals</Name>
    <Authors>wltk</Authors>
    <Teaser>Show each AI's offer for your items.</Teaser>
    <Description>Provide an interface that shows all AI's offers for your items, so that you can easily find who pays the most directly. No longer need to click each leader icon one by one.</Description>
    <SpecialThanks>Thanks DeepLogic for the initial idea.</SpecialThanks>
    <AffectsSavedGames>0</AffectsSavedGames>
    <CompatibleVersions>1.2,2.0</CompatibleVersions>
  </Properties>

  <FrontEndActions>
    <UpdateDatabase id="qd_config">
      <File>config/qd_config.xml</File>
    </UpdateDatabase>
    <UpdateText id="qd_options_text">
      <File Priority="1">config/en_us/qd_options_text.xml</File>
    </UpdateText>
  </FrontEndActions>

  <InGameActions>
    <AddGameplayScripts id="qd_cachemanager">
      <File>gameplay/qd_cachemanager.lua</File>
    </AddGameplayScripts>
    <AddUserInterfaces id="qd_dealpopup">
      <Properties>
        <Context>InGame</Context>
      </Properties>
      <File>ui/qd_dealpopup.xml</File>
      <File>ui/qd_launchbutton.xml</File>
      <File>ui/qd_offerautomator.xml</File>
      <File>ui/qd_popuptab_purchase.xml</File>
      <File>ui/qd_popuptab_sale.xml</File>
    </AddUserInterfaces>
    <ReplaceUIScript id="qd_diplomacyactionview">
      <Properties>
        <LoadOrder>99999</LoadOrder> <!-- High load order to prevent being overwritten. -->
        <LuaContext>DiplomacyActionView</LuaContext>
        <LuaReplace>ui/diplomacyactionview_qd.lua</LuaReplace>
      </Properties>
    </ReplaceUIScript>
    <UpdateIcons id="qd_icons">
      <File>data/qd_icons.sql</File>
    </UpdateIcons>
    <UpdateDatabase id="qd_db">
      <File>data/qd_notifications.xml</File>
    </UpdateDatabase>
    <UpdateText id="qd_text">
      <File Priority="1">config/en_us/qd_options_text.xml</File>
      <File Priority="1">text/qd_text.xml</File>
      <File>text/qd_translations_text.xml</File>
    </UpdateText>
    <!-- Importing our files so that other mods can include it and apply additional logic. -->
    <ImportFiles id="qd_files">
      <File>ui/diplomacyactionview_qd.lua</File>
      <File>ui/qd_dealmanager.lua</File>
      <File>ui/qd_dealpopup.lua</File>
      <File>ui/qd_dealpopup.xml</File>
      <File>ui/qd_instances.xml</File>
      <File>ui/qd_launchbutton.lua</File>
      <File>ui/qd_launchbutton.xml</File>
      <File>ui/qd_offerautomator.lua</File>
      <File>ui/qd_offerautomator.xml</File>
      <File>ui/qd_popuptab_purchase.lua</File>
      <File>ui/qd_popuptab_purchase.xml</File>
      <File>ui/qd_popuptab_sale.lua</File>
      <File>ui/qd_popuptab_sale.xml</File>
      <File>ui/qd_utils.lua</File>
      <File>controls_arrowbuttondown_corrected.dds</File>
      <File>qd_launchbutton36.dds</File>
      <File>qd_launchbutton40.dds</File>
      <File>qd_launchbutton100.dds</File>
    </ImportFiles>
  </InGameActions>

  <Files>
    <!-- Texts -->
    <File>config/en_us/qd_options_text.xml</File>
    <File>text/qd_text.xml</File>
    <File>text/qd_translations_text.xml</File>
    <!-- Data -->
    <File>data/qd_notifications.xml</File>
    <File>data/qd_icons.sql</File>
    <!-- Game files -->
    <File>config/qd_config.xml</File>
    <File>gameplay/qd_cachemanager.lua</File>
    <File>ui/diplomacyactionview_qd.lua</File>
    <File>ui/qd_dealmanager.lua</File>
    <File>ui/qd_dealpopup.lua</File>
    <File>ui/qd_dealpopup.xml</File>
    <File>ui/qd_instances.xml</File>
    <File>ui/qd_launchbutton.lua</File>
    <File>ui/qd_launchbutton.xml</File>
    <File>ui/qd_offerautomator.lua</File>
    <File>ui/qd_offerautomator.xml</File>
    <File>ui/qd_popuptab_purchase.lua</File>
    <File>ui/qd_popuptab_purchase.xml</File>
    <File>ui/qd_popuptab_sale.lua</File>
    <File>ui/qd_popuptab_sale.xml</File>
    <File>ui/qd_utils.lua</File>
    <File>controls_arrowbuttondown_corrected.dds</File>
    <File>qd_launchbutton36.dds</File>
    <File>qd_launchbutton40.dds</File>
    <File>qd_launchbutton100.dds</File>
  </Files>
</Mod>