<?xml version="1.0" encoding="utf-8"?>
<Mod id="4ecfcc62-5471-4435-b295-590df213e8d8" version="1">
  <Properties>
    <Name>Detailed Map Tacks</Name>
    <Authors>wltk, DeepLogic</Authors>
    <Teaser>Show yields and adjacency bonuses for your map tacks.</Teaser>
    <Description>Are you tired of calculating adjacency bonuses for your districts? This mod can help you plan the placement of your districts by calculating the potential yields and adjacency bonuses on your behalf. Simply add map tacks on your map and the yields from them will show up automatically. Enjoy planning!</Description>
    <AffectsSavedGames>0</AffectsSavedGames>
    <CompatibleVersions>1.2,2.0</CompatibleVersions>
  </Properties>

  <FrontEndActions>
    <UpdateDatabase id="dmt_settings">
      <File>config/dmt_config.xml</File>
    </UpdateDatabase>
    <UpdateText id="dmt_settings_text">
      <File Priority="1">config/en_us/dmt_options_text.xml</File>
      <File>config/dmt_options_translations_text.xml</File>
    </UpdateText>
  </FrontEndActions>

  <InGameActions>
    <AddUserInterfaces id="dmt_yieldcalculator">
      <Properties>
        <Context>InGame</Context>
      </Properties>
      <File>ui/dmt_yieldcalculator.xml</File>
    </AddUserInterfaces>
    <AddGameplayScripts id="mappinsubjectmanager">
      <Properties><LoadOrder>12345</LoadOrder></Properties> <!-- Higher than Map Tacks mod's 12000. -->
      <File>gameplay/mappinsubjectmanager.lua</File>
    </AddGameplayScripts>
    <ReplaceUIScript id="mappinmanager">
      <Properties>
        <LoadOrder>12345</LoadOrder> <!-- Higher than Map Tacks mod's 12000. -->
        <LuaContext>MapPinManager</LuaContext>
        <LuaReplace>ui/mappinmanager_dmt.lua</LuaReplace>
      </Properties>
    </ReplaceUIScript>
    <ReplaceUIScript id="mappinpopup">
      <Properties>
        <LoadOrder>12345</LoadOrder> <!-- Higher than Map Tacks mod's 12000. -->
        <LuaContext>MapPinPopup</LuaContext>
        <LuaReplace>ui/mappinpopup_dmt.lua</LuaReplace>
      </Properties>
    </ReplaceUIScript>
    <UpdateText id="dmt_text">
      <File Priority="1">config/en_us/dmt_options_text.xml</File>
      <File>config/dmt_options_translations_text.xml</File>
      <File Priority="1">text/en_us/dmt_text.xml</File>
      <File>text/dmt_translations_text.xml</File>
    </UpdateText>
    <!-- Importing our files so that other mods can include it and apply additional logic. -->
    <ImportFiles id="dmt_files">
      <Properties><LoadOrder>12345</LoadOrder></Properties> <!-- Higher than Map Tacks mod's 12000. -->
      <File>ui/dmt_modifiercalculator.lua</File>
      <File>ui/dmt_modifierrequirementchecker.lua</File>
      <File>ui/dmt_yieldcalculator.lua</File>
      <File>ui/dmt_yieldcalculator.xml</File>
      <File>ui/mappinmanager_dmt.lua</File>
      <File>ui/mappinmanager.xml</File>
      <File>ui/mappinpopup_dmt.lua</File>
    </ImportFiles>
  </InGameActions>

  <Files>
    <!-- Texts -->
    <File>config/en_us/dmt_options_text.xml</File>
    <File>config/dmt_options_translations_text.xml</File>
    <File>text/en_us/dmt_text.xml</File>
    <File>text/dmt_translations_text.xml</File>
    <!-- Game files -->
    <File>config/dmt_config.xml</File>
    <File>gameplay/mappinsubjectmanager.lua</File>
    <File>ui/dmt_modifiercalculator.lua</File>
    <File>ui/dmt_modifierrequirementchecker.lua</File>
    <File>ui/dmt_yieldcalculator.lua</File>
    <File>ui/dmt_yieldcalculator.xml</File>
    <File>ui/mappinmanager_dmt.lua</File>
    <File>ui/mappinmanager.xml</File>
    <File>ui/mappinpopup_dmt.lua</File>
  </Files>
</Mod>