<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <RootNamespace>ArchipelagoMapMod</RootNamespace>
    <TargetFramework>net472</TargetFramework>
    <AssemblyTitle>ArchipelagoMapMod</AssemblyTitle>
    <Product>ArchipelagoMapMod</Product>
    <Description>A Hollow Knight mod for Archipelago that adds many new features to the map.</Description>
    <Copyright>Copyright Â© KonoTyran 2023</Copyright>
    <Authors>KonoTyran</Authors>
    <Version>2.3.1</Version>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <Deterministic>false</Deterministic>
    <ImplicitUsings>true</ImplicitUsings>
    <NoWarn>$(NoWarn);CS7035</NoWarn>
    <OutputPath>bin\$(Configuration)\</OutputPath>
    <LangVersion>latest</LangVersion>
    <HollowKnightRefs>../API</HollowKnightRefs>
    <ExportDir>bin/Publish</ExportDir>
    <ModName>Archipelago Map Mod</ModName>
  </PropertyGroup>
  <!--
        Create this file somewhere in the project directory. It should contain a property group with HollowKnightRefs pointing to your Managed folder.
        If you use Visual Studio, the HK Modding extension has a template for this file which will autodetect your installation.
    -->
  <Import Project="LocalOverrides.targets" Condition="Exists('LocalOverrides.targets')" />
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>portable</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>portable</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE;RELEASE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <Target Name="CopyMod" AfterTargets="PostBuildEvent">
    <RemoveDir Directories="$(ExportDir)/" />
    <MakeDir Directories="$(ExportDir)/" />
    <MakeDir Directories="$(ExportDir)/zip/" />
    <MakeDir Condition="!Exists('$(HollowKnightRefs)/Mods/$(ModName)/')" Directories="$(HollowKnightRefs)/Mods/$(ModName)/" />
    <Copy SourceFiles="$(TargetPath);$(TargetDir)/$(TargetName).pdb" DestinationFolder="$(HollowKnightRefs)/Mods/$(ModName)/" />
    <Copy SourceFiles="../README.md;$(TargetPath);$(TargetDir)/$(TargetName).pdb" DestinationFolder="$(ExportDir)/zip/" />
    <ZipDirectory SourceDirectory="$(ExportDir)/zip/" DestinationFile="$(ExportDir)/$(ModName).zip" />
    <RemoveDir Directories="$(ExportDir)/zip/" />
    <GetFileHash Files="$(ExportDir)/$(ModName).zip" Algorithm="SHA256">
      <Output TaskParameter="Items" ItemName="FilesWithHashes" />
    </GetFileHash>
    <WriteLinesToFile File="$(ExportDir)/SHA.txt" Lines="@(FilesWithHashes->'%(FileHash)')" Overwrite="true" Encoding="UTF-8" />
  </Target>
  <ItemGroup>
    <Compile Remove="Pathfinder\Instructions\EmptyInstruction.cs" />
    <Compile Remove="Pathfinder\Instructions\MiscInstruction.cs" />
    <Compile Remove="Pathfinder\Instructions\MiscTransitionInstruction.cs" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Resources\benchwarp.json" />
    <EmbeddedResource Include="Resources\locationHints.json" />
    <EmbeddedResource Include="Resources\locations.json" />
    <EmbeddedResource Include="Resources\Pathfinder\Compass\compassObjOverrides.json" />
    <EmbeddedResource Include="Resources\Pathfinder\Data\conditionalTerms.json" />
    <EmbeddedResource Include="Resources\Pathfinder\Data\waypointInstructions.json" />
    <EmbeddedResource Include="Resources\Pathfinder\Logic\edits.json" />
    <EmbeddedResource Include="Resources\Pathfinder\Logic\substitutions.json" />
    <EmbeddedResource Include="Resources\Pathfinder\Logic\transitions.json" />
    <EmbeddedResource Include="Resources\Pathfinder\Logic\waypoints.json" />
    <EmbeddedResource Include="Resources\quickMapGrids.json" />
    <EmbeddedResource Include="Resources\roomTexts.json" />
    <EmbeddedResource Include="Resources\roomTextsAM.json" />
    <EmbeddedResource Include="Resources\Data\*.json" />
    <EmbeddedResource Include="Resources\Logic\*.json" />
    <EmbeddedResource Include="Resources\Sprites\Pins\*.png" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Archipelago.MultiClient.Net.Analyzers" Version="1.3.0">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
  </ItemGroup>
  <ItemGroup>
    <Reference Include="Archipelago.MultiClient.Net">
      <HintPath>$(HollowKnightRefs)\Mods\Archipelago\Archipelago.MultiClient.Net.dll</HintPath>
    </Reference>
    <Reference Include="Assembly-CSharp">
      <HintPath>$(HollowKnightRefs)\Assembly-CSharp.dll</HintPath>
    </Reference>
    <Reference Include="RandomizerCore.Json">
      <HintPath>$(HollowKnightRefs)/Mods/RandomizerCore.Json/RandomizerCore.Json.dll</HintPath>
    </Reference>
    <Reference Include="Satchel">
      <HintPath>$(HollowKnightRefs)\Mods\Satchel\Satchel.dll</HintPath>
    </Reference>
    <Reference Include="BenchRando">
      <HintPath>$(HollowKnightRefs)\Mods\BenchRando\BenchRando.dll</HintPath>
    </Reference>
    <Reference Include="Benchwarp">
      <HintPath>$(HollowKnightRefs)\Mods\Benchwarp\Benchwarp.dll</HintPath>
    </Reference>
    <Reference Include="ConnectionMetadataInjector">
      <HintPath>$(HollowKnightRefs)\Mods\ConnectionMetadataInjector\ConnectionMetadataInjector.dll</HintPath>
    </Reference>
    <Reference Include="ItemChanger">
      <HintPath>$(HollowKnightRefs)\Mods\ItemChanger\ItemChanger.dll</HintPath>
    </Reference>
    <Reference Include="MagicUI">
      <HintPath>$(HollowKnightRefs)\Mods\MagicUI\MagicUI.dll</HintPath>
    </Reference>
    <Reference Include="MapChanger">
      <HintPath>$(HollowKnightRefs)\Mods\MapChanger\MapChanger.dll</HintPath>
    </Reference>
    <Reference Include="MenuChanger">
      <HintPath>$(HollowKnightRefs)\Mods\MenuChanger\MenuChanger.dll</HintPath>
    </Reference>
    <Reference Include="MMHOOK_Assembly-CSharp">
      <HintPath>$(HollowKnightRefs)\MMHOOK_Assembly-CSharp.dll</HintPath>
    </Reference>
    <Reference Include="MMHOOK_PlayMaker">
      <HintPath>$(HollowKnightRefs)\MMHOOK_PlayMaker.dll</HintPath>
    </Reference>
    <Reference Include="Newtonsoft.Json">
      <HintPath>$(HollowKnightRefs)\Newtonsoft.Json.dll</HintPath>
    </Reference>
    <Reference Include="PlayMaker">
      <HintPath>$(HollowKnightRefs)\PlayMaker.dll</HintPath>
    </Reference>
    <Reference Include="RandomizerCore">
      <HintPath>$(HollowKnightRefs)\Mods\RandomizerCore\RandomizerCore.dll</HintPath>
    </Reference>
    <Reference Include="Archipelago">
      <HintPath>$(HollowKnightRefs)\Mods\Archipelago\Archipelago.HollowKnight.dll</HintPath>
    </Reference>
    <Reference Include="RCPathfinder">
      <HintPath>$(HollowKnightRefs)\Mods\RCPathfinder\RCPathfinder.dll</HintPath>
    </Reference>
    <Reference Include="UnityEngine">
      <HintPath>$(HollowKnightRefs)\UnityEngine.dll</HintPath>
    </Reference>
    <Reference Include="UnityEngine.CoreModule">
      <HintPath>$(HollowKnightRefs)\UnityEngine.CoreModule.dll</HintPath>
    </Reference>
    <Reference Include="UnityEngine.TextCoreModule">
      <HintPath>$(HollowKnightRefs)\UnityEngine.TextCoreModule.dll</HintPath>
    </Reference>
    <Reference Include="UnityEngine.TextRenderingModule">
      <HintPath>$(HollowKnightRefs)\UnityEngine.TextRenderingModule.dll</HintPath>
    </Reference>
    <Reference Include="UnityEngine.UI">
      <HintPath>$(HollowKnightRefs)\UnityEngine.UI.dll</HintPath>
    </Reference>
  </ItemGroup>
</Project>
