mirror of
https://github.com/MathiasLui/CSGO-Projects.git
synced 2025-05-06 13:51:18 +00:00
Change "SteamHelpers" csproj and "Shared" namespace to SteamShared
This commit is contained in:
parent
50ac34fb28
commit
07d2a098b5
67 changed files with 39 additions and 39 deletions
|
@ -5,7 +5,7 @@ VisualStudioVersion = 17.1.32228.430
|
|||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DamageCalculator", "DamageCalculator\DamageCalculator.csproj", "{7A7AE40F-8677-44E3-873A-4AB7C9FCFEB4}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamHelpers", "..\Shared\SteamHelpers\SteamHelpers\SteamHelpers.csproj", "{3632D445-DC7D-43FC-AC66-8503F50FCA2A}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamShared", "..\SteamShared\SteamShared\SteamShared\SteamShared.csproj", "{3632D445-DC7D-43FC-AC66-8503F50FCA2A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<Resource Include="icon_b_site.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Shared\SteamHelpers\SteamHelpers\SteamHelpers.csproj" />
|
||||
<ProjectReference Include="..\..\SteamShared\SteamShared\SteamShared\SteamShared.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Gameloop.Vdf" Version="0.6.1" />
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<Resource Include="icon_b_site.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Shared\SteamHelpers\SteamHelpers\SteamHelpers.csproj" />
|
||||
<ProjectReference Include="..\..\SteamShared\SteamShared\SteamShared\SteamShared.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.3.0" />
|
||||
|
|
|
@ -14,8 +14,8 @@ using System.Windows.Media;
|
|||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using Shared.Models;
|
||||
using Shared.ZatVdfParser;
|
||||
using SteamShared.Models;
|
||||
using SteamShared.ZatVdfParser;
|
||||
using System.Xml.Serialization;
|
||||
using System.Globalization;
|
||||
using System.Collections.ObjectModel;
|
||||
|
@ -94,8 +94,8 @@ namespace Damage_Calculator
|
|||
InitializeComponent();
|
||||
Globals.LoadSettings();
|
||||
|
||||
Shared.Globals.Settings.CsgoHelper.CsgoPath = Shared.Globals.Settings.SteamHelper.GetGamePathFromExactName("Counter-Strike: Global Offensive");
|
||||
if (Shared.Globals.Settings.CsgoHelper.CsgoPath == null)
|
||||
SteamShared.Globals.Settings.CsgoHelper.CsgoPath = SteamShared.Globals.Settings.SteamHelper.GetGamePathFromExactName("Counter-Strike: Global Offensive");
|
||||
if (SteamShared.Globals.Settings.CsgoHelper.CsgoPath == null)
|
||||
{
|
||||
MessageBox.Show("Make sure you have installed CS:GO and Steam correctly.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
this.Close();
|
||||
|
@ -289,13 +289,13 @@ namespace Damage_Calculator
|
|||
|
||||
private void BgWorker_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
var maps = Shared.Globals.Settings.CsgoHelper.GetMaps();
|
||||
var maps = SteamShared.Globals.Settings.CsgoHelper.GetMaps();
|
||||
bgWorker.ReportProgress(0, maps);
|
||||
var serializer = new XmlSerializer(typeof(List<CsgoWeapon>));
|
||||
|
||||
List<CsgoWeapon> weapons;
|
||||
|
||||
string itemsFile = System.IO.Path.Combine(Shared.Globals.Settings.CsgoHelper.CsgoPath, "csgo\\scripts\\items\\items_game.txt");
|
||||
string itemsFile = System.IO.Path.Combine(SteamShared.Globals.Settings.CsgoHelper.CsgoPath, "csgo\\scripts\\items\\items_game.txt");
|
||||
string saveFileDir = MainWindow.FilesPath;
|
||||
string currentHash = calculateMD5(itemsFile);
|
||||
|
||||
|
@ -329,7 +329,7 @@ namespace Damage_Calculator
|
|||
}
|
||||
|
||||
// We didn't return cause we didn't find an up-to-date WPD file so parse new weapon data
|
||||
weapons = Shared.Globals.Settings.CsgoHelper.GetWeapons();
|
||||
weapons = SteamShared.Globals.Settings.CsgoHelper.GetWeapons();
|
||||
serializer.Serialize(new FileStream(System.IO.Path.Combine(saveFileDir, currentHash + MainWindow.WeaponsFileExtension), FileMode.Create), weapons);
|
||||
bgWorker.ReportProgress(1, weapons);
|
||||
}
|
||||
|
@ -426,7 +426,7 @@ namespace Damage_Calculator
|
|||
map.AmountHostages = 0;
|
||||
map.SpawnPoints.Clear();
|
||||
|
||||
map.EntityList = Shared.Globals.Settings.CsgoHelper.ReadEntityListFromBsp(map.BspFilePath);
|
||||
map.EntityList = SteamShared.Globals.Settings.CsgoHelper.ReadEntityListFromBsp(map.BspFilePath);
|
||||
|
||||
// Current format for one entity is:
|
||||
//
|
||||
|
@ -543,7 +543,7 @@ namespace Damage_Calculator
|
|||
if (map.NavFilePath == null || map.AinFilePath == null)
|
||||
{
|
||||
// If either no NAV or no AIN file has been found, try to update them via the BSP pakfile
|
||||
var navFilesFound = Shared.Globals.Settings.CsgoHelper.ReadIfPackedNavFilesInBsp(map.BspFilePath);
|
||||
var navFilesFound = SteamShared.Globals.Settings.CsgoHelper.ReadIfPackedNavFilesInBsp(map.BspFilePath);
|
||||
if (navFilesFound.Item1)
|
||||
{
|
||||
map.NavFileBspPacked = true;
|
||||
|
@ -560,7 +560,7 @@ namespace Damage_Calculator
|
|||
if(map.NavFilePath != null && !map.NavFileBspPacked)
|
||||
{
|
||||
// Nav file not packed and a file path for it is existent so parse it here
|
||||
map.NavMesh = Shared.NavFile.Parse(new FileStream(map.NavFilePath, FileMode.Open));
|
||||
map.NavMesh = SteamShared.NavFile.Parse(new FileStream(map.NavFilePath, FileMode.Open));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -701,14 +701,14 @@ namespace Damage_Calculator
|
|||
}
|
||||
}
|
||||
|
||||
if (Globals.Settings.NavDisplayMode != Shared.NavDisplayModes.None && navMeshesInCanvas.Count > 0 && this.mapCanvas.ActualWidth > 0 && this.mapCanvas.ActualHeight > 0)
|
||||
if (Globals.Settings.NavDisplayMode != SteamShared.NavDisplayModes.None && navMeshesInCanvas.Count > 0 && this.mapCanvas.ActualWidth > 0 && this.mapCanvas.ActualHeight > 0)
|
||||
// Canvas has already settled - no need to redraw
|
||||
return;
|
||||
|
||||
// Remove all NAV meshes from canvas
|
||||
navMeshesInCanvas.ForEach(navMesh => canvasRemove(navMesh));
|
||||
|
||||
if (Globals.Settings.NavDisplayMode == Shared.NavDisplayModes.None)
|
||||
if (Globals.Settings.NavDisplayMode == SteamShared.NavDisplayModes.None)
|
||||
// Don't draw and NAV areas if disabled
|
||||
return;
|
||||
|
||||
|
@ -721,7 +721,7 @@ namespace Damage_Calculator
|
|||
{
|
||||
// Don't draw area if it's not in the threshold that's set in the settings
|
||||
// First get the percentage of the average area height between the min and max area
|
||||
double heightPercentage = Shared.Globals.Map(area.MedianPosition.Z, this.loadedMap.NavMesh.MinZ ?? 0, this.loadedMap.NavMesh.MaxZ ?? 0, 0, 1);
|
||||
double heightPercentage = SteamShared.Globals.Map(area.MedianPosition.Z, this.loadedMap.NavMesh.MinZ ?? 0, this.loadedMap.NavMesh.MaxZ ?? 0, 0, 1);
|
||||
if (heightPercentage < Globals.Settings.ShowNavAreasAbove || heightPercentage > Globals.Settings.ShowNavAreasBelow)
|
||||
continue;
|
||||
|
||||
|
@ -1059,8 +1059,8 @@ namespace Damage_Calculator
|
|||
private void calculateDistanceDuration()
|
||||
{
|
||||
double timeRunning = this.unitsDistance / this.selectedWeapon.RunningSpeed;
|
||||
double timeWalking = this.unitsDistance / (this.selectedWeapon.RunningSpeed * Shared.CsgoHelper.WalkModifier);
|
||||
double timeCrouching = this.unitsDistance / (this.selectedWeapon.RunningSpeed * Shared.CsgoHelper.DuckModifier);
|
||||
double timeWalking = this.unitsDistance / (this.selectedWeapon.RunningSpeed * SteamShared.CsgoHelper.WalkModifier);
|
||||
double timeCrouching = this.unitsDistance / (this.selectedWeapon.RunningSpeed * SteamShared.CsgoHelper.DuckModifier);
|
||||
|
||||
this.txtTimeRunning.Text = getTimeStringFromSeconds(timeRunning);
|
||||
this.txtTimeWalking.Text = getTimeStringFromSeconds(timeWalking);
|
||||
|
@ -1254,8 +1254,8 @@ namespace Damage_Calculator
|
|||
|
||||
foreach (Vector3[] group in groups)
|
||||
{
|
||||
float xWeight = Shared.Globals.Map(x, group[1].X, group[0].X, 0, 1);
|
||||
float yWeight = Shared.Globals.Map(y, group[2].Y, group[0].Y, 0, 1);
|
||||
float xWeight = SteamShared.Globals.Map(x, group[1].X, group[0].X, 0, 1);
|
||||
float yWeight = SteamShared.Globals.Map(y, group[2].Y, group[0].Y, 0, 1);
|
||||
float combinedWeight = xWeight * yWeight;
|
||||
|
||||
resultHeight += combinedWeight * group[0].Z;
|
||||
|
@ -1404,21 +1404,21 @@ namespace Damage_Calculator
|
|||
else
|
||||
{
|
||||
// Map average area height between two configurable colours
|
||||
byte newA = (byte)Shared.Globals.Map(area.MedianPosition.Z, loadedMap.NavMesh.MinZ ?? 0, loadedMap.NavMesh.MaxZ ?? 0, Globals.Settings.NavLowColour.A, Globals.Settings.NavHighColour.A);
|
||||
byte newR = (byte)Shared.Globals.Map(area.MedianPosition.Z, loadedMap.NavMesh.MinZ ?? 0, loadedMap.NavMesh.MaxZ ?? 0, Globals.Settings.NavLowColour.R, Globals.Settings.NavHighColour.R);
|
||||
byte newG = (byte)Shared.Globals.Map(area.MedianPosition.Z, loadedMap.NavMesh.MinZ ?? 0, loadedMap.NavMesh.MaxZ ?? 0, Globals.Settings.NavLowColour.G, Globals.Settings.NavHighColour.G);
|
||||
byte newB = (byte)Shared.Globals.Map(area.MedianPosition.Z, loadedMap.NavMesh.MinZ ?? 0, loadedMap.NavMesh.MaxZ ?? 0, Globals.Settings.NavLowColour.B, Globals.Settings.NavHighColour.B);
|
||||
byte newA = (byte)SteamShared.Globals.Map(area.MedianPosition.Z, loadedMap.NavMesh.MinZ ?? 0, loadedMap.NavMesh.MaxZ ?? 0, Globals.Settings.NavLowColour.A, Globals.Settings.NavHighColour.A);
|
||||
byte newR = (byte)SteamShared.Globals.Map(area.MedianPosition.Z, loadedMap.NavMesh.MinZ ?? 0, loadedMap.NavMesh.MaxZ ?? 0, Globals.Settings.NavLowColour.R, Globals.Settings.NavHighColour.R);
|
||||
byte newG = (byte)SteamShared.Globals.Map(area.MedianPosition.Z, loadedMap.NavMesh.MinZ ?? 0, loadedMap.NavMesh.MaxZ ?? 0, Globals.Settings.NavLowColour.G, Globals.Settings.NavHighColour.G);
|
||||
byte newB = (byte)SteamShared.Globals.Map(area.MedianPosition.Z, loadedMap.NavMesh.MinZ ?? 0, loadedMap.NavMesh.MaxZ ?? 0, Globals.Settings.NavLowColour.B, Globals.Settings.NavHighColour.B);
|
||||
newColour = Color.FromArgb(newA, newR, newG, newB);
|
||||
}
|
||||
|
||||
switch (Globals.Settings.NavDisplayMode)
|
||||
{
|
||||
case Shared.NavDisplayModes.Wireframe:
|
||||
case SteamShared.NavDisplayModes.Wireframe:
|
||||
pathOfArea.Stroke = new SolidColorBrush(newColour);
|
||||
pathOfArea.StrokeThickness = 1;
|
||||
pathOfArea.Fill = null;
|
||||
break;
|
||||
case Shared.NavDisplayModes.Filled:
|
||||
case SteamShared.NavDisplayModes.Filled:
|
||||
pathOfArea.Stroke = null;
|
||||
pathOfArea.StrokeThickness = 0;
|
||||
pathOfArea.Fill = new SolidColorBrush(newColour);
|
||||
|
@ -1440,7 +1440,7 @@ namespace Damage_Calculator
|
|||
if (this.hoveredNavAreas.Count > 0)
|
||||
{
|
||||
this.txtNavAreasAmount.Text = $"{(this.currentHeightLayer < 0 ? 0 : this.currentHeightLayer + 1)}/{this.hoveredNavAreas.Count}";
|
||||
this.txtNavAreaHeightPercentage.Text = Math.Round(Shared.Globals.Map(this.hoveredNavAreas[this.currentHeightLayer].MedianPosition.Z, this.loadedMap.NavMesh.MinZ ?? 0, this.loadedMap.NavMesh.MaxZ ?? 0, 0, 100), 1).ToString(CultureInfo.InvariantCulture) + " %";
|
||||
this.txtNavAreaHeightPercentage.Text = Math.Round(SteamShared.Globals.Map(this.hoveredNavAreas[this.currentHeightLayer].MedianPosition.Z, this.loadedMap.NavMesh.MinZ ?? 0, this.loadedMap.NavMesh.MaxZ ?? 0, 0, 100), 1).ToString(CultureInfo.InvariantCulture) + " %";
|
||||
this.txtNavAreaID.Text = this.hoveredNavAreas[this.currentHeightLayer].ID.ToString();
|
||||
this.txtNavAreaConnectionsAmount.Text = this.hoveredNavAreas[this.currentHeightLayer].ConnectionData.Sum(direction => direction.Count).ToString();
|
||||
this.txtNavAreaPlace.Text = this.hoveredNavAreas[this.currentHeightLayer].PlaceID == 0 ? "None" : this.loadedMap.NavMesh.Header.PlacesNames[this.hoveredNavAreas[this.currentHeightLayer].PlaceID - 1];
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Damage_Calculator
|
|||
// VISUAL SETTINGS
|
||||
|
||||
public REghZyFramework.Themes.ThemesController.ThemeTypes Theme { get; set; } = REghZyFramework.Themes.ThemesController.ThemeTypes.Dark;
|
||||
public List<Shared.Models.MapCustomOverwriteMapping> MapCoordinateOffsets { get; set; } = new();
|
||||
public List<SteamShared.Models.MapCustomOverwriteMapping> MapCoordinateOffsets { get; set; } = new();
|
||||
public bool ShowBombSites { get; set; } = true;
|
||||
public bool ShowSpawnAreas { get; set; } = true;
|
||||
public bool ShowStandardSpawns { get; set; } = true;
|
||||
|
@ -27,7 +27,7 @@ namespace Damage_Calculator
|
|||
public System.Windows.Media.Color NavLowColour { get; set; } = System.Windows.Media.Color.FromArgb(255, 20, 20, 20);
|
||||
public System.Windows.Media.Color NavHighColour { get; set; } = System.Windows.Media.Color.FromArgb(140, 255, 255, 255);
|
||||
public System.Windows.Media.Color NavHoverColour { get; set; } = System.Windows.Media.Color.FromArgb(140, 255, 165, 0);
|
||||
public Shared.NavDisplayModes NavDisplayMode { get; set; } = Shared.NavDisplayModes.None;
|
||||
public SteamShared.NavDisplayModes NavDisplayMode { get; set; } = SteamShared.NavDisplayModes.None;
|
||||
public double ShowNavAreasAbove { get; set; } = 0;
|
||||
public double ShowNavAreasBelow { get; set; } = 1;
|
||||
|
||||
|
|
|
@ -27,14 +27,14 @@ namespace Damage_Calculator
|
|||
/// <summary>
|
||||
/// We need this to set the map coordinate offsets for each map respectively.
|
||||
/// </summary>
|
||||
private Shared.Models.CsgoMap currentMap = null;
|
||||
private SteamShared.Models.CsgoMap currentMap = null;
|
||||
|
||||
private string getCurrentMapDDSName()
|
||||
{
|
||||
return System.IO.Path.GetFileNameWithoutExtension(currentMap.MapImagePath);
|
||||
}
|
||||
|
||||
public wndSettings(Shared.Models.CsgoMap currentMap)
|
||||
public wndSettings(SteamShared.Models.CsgoMap currentMap)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.currentMap = currentMap;
|
||||
|
@ -80,7 +80,7 @@ namespace Damage_Calculator
|
|||
this.colourNavHigh.SelectedColor = this.settings.NavHighColour;
|
||||
this.colourNavHover.SelectedColor = this.settings.NavHoverColour;
|
||||
|
||||
foreach(string navDisplayMode in Enum.GetNames(typeof(Shared.NavDisplayModes)))
|
||||
foreach(string navDisplayMode in Enum.GetNames(typeof(SteamShared.NavDisplayModes)))
|
||||
{
|
||||
comboNavDisplayModes.Items.Add(navDisplayMode);
|
||||
if (navDisplayMode == Enum.GetName(this.settings.NavDisplayMode))
|
||||
|
@ -124,7 +124,7 @@ namespace Damage_Calculator
|
|||
}
|
||||
else
|
||||
{
|
||||
this.settings.MapCoordinateOffsets.Add(new Shared.Models.MapCustomOverwriteMapping { DDSFileName = getCurrentMapDDSName(), CoordOffset = newCoords, MapScale = (float)this.intCurrentMapMultiplierOverride.Value });
|
||||
this.settings.MapCoordinateOffsets.Add(new SteamShared.Models.MapCustomOverwriteMapping { DDSFileName = getCurrentMapDDSName(), CoordOffset = newCoords, MapScale = (float)this.intCurrentMapMultiplierOverride.Value });
|
||||
}
|
||||
this.currentMap.MapOverwrite.CoordOffset = newCoords;
|
||||
this.currentMap.MapOverwrite.MapScale = (float)this.intCurrentMapMultiplierOverride.Value;
|
||||
|
@ -140,7 +140,7 @@ namespace Damage_Calculator
|
|||
this.settings.NavHighColour = this.colourNavHigh.SelectedColor ?? Globals.Settings.NavHighColour;
|
||||
this.settings.NavHoverColour = this.colourNavHover.SelectedColor ?? Globals.Settings.NavHoverColour;
|
||||
|
||||
this.settings.NavDisplayMode = (Shared.NavDisplayModes)Enum.Parse(typeof(Shared.NavDisplayModes), comboNavDisplayModes.SelectedItem.ToString());
|
||||
this.settings.NavDisplayMode = (SteamShared.NavDisplayModes)Enum.Parse(typeof(SteamShared.NavDisplayModes), comboNavDisplayModes.SelectedItem.ToString());
|
||||
|
||||
this.settings.ShowNavAreasAbove = sliderNavAbove.Value / 100f;
|
||||
this.settings.ShowNavAreasBelow = sliderNavBelow.Value / 100f;
|
||||
|
|
|
@ -5,9 +5,9 @@ VisualStudioVersion = 17.1.32407.343
|
|||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DamagePrinter", "DamagePrinter\DamagePrinter.csproj", "{AF6F5837-94D3-4D44-9D1C-6B5CD600C698}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamShared", "..\Shared\SteamHelpers\SteamHelpers\SteamShared.csproj", "{4DB55154-E33B-49D8-BE05-DC11CA5B32A4}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SteamShared", "..\SteamShared\SteamShared\SteamShared\SteamShared.csproj", "{4DB55154-E33B-49D8-BE05-DC11CA5B32A4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoreSoft.MathExpressions", "..\Shared\LoreSoft.MathExpressions\LoreSoft.MathExpressions.csproj", "{B6813448-FCE2-429C-81B5-9722FEA839B8}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoreSoft.MathExpressions", "..\SteamShared\LoreSoft.MathExpressions\LoreSoft.MathExpressions.csproj", "{B6813448-FCE2-429C-81B5-9722FEA839B8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Shared\LoreSoft.MathExpressions\LoreSoft.MathExpressions.csproj" />
|
||||
<ProjectReference Include="..\..\Shared\SteamHelpers\SteamHelpers\SteamShared.csproj" />
|
||||
<ProjectReference Include="..\..\SteamShared\LoreSoft.MathExpressions\LoreSoft.MathExpressions.csproj" />
|
||||
<ProjectReference Include="..\..\SteamShared\SteamShared\SteamShared\SteamShared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.1.32228.430
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamHelpers", "SteamHelpers\SteamHelpers.csproj", "{BC940FCA-87A6-41DB-A428-795B33268A22}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamShared", "SteamShared\SteamShared.csproj", "{BC940FCA-87A6-41DB-A428-795B33268A22}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
Loading…
Add table
Reference in a new issue