Skip to content

Commit 6575449

Browse files
committed
V2.2.0
1 parent c72d99c commit 6575449

File tree

7 files changed

+68
-60
lines changed

7 files changed

+68
-60
lines changed

CustomizableUIMeow.csproj

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -51,67 +51,52 @@
5151
</PropertyGroup>
5252
<ItemGroup>
5353
<Reference Include="0Harmony">
54-
<HintPath>..\..\..\..\OneDrive\桌面\C#测试\HintServiceMeow\HintServiceMeow\bin\Debug\0Harmony.dll</HintPath>
54+
<HintPath>bin\x64\Release\0Harmony.dll</HintPath>
5555
</Reference>
56-
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
57-
<SpecificVersion>False</SpecificVersion>
58-
<HintPath>..\..\..\SCPSL插件依赖\Master\Assembly-CSharp-firstpass.dll</HintPath>
56+
<Reference Include="Assembly-CSharp">
57+
<HintPath>..\..\Dependencies\LabAPI\Assembly-CSharp.dll</HintPath>
5958
</Reference>
60-
<Reference Include="Assembly-CSharp-Publicized, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
59+
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
6160
<SpecificVersion>False</SpecificVersion>
62-
<HintPath>..\..\..\SCPSL插件依赖\Master\Assembly-CSharp-Publicized.dll</HintPath>
61+
<HintPath>..\..\Dependencies\LabAPI\Assembly-CSharp-firstpass.dll</HintPath>
6362
</Reference>
6463
<Reference Include="CommandSystem.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
65-
<HintPath>..\packages\ExMod.Exiled.9.2.2\lib\net48\CommandSystem.Core.dll</HintPath>
66-
</Reference>
67-
<Reference Include="Exiled.API, Version=9.2.2.0, Culture=neutral, processorArchitecture=AMD64">
68-
<HintPath>..\packages\ExMod.Exiled.9.2.2\lib\net48\Exiled.API.dll</HintPath>
69-
</Reference>
70-
<Reference Include="Exiled.CreditTags, Version=9.2.2.0, Culture=neutral, processorArchitecture=AMD64">
71-
<HintPath>..\packages\ExMod.Exiled.9.2.2\lib\net48\Exiled.CreditTags.dll</HintPath>
72-
</Reference>
73-
<Reference Include="Exiled.CustomItems, Version=9.2.2.0, Culture=neutral, processorArchitecture=AMD64">
74-
<HintPath>..\packages\ExMod.Exiled.9.2.2\lib\net48\Exiled.CustomItems.dll</HintPath>
75-
</Reference>
76-
<Reference Include="Exiled.CustomRoles, Version=9.2.2.0, Culture=neutral, processorArchitecture=AMD64">
77-
<HintPath>..\packages\ExMod.Exiled.9.2.2\lib\net48\Exiled.CustomRoles.dll</HintPath>
64+
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\CommandSystem.Core.dll</HintPath>
7865
</Reference>
79-
<Reference Include="Exiled.Events, Version=9.2.2.0, Culture=neutral, processorArchitecture=AMD64">
80-
<HintPath>..\packages\ExMod.Exiled.9.2.2\lib\net48\Exiled.Events.dll</HintPath>
81-
</Reference>
82-
<Reference Include="Exiled.Loader, Version=9.2.2.0, Culture=neutral, processorArchitecture=AMD64">
83-
<HintPath>..\packages\ExMod.Exiled.9.2.2\lib\net48\Exiled.Loader.dll</HintPath>
66+
<Reference Include="Exiled.API, Version=9.5.2.0, Culture=neutral, processorArchitecture=AMD64">
67+
<SpecificVersion>False</SpecificVersion>
68+
<HintPath>..\..\Dependencies\Exiled\V9.6.0 beta 5\Exiled.API.dll</HintPath>
8469
</Reference>
85-
<Reference Include="Exiled.Permissions, Version=9.2.2.0, Culture=neutral, processorArchitecture=AMD64">
86-
<HintPath>..\packages\ExMod.Exiled.9.2.2\lib\net48\Exiled.Permissions.dll</HintPath>
70+
<Reference Include="Exiled.Events, Version=9.5.2.0, Culture=neutral, processorArchitecture=AMD64">
71+
<SpecificVersion>False</SpecificVersion>
72+
<HintPath>..\..\Dependencies\Exiled\V9.6.0 beta 5\Exiled.Events.dll</HintPath>
8773
</Reference>
88-
<Reference Include="HintServiceMeow, Version=5.3.4.0, Culture=neutral, processorArchitecture=AMD64">
74+
<Reference Include="HintServiceMeow-Exiled, Version=5.3.14.0, Culture=neutral, processorArchitecture=AMD64">
8975
<SpecificVersion>False</SpecificVersion>
90-
<HintPath>..\..\..\SCPSL-Framework\HintServiceMeow\HintServiceMeow\bin\x64\Release\HintServiceMeow.dll</HintPath>
76+
<HintPath>..\..\Dependencies\HintServiceMeow-Exiled.dll</HintPath>
77+
</Reference>
78+
<Reference Include="LabApi">
79+
<HintPath>..\..\Dependencies\LabAPI\LabApi.dll</HintPath>
9180
</Reference>
9281
<Reference Include="Mirror">
93-
<HintPath>..\..\..\..\OneDrive\桌面\C#测试\HintServiceMeow\HintServiceMeow\bin\Debug\Mirror.dll</HintPath>
82+
<HintPath>..\..\Dependencies\Master\Mirror.dll</HintPath>
9483
</Reference>
9584
<Reference Include="NorthwoodLib, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
96-
<HintPath>..\packages\ExMod.Exiled.9.2.2\lib\net48\NorthwoodLib.dll</HintPath>
97-
</Reference>
98-
<Reference Include="PluginAPI, Version=13.1.5.0, Culture=neutral, processorArchitecture=AMD64">
99-
<HintPath>..\packages\ExMod.Exiled.9.2.2\lib\net48\PluginAPI.dll</HintPath>
85+
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\NorthwoodLib.dll</HintPath>
10086
</Reference>
10187
<Reference Include="System" />
10288
<Reference Include="System.Core" />
10389
<Reference Include="System.Data.DataSetExtensions" />
10490
<Reference Include="Microsoft.CSharp" />
10591
<Reference Include="System.Data" />
10692
<Reference Include="UnityEngine.CoreModule">
107-
<HintPath>..\..\..\..\OneDrive\桌面\C#测试\HintServiceMeow\HintServiceMeow\bin\Debug\UnityEngine.CoreModule.dll</HintPath>
93+
<HintPath>..\..\Dependencies\Master\UnityEngine.CoreModule.dll</HintPath>
10894
</Reference>
109-
<Reference Include="UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
110-
<SpecificVersion>False</SpecificVersion>
111-
<HintPath>..\..\..\SCPSL插件依赖\Master\UnityEngine.PhysicsModule.dll</HintPath>
95+
<Reference Include="UnityEngine.PhysicsModule">
96+
<HintPath>..\..\Dependencies\Master\UnityEngine.PhysicsModule.dll</HintPath>
11297
</Reference>
11398
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
114-
<HintPath>..\packages\ExMod.Exiled.9.2.2\lib\net48\YamlDotNet.dll</HintPath>
99+
<HintPath>..\packages\ExMod.Exiled.9.5.2\lib\net48\YamlDotNet.dll</HintPath>
115100
</Reference>
116101
</ItemGroup>
117102
<ItemGroup>

Parser/TagParser/SimpleTag/Generator/GeneratorInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ public class GeneratorInfo
88
public string TotalCount(TagParserParameter parameter) => Exiled.API.Features.Generator.List.Count.ToString();
99

1010
[TagParser("GActivatedCount")]
11-
public string ActivatedCount(TagParserParameter parameter) => Exiled.API.Features.Generator.List.Count(x => x.IsActivating).ToString();
11+
public string ActivatedCount(TagParserParameter parameter) => Exiled.API.Features.Generator.List.Count(x => x.IsEngaged).ToString();
1212
}
1313
}

Plugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal class Plugin : Plugin<PluginConfig, PluginTranslation>
1111
{
1212
public override string Name => "CustomizableUIMeow";
1313
public override string Author => "MeowServer";
14-
public override Version Version => new Version(2, 1, 1);
14+
public override Version Version => new Version(2, 2, 0);
1515

1616
public override Version RequiredExiledVersion => new Version(9, 0, 0);
1717

Utilities/UI/TagParserLoader.cs

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,27 +75,43 @@ public string ReplaceTags(string rawText, Player player)
7575
{
7676
return _tagRegex.Replace(rawText, match =>
7777
{
78-
var tagContent = match.Groups[1].Value;
78+
try
79+
{
80+
var tagContent = match.Groups[1].Value;
81+
if (string.IsNullOrWhiteSpace(tagContent))
82+
return match.Value;
7983

80-
var parts = tagContent.Split('|');
84+
var parts = tagContent.Split('|');
85+
if (parts.Length == 0 || string.IsNullOrWhiteSpace(parts[0]))
86+
return match.Value;
8187

82-
var tagName = parts[0];
83-
var args = new Queue<string>(parts.Skip(1));
88+
var tagName = parts[0].Trim().ToLower();
89+
var args = new Queue<string>(parts.Skip(1));
8490

85-
if (_tagParserDictionary.TryGetValue(tagName.ToLower().Trim(), out var tagParser))
86-
{
87-
try
91+
if (_tagParserDictionary.TryGetValue(tagName, out var tagParser))
8892
{
89-
return tagParser(new TagParserParameter(player, tagName, args))?.ToString() ?? string.Empty;
90-
}
91-
catch (Exception e)
92-
{
93-
Log.Error($"Error while parsing tag {tagName}: {e}");
93+
object result = null;
94+
try
95+
{
96+
result = tagParser(new TagParserParameter(player, tagName, args));
97+
}
98+
catch (Exception inner)
99+
{
100+
Log.Error($"[Tag:{tagName}] Tag parser error: {inner}");
101+
}
102+
103+
return result?.ToString() ?? string.Empty;
94104
}
95-
}
96105

97-
return match.Value;
106+
return match.Value;
107+
}
108+
catch (Exception ex)
109+
{
110+
Log.Error($"[TagParserLoader] ReplaceTags failed: {ex}");
111+
return match.Value;
112+
}
98113
});
114+
99115
}
100116
}
101117
}

Version History.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@ V2.1.0
3333
Add new respawn condition tag
3434
Add new player custom info tag
3535
V2.1.1
36-
Recompiled for HSM 5.3.12
36+
Recompiled for HSM 5.3.12
37+
V2.2.0
38+
Re-compile for SCPSL 14.1.0
39+
Fix a bug in GeneratorInfo

app.config

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<runtime>
44
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
55
<dependentAssembly>
6-
<assemblyIdentity name="netstandard" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
7-
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0"/>
6+
<assemblyIdentity name="netstandard" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
8+
</dependentAssembly>
9+
<dependentAssembly>
10+
<assemblyIdentity name="YamlDotNet" publicKeyToken="ec19458f3c15af5e" culture="neutral" />
11+
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
812
</dependentAssembly>
913
</assemblyBinding>
1014
</runtime>
11-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
15+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>

packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="ExMod.Exiled" version="9.2.2" targetFramework="net48" />
3+
<package id="ExMod.Exiled" version="9.5.2" targetFramework="net48" />
44
</packages>

0 commit comments

Comments
 (0)