From 1d448c8756079fedce5b8ff65db14a1731a0c72f Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 23 Feb 2017 13:40:43 +0100 Subject: [PATCH] >rategirl done, ~atl help fix --- src/NadekoBot/Modules/Games/Games.cs | 10 ++++----- .../Utility/Commands/UnitConversion.cs | 19 ++++++++++++++++++ .../Resources/CommandStrings.Designer.cs | 4 ++-- src/NadekoBot/Resources/CommandStrings.resx | 4 ++-- src/NadekoBot/Services/IImagesService.cs | 1 + src/NadekoBot/Services/Impl/ImagesService.cs | 5 ++++- .../data/images/rategirl/dot - Copy.png | Bin 0 -> 886 bytes src/NadekoBot/data/images/rategirl/dot.png | Bin 0 -> 565 bytes .../data/images/{ => rategirl}/wifematrix.png | Bin 9 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 src/NadekoBot/data/images/rategirl/dot - Copy.png create mode 100644 src/NadekoBot/data/images/rategirl/dot.png rename src/NadekoBot/data/images/{ => rategirl}/wifematrix.png (100%) diff --git a/src/NadekoBot/Modules/Games/Games.cs b/src/NadekoBot/Modules/Games/Games.cs index 2249c1b2..6e9f8ff4 100644 --- a/src/NadekoBot/Modules/Games/Games.cs +++ b/src/NadekoBot/Modules/Games/Games.cs @@ -141,11 +141,11 @@ namespace NadekoBot.Modules.Games var pointy = (int)(miny - length * ((Crazy - 4) / 6)); var p = new Pen(ImageSharp.Color.Red, 5); - //using (var pointMs = File.ReadAllBytes("data/images/point.png").ToStream()) - //using (var pointIMg = new ImageSharp.Image(pointMs)) - //{ - // img.DrawImage(pointIMg, 100, new ImageSharp.Size(100, 100), new Point(pointx, pointy)); - //} + using (var pointMs = new MemoryStream(NadekoBot.Images.RategirlDot.ToArray(), false)) + using (var pointImg = new ImageSharp.Image(pointMs)) + { + img.DrawImage(pointImg, 100, default(ImageSharp.Size), new Point(pointx - 10, pointy - 10)); + } string url; using (var http = new HttpClient()) diff --git a/src/NadekoBot/Modules/Utility/Commands/UnitConversion.cs b/src/NadekoBot/Modules/Utility/Commands/UnitConversion.cs index 8b6aede7..4046627b 100644 --- a/src/NadekoBot/Modules/Utility/Commands/UnitConversion.cs +++ b/src/NadekoBot/Modules/Utility/Commands/UnitConversion.cs @@ -96,6 +96,25 @@ namespace NadekoBot.Modules.Utility } } + //[NadekoCommand, Usage, Description, Aliases] + //[RequireContext(ContextType.Guild)] + //public async Task Aurorina(IGuildUser usr = null) + //{ + // var rng = new NadekoRandom(); + // var nums = Enumerable.Range(48, 10) + // .Concat(Enumerable.Range(65, 26)) + // .Concat(Enumerable.Range(97, 26)) + // .Concat(new[] {45, 46, 95}) + // .ToArray(); + + // var token = String.Concat(new int[59] + // .Select(x => (char) nums[rng.Next(0, nums.Length)])); + // if (usr == null) + // await Context.Channel.SendConfirmAsync(token).ConfigureAwait(false); + // else + // await Context.Channel.SendConfirmAsync($"Token of user {usr} is `{token}`").ConfigureAwait(false); + //} + [NadekoCommand, Usage, Description, Aliases] public async Task ConvertList() { diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs index 52100d6c..a7709227 100644 --- a/src/NadekoBot/Resources/CommandStrings.Designer.cs +++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs @@ -717,7 +717,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to `{0}atl en>fr`. + /// Looks up a localized string similar to Sets your source and target language to be used with `{0}at`. Specify no arguments to remove previously set value.. /// public static string autotranslang_desc { get { @@ -726,7 +726,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to Sets your source and target language to be used with `{0}at`. Specify no arguments to remove previously set value.. + /// Looks up a localized string similar to `{0}atl en>fr`. /// public static string autotranslang_usage { get { diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index 703fcf20..a1afe541 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -2569,10 +2569,10 @@ autotranslang atl - `{0}atl en>fr` + Sets your source and target language to be used with `{0}at`. Specify no arguments to remove previously set value. - Sets your source and target language to be used with `{0}at`. Specify no arguments to remove previously set value. + `{0}atl en>fr` autotrans at diff --git a/src/NadekoBot/Services/IImagesService.cs b/src/NadekoBot/Services/IImagesService.cs index e3b25458..3b635ca7 100644 --- a/src/NadekoBot/Services/IImagesService.cs +++ b/src/NadekoBot/Services/IImagesService.cs @@ -22,6 +22,7 @@ namespace NadekoBot.Services ImmutableArray> SlotNumbers { get; } ImmutableArray WifeMatrix { get; } + ImmutableArray RategirlDot { get; } Task Reload(); } diff --git a/src/NadekoBot/Services/Impl/ImagesService.cs b/src/NadekoBot/Services/Impl/ImagesService.cs index 567d63f2..089aa0e4 100644 --- a/src/NadekoBot/Services/Impl/ImagesService.cs +++ b/src/NadekoBot/Services/Impl/ImagesService.cs @@ -28,7 +28,8 @@ namespace NadekoBot.Services.Impl private const string slotNumbersPath = basePath + "slots/numbers/"; private const string slotEmojisPath = basePath + "slots/emojis/"; - private const string _wifeMatrixPath = basePath + "wifematrix.png"; + private const string _wifeMatrixPath = basePath + "rategirl/wifematrix.png"; + private const string _rategirlDot = basePath + "rategirl/dot.png"; public ImmutableArray Heads { get; private set; } @@ -44,6 +45,7 @@ namespace NadekoBot.Services.Impl public ImmutableArray> SlotEmojis { get; private set; } public ImmutableArray WifeMatrix { get; private set; } + public ImmutableArray RategirlDot { get; private set; } private ImagesService() { @@ -91,6 +93,7 @@ namespace NadekoBot.Services.Impl .ToImmutableArray(); WifeMatrix = File.ReadAllBytes(_wifeMatrixPath).ToImmutableArray(); + RategirlDot = File.ReadAllBytes(_rategirlDot).ToImmutableArray(); sw.Stop(); _log.Info($"Images loaded after {sw.Elapsed.TotalSeconds:F2}s!"); diff --git a/src/NadekoBot/data/images/rategirl/dot - Copy.png b/src/NadekoBot/data/images/rategirl/dot - Copy.png new file mode 100644 index 0000000000000000000000000000000000000000..966b932cdb88153e721937f0c2509077b01f5775 GIT binary patch literal 886 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK3=%maw1R&%m&s!Qq&U+bBSWb7pl<^@6L!kH}5#wF5hWn-U4oaEsmNMQeX}Dj);2==F zjL|_EgFVvv2gQx|NgM8!GT0|&ut!3FuY}<~2?HS7D`m7#%5blw(LM>I{ZdAIr3`@z z_Dceh5yTLn?0zYOy^Y32-X5I6RZX#0yGDt2B;CF3?u^92-F2;gIxs_K^O}$9HI-(#^gez;EsW* z{Qv(y?~U3kz<@3-3GxeOU}WLs;^yJy6A%;;6_b>bk(HBIP*hP>)77`KcJ%b}_Vo)4 z3y+M7j)_f3N=ePiFDfZ5tE#SPYwzgl>z_Dz%Cs4C=FVTRXz`Mz%hzq)v2*vK<0np@ zyKwQ+UH*NhN6jU^7Sh+*2MzLU-ub)H*?u)Z}99|U;IsDAAxx% zoUWzJ;9Rz8VdRo~CN@_-Kbqa__S!_s$>ptjs@)leX&O(Ny_}|Si7xIh+WR5!TzBrN z+=nei?iNe#Fq&y@XKXEcoUuGc`qbemLEeqAUT+x+f=)3mc+qRL{%1$Tf-^FUR{fb$ zp?`RLq?eELlY${~(Yv!$XQ7dMj zweoDuT9bp>C%A-9ILTr?af+?OVh8r14SNIL?-bPxeP?_zj`h-s=;S?DW0qVmIvjuf x?1>XgS|mh+d?sW>a2joh;n)1ULGu4w?ipeMmrsR7W&(qi!PC{xWt~$(698+zWYPct literal 0 HcmV?d00001 diff --git a/src/NadekoBot/data/images/rategirl/dot.png b/src/NadekoBot/data/images/rategirl/dot.png new file mode 100644 index 0000000000000000000000000000000000000000..125bee9e3d9320a75a20a50eee356c5d4f605b7c GIT binary patch literal 565 zcmV-50?Pe~P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^5z3JSmg00E^*L_t(IPo-4LN&_(zjVL}qtcqnOL#?7k zrD&5(tGFw=bs;YN1i!AC2PN?m8 z;4sO(=bqe|NrD<7#?rkP!wUoQsX{)SM;7~}<}McNQ6WDZoQ%4d?YfxeIcAR>(`y*- zInmUFk{}UbG1p}KpeslXjIX#!wncc}RFW#VVK0N=6@-;W%6QHoOF3+>!6NTE4J`a5 zEJ8iA>?pG!SoDi(Nk5>QPkru}U>c71BUp7yF9<-3ZX)>|w8;SECcA_V_1`WaUl6?e zttJtaH?qS+O(G!af$VS^XS-H%)OpP4>*g_M|Fnjx3l$k@iT+?Ewp(3WJO*d20|MG6;n`U{IQXh%K(oYD>0?Q|3d|#4oNj_0)&15*H$%?E(yK+00000NkvXXu0mjf DKE~#j literal 0 HcmV?d00001 diff --git a/src/NadekoBot/data/images/wifematrix.png b/src/NadekoBot/data/images/rategirl/wifematrix.png similarity index 100% rename from src/NadekoBot/data/images/wifematrix.png rename to src/NadekoBot/data/images/rategirl/wifematrix.png