Skip to content

Commit 7fd0fb2

Browse files
committed
update to recent breaking change with LogNullError
1 parent 3bf0bad commit 7fd0fb2

File tree

6 files changed

+456
-12
lines changed

6 files changed

+456
-12
lines changed

ASFAchievementManager/ASF-Achievement-Manager.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<Authors>Ryzhehvost</Authors>
5-
<AssemblyVersion>0.2.2.0</AssemblyVersion>
5+
<AssemblyVersion>0.2.2.1</AssemblyVersion>
66
<TargetFrameworks>net6.0;net48</TargetFrameworks>
77
<Nullable>enable</Nullable>
88
<LangVersion>latest</LangVersion>

ASFAchievementManager/ASFAchievementManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public Task OnLoaded() {
2626
public async Task<string?> OnBotCommand(Bot bot, EAccess access, string message, string[] args, ulong steamID = 0) {
2727
switch (args.Length) {
2828
case 0:
29-
bot.ArchiLogger.LogNullError(nameof(args));
29+
bot.ArchiLogger.LogNullError(null, nameof(args));
3030

3131
return null;
3232
case 1:
@@ -68,7 +68,7 @@ public Task OnLoaded() {
6868
}
6969
if (AchievementHandlers.TryGetValue(bot, out AchievementHandler? AchievementHandler)) {
7070
if (AchievementHandler == null) {
71-
bot.ArchiLogger.LogNullError(nameof(AchievementHandler));
71+
bot.ArchiLogger.LogNullError(AchievementHandler);
7272
return null;
7373
}
7474

@@ -129,7 +129,7 @@ public Task OnLoaded() {
129129
}
130130

131131
if (AchievementHandler == null) {
132-
bot.ArchiLogger.LogNullError(nameof(AchievementHandler));
132+
bot.ArchiLogger.LogNullError(AchievementHandler);
133133
return null;
134134
}
135135

ASFAchievementManager/AchievementHandler.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Globalization;
44
using System.IO;
@@ -16,7 +16,7 @@ namespace ASFAchievementManager {
1616
public sealed class AchievementHandler : ClientMsgHandler {
1717
public override void HandleMsg(IPacketMsg packetMsg) {
1818
if (packetMsg == null) {
19-
ASF.ArchiLogger.LogNullError(nameof(packetMsg));
19+
ASF.ArchiLogger.LogNullError(packetMsg);
2020

2121
return;
2222
}
@@ -192,9 +192,9 @@ internal async Task<string> GetAchievements(Bot bot, ulong gameID) {
192192
List<string> responses = new List<string>();
193193
List<StatData>? Stats = ParseResponse(response.Response);
194194
if (Stats == null) {
195-
bot.ArchiLogger.LogNullError(nameof(Stats));
195+
bot.ArchiLogger.LogNullError(Stats);
196196
} else if (Stats.Count == 0) {
197-
bot.ArchiLogger.LogNullError(nameof(Stats));
197+
bot.ArchiLogger.LogNullError(null, nameof(Stats));
198198
} else {
199199

200200
foreach (StatData stat in Stats) {
@@ -214,7 +214,7 @@ internal async Task<string> SetAchievements(Bot bot, uint appId, HashSet<uint> a
214214

215215
GetAchievementsCallback? response = await GetAchievementsResponse(bot, appId);
216216
if (response == null) {
217-
bot.ArchiLogger.LogNullError(nameof(response));
217+
bot.ArchiLogger.LogNullError(response);
218218
return "Can't retrieve achievements for " + appId.ToString(); ;
219219
}
220220

@@ -223,7 +223,7 @@ internal async Task<string> SetAchievements(Bot bot, uint appId, HashSet<uint> a
223223
}
224224

225225
if (response.Response == null) {
226-
bot.ArchiLogger.LogNullError(nameof(response.Response));
226+
bot.ArchiLogger.LogNullError(response.Response);
227227
responses.Add(Strings.WarningFailed);
228228
return "\u200B\n" + string.Join(Environment.NewLine, responses);
229229
}

ArchiSteamFarm

Submodule ArchiSteamFarm updated 95 files

build.bat

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ rem release generic version
2424
dotnet publish -c "Release" -f "net6.0" -o "out/generic" "/p:LinkDuringPublish=false"
2525
mkdir .\out\%CurrDirName%
2626
copy .\out\generic\%CurrDirName%.dll .\out\%CurrDirName%
27+
rem comment section below (downto :zip label) if you don't want to include documentation
28+
if not exist README.md (goto zip)
29+
where /q pandoc.exe
30+
if ERRORLEVEL 1 (
31+
copy README.md .\out\%CurrDirName%
32+
goto zip
33+
) else (
34+
pandoc --metadata title="%CurrDirName%" --standalone --columns 2000 -f markdown -t html --self-contained -c .\github-pandoc.css -o .\out\%CurrDirName%\README.html README.md
35+
)
36+
:zip
2737
7z a -tzip -mx7 .\out\%CurrDirName%.zip .\out\%CurrDirName%
2838
rmdir /Q /S out\%CurrDirName%
2939

@@ -33,5 +43,15 @@ rem comment section below if you don't target netf ASF version
3343
dotnet publish -c "Release" -f "net48" -o "out/generic-netf"
3444
mkdir .\out\%CurrDirName%
3545
copy .\out\generic-netf\%CurrDirName%.dll .\out\%CurrDirName%
46+
rem comment section below (downto :zipnetf label) if you don't want to include documentation
47+
if not exist README.md (goto zipnetf)
48+
where /q pandoc.exe
49+
if ERRORLEVEL 1 (
50+
copy README.md .\out\%CurrDirName%
51+
goto zipnetf
52+
) else (
53+
pandoc --metadata title="%CurrDirName%" --standalone --columns 2000 -f markdown -t html --self-contained -c .\github-pandoc.css -o .\out\%CurrDirName%\README.html README.md
54+
)
55+
:zipnetf
3656
7z a -tzip -mx7 .\out\%CurrDirName%-netf.zip .\out\%CurrDirName%
37-
rmdir /Q /S out\%CurrDirName%
57+
rmdir /Q /S out\%CurrDirName%

0 commit comments

Comments
 (0)