This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using dwg = System.Drawing; | |
| using Microsoft.Msagl.Drawing; | |
| public class JsonNode | |
| { | |
| [JsonPropertyName("id")] | |
| public string Id { get; set; } | |
| [JsonPropertyName("label")] | |
| public string Label { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| krypto_nat | |
| faith | |
| alice_marrs | |
| amouranth | |
| gloriamatvien | |
| stream_sniperka | |
| pinkfloweremoji | |
| loreliamia | |
| firedancer | |
| lina_asmr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| "krypto_nat", | |
| "faith", | |
| "alice_marrs", | |
| "amouranth", | |
| "gloriamatvien", | |
| "stream_sniperka", | |
| "pinkfloweremoji", | |
| "loreliamia", | |
| "firedancer", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Main() | |
| { | |
| using(var data = Heroes.Icons.DataDocument.HeroDataDocument.Parse(@"C:\Users\patri\Downloads\heroes-data-2.53.2.84249_all.tar\heroes-data-2.53.2.84249_all\2.53.2.84249\data\herodata_84249_localized.json")) | |
| { | |
| Random random = new Random(); | |
| var result = data.GetAttributeIds | |
| .Select(attributeId => data.GetHeroByAttributeId(attributeId, false, false, false, true)) | |
| .SelectMany(hero => hero.HeroUnits.Select(hu => hu.Id).Concat(new[] { hero.Id })) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async Task Main() | |
| { | |
| MagickImageFactory imageFactory = new MagickImageFactory(); | |
| var heroIcons = Directory.GetFiles(@"C:\Users\patri\OneDrive\Pictures\SaltySadism\hero-icons").Select(x => new { Hero = x.Split("storm_ui_minimapicon_")[1], Icon = imageFactory.Create(new FileInfo(x)) }).Where(x => x.Hero.Contains("kel")).ToList(); | |
| // heroIcons.ForEach((heroIcons) => heroIcons.Icon.Grayscale()); | |
| await Task.Run(() => | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public IEnumerable<Focus> GetFocusPlayers(TimeSpan now, Replay replay) | |
| { | |
| if (replay == null) | |
| throw new ArgumentNullException(nameof(replay)); | |
| foreach (var unit in replay.Units.Where(unit => gameData.GetUnitGroup(unit.Name) == Unit.UnitGroup.MapObjective && gameData.VehicleUnits.Contains(unit.Name))) | |
| { | |
| var startTime = unit.Positions.Select(p => p.TimeSpan).Min(); | |
| var endTime = unit.Positions.Select(p => p.TimeSpan).Max(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Diagnostics; | |
| using System.Drawing; | |
| using System.Drawing.Imaging; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| using System.Threading.Tasks; | |
| using Windows.Graphics.Imaging; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SvgService | |
| { | |
| private readonly Dictionary<string, MarkupString> svgs = new Dictionary<string, MarkupString>(); | |
| private readonly MarkupString Empty = new MarkupString(); | |
| public MarkupString GetSvg(EcosystemKind kind) => kind switch | |
| { | |
| EcosystemKind.Docker => svgs["docker"], | |
| EcosystemKind.Gradle => svgs["gradle"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.CommandLine; | |
| using System.CommandLine.Builder; | |
| using System.CommandLine.Invocation; | |
| using System.CommandLine.Rendering; | |
| using System.IO; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using HeroesReplay.Spectator; | |
| using Microsoft.Extensions.Configuration; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using Microsoft.Extensions.Configuration; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Logging; | |
| using System.CommandLine; | |
| using System.CommandLine.Builder; | |
| using System.CommandLine.Invocation; | |
| using System.IO; | |
| using System.Linq; |