Skip to content

Commit

Permalink
Add more sounds, add select all button, fix shortcut icons
Browse files Browse the repository at this point in the history
  • Loading branch information
shamrickus committed Jun 13, 2018
1 parent 11605d3 commit 6177ca9
Show file tree
Hide file tree
Showing 16 changed files with 286 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DotaInstaller/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</startup>
<appSettings>
<add key="SteamLocation" value="C:\Program Files (x86)\Steam\SteamApps\common\dota 2 beta" />
<add key="CurrentVersion" value="1.1.1" />
<add key="CurrentVersion" value="1.1.6" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<system.web>
Expand Down
2 changes: 0 additions & 2 deletions DotaInstaller/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ public void BringToFront()

public ModPack Mods { get; set; }

public string EndPoint;

public void CheckForUpdate(object sender, RoutedEventArgs e)
{
if (CheckForUpdates())
Expand Down
4 changes: 2 additions & 2 deletions DotaInstaller/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.2")]
[assembly: AssemblyFileVersion("1.0.0.2")]
[assembly: AssemblyVersion("1.0.0.4")]
[assembly: AssemblyFileVersion("1.0.0.4")]
15 changes: 11 additions & 4 deletions DotaInstaller/VpkCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ internal static class VpkCompiler

static VpkCompiler()
{
Clean();
Create();
}

Expand All @@ -26,10 +27,16 @@ public static void Create()
public static void Clean()
{
var dir = new DirectoryInfo($@"{Directory.GetCurrentDirectory()}\{VPK_DIR}");
foreach (var file in dir.GetFiles())
file.Delete();
foreach (var directory in dir.GetDirectories())
directory.Delete(true);
if (dir.Exists)
{
foreach (var file in dir.GetFiles())
file.Delete();
foreach (var directory in dir.GetDirectories())
directory.Delete(true);
}
var vpk = new FileInfo($@"{Directory.GetCurrentDirectory()}\{VPK_COMP}");
if(vpk.Exists)
vpk.Delete();
}
}
}
56 changes: 56 additions & 0 deletions DotaInstaller/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,60 @@
<Type>Sound</Type>
</FileDescr>
</Mod>
<Mod>
<DisplayName>Wow</DisplayName>
<Description>Replace Phantom Assassin Coup de grace with Wow</Description>
<SampleFile>data\pa\Wow.mp3</SampleFile>

<FileDescr>
<Path>sounds\weapons\hero\phantom_assassin</Path>
<Name>coup_de_grace.vsnd_c</Name>
<SourcePath>data\pa\wow.vsnd_c</SourcePath>
<Type>Sound</Type>
</FileDescr>
</Mod>
<Mod>
<DisplayName>Allahu Akbar</DisplayName>
<Description>Replace Techies Suicide with Allahu Akbar</Description>
<SampleFile>data\techies\suicide.mp3</SampleFile>

<FileDescr>
<Path>sounds\weapons\hero\techies</Path>
<Name>arc_suicide.vsnd_c</Name>
<SourcePath>data\techies\suicide.vsnd_c</SourcePath>
<Type>Sound</Type>
</FileDescr>
<FileDescr>
<Path>sounds\weapons\hero\techies</Path>
<Name>suicide.vsnd_c</Name>
<SourcePath>data\techies\suicide.vsnd_c</SourcePath>
<Type>Sound</Type>
</FileDescr>
</Mod>
<Mod>
<DisplayName>On All Levels</DisplayName>
<Description>Replaces Lycan Ult</Description>
<SampleFile>data\lycan\ss.mp3</SampleFile>

<FileDescr>
<Path>sounds\weapons\hero\lycan</Path>
<Name>shape_shift.vsnd_c</Name>
<SourcePath>data\lycan\ss.vsnd_c</SourcePath>
<Type>Sound</Type>
</FileDescr>
</Mod>
<!--
<Mod>
<DisplayName></DisplayName>
<Description></Description>
<SampleFile></SampleFile>
<FileDescr>
<Path></Path>
<Name></Name>
<SourcePath></SourcePath>
<Type></Type>
</FileDescr>
</Mod>
-->
</ModPack>
Binary file added DotaInstaller/data/lycan/ss.mp3
Binary file not shown.
Binary file added DotaInstaller/data/lycan/ss.vsnd_c
Binary file not shown.
Binary file added DotaInstaller/data/pa/Wow.mp3
Binary file not shown.
Binary file added DotaInstaller/data/pa/wow.vsnd_c
Binary file not shown.
Binary file added DotaInstaller/data/techies/suicide.mp3
Binary file not shown.
Binary file added DotaInstaller/data/techies/suicide.vsnd_c
Binary file not shown.
7 changes: 7 additions & 0 deletions DotaInstaller/src/DotaModel/Dota2Tome.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Threading;
using System.Windows.Forms;
using Application = System.Windows.Application;

Expand Down Expand Up @@ -110,6 +111,12 @@ public static void UpdateLocation()
public static void CreateAndCopy(string SteamLocation, string pName)
{
Directory.CreateDirectory(Path.Combine(SteamLocation, "game", pName));
var file = new FileInfo(Path.Combine(Directory.GetCurrentDirectory(), VpkCompiler.VPK_COMP));
while (file.Exists == false)
{
Thread.Sleep(100);
file.Refresh();
}
File.Copy(Path.Combine(Directory.GetCurrentDirectory(), VpkCompiler.VPK_COMP), Path.Combine(SteamLocation, "game", pName, VpkCompiler.VPK_COMP), true);
}

Expand Down
3 changes: 2 additions & 1 deletion DotaInstaller/src/ModPack/ModPack.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using System.Xml.Serialization;

namespace DotaInstaller.src.ModPack
Expand All @@ -14,7 +15,7 @@ public class ModPack

public void Copy()
{
foreach (var mod in Mods)
foreach (var mod in Mods.Where(mod => mod.Selected))
{
mod.Copy();
}
Expand Down
5 changes: 4 additions & 1 deletion DotaInstaller/src/ModPack/ModPackView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<Button Content="Install" Height="40" IsEnabled="{Binding Enabled}" VerticalAlignment="Bottom" Panel.ZIndex="5" Click="Install" />
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Panel.ZIndex="5">
<Button Content="Install" Width="655px" Height="40" IsEnabled="{Binding Enabled}" Panel.ZIndex="5" Click="Install" />
<Button Content="Select All" Click="SelectAll" Height="40" Margin="7 0 0 0" />
</StackPanel>
</Grid>
</UserControl>
8 changes: 8 additions & 0 deletions DotaInstaller/src/ModPack/ModPackView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,13 @@ public void OnChildChecked(object sender, PropertyChangedEventArgs propertyChang
ViewModel.AddOrUpdate();
}
}

public void SelectAll(object sender, RoutedEventArgs e)
{
foreach (var mod in ViewModel.VMods)
{
mod.Selected = true;
}
}
}
}
Loading

0 comments on commit 6177ca9

Please sign in to comment.