Skip to content

Commit 2bee675

Browse files
authored
Merge pull request #37 from MeowServer/HotFix/ExiledConfigThrow
Hot fix/exiled config throw
2 parents cb3cf3b + 2b32cfa commit 2bee675

12 files changed

Lines changed: 41 additions & 15 deletions

File tree

Docs/Brazilian/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ O formato é baseado em [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1212

1313
---
1414

15+
## [5.5.1]
16+
17+
### Corrigido
18+
- Erro de carregamento de configuração do Exiled causado pela propriedade Instance.
19+
20+
---
21+
1522
## [5.5.0]
1623

1724
### Corrigido

Docs/English/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1212

1313
---
1414

15+
## [5.5.1]
16+
17+
### Fixed
18+
- Exiled config loading error caused by Instance property.
19+
20+
---
1521
## [5.5.0]
1622

1723
### Fixed

Docs/Russian/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212

1313
---
1414

15+
## [5.5.1]
16+
17+
### Исправлено
18+
- Ошибка загрузки конфигурации Exiled, вызванная свойством Instance.
19+
20+
---
21+
1522
## [5.5.0]
1623

1724
### Исправлено

Docs/SimplifiedChinese/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212

1313
---
1414

15+
# [5.5.1]
16+
### 修复
17+
- 修复了由 Instance 属性引起的 Exiled 配置加载错误。
18+
19+
---
20+
1521
## [5.5.0]
1622

1723
### 修复

HintServiceExample/HintServiceExample.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<Reference Include="Assembly-CSharp" HintPath="..\Dependencies\Assembly-CSharp-publicized.dll" Private="False" />
32+
<Reference Include="Assembly-CSharp">
33+
<HintPath>..\Dependencies\Assembly-CSharp.dll</HintPath>
34+
</Reference>
3335
<Reference Include="UnityEngine.CoreModule" HintPath="..\Dependencies\UnityEngine.CoreModule.dll" Private="False" />
3436
<Reference Include="Exiled.API" HintPath="..\Dependencies\Exiled.API.dll" Private="False" />
3537
</ItemGroup>

HintServiceMeow.Tests/Core/Utilities/CompatibilityAdaptorTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public void ShowHint_WhenDurationIsNonPositive_ClearsGroup()
4545
public void ShowHint_WhenAssemblyIsDisabled_IgnoresHint()
4646
{
4747
// Arrange
48-
PluginConfig.Instance.DisabledCompatAdapter.Clear();
49-
PluginConfig.Instance.DisabledCompatAdapter.Add("blocked");
48+
Plugin.Plugin.Instance.Config.DisabledCompatAdapter.Clear();
49+
Plugin.Plugin.Instance.Config.DisabledCompatAdapter.Add("blocked");
5050
CompatibilityAdaptor adaptor = CreateAdaptor(out PlayerDisplay display);
5151

5252
// Act

HintServiceMeow/Core/Utilities/CompatibilityAdaptor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void ShowHint(CompatibilityAdaptorArg ev)
6767
// Record the assembly that is using the compatibility adaptor
6868
RegisteredAssemblies.Add(assemblyName);
6969

70-
if (PluginConfig.Instance.DisabledCompatAdapter.Contains(assemblyName) // Config limitation
70+
if (Plugin.Instance.Config.DisabledCompatAdapter.Contains(assemblyName) // Config limitation
7171
|| content.Length > ushort.MaxValue) // Length limitation
7272
return;
7373

HintServiceMeow/Core/Utilities/Patch/Patches.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static bool HintDisplayPatch(ref Hint hint, ref HintDisplay __instance)
1818
{
1919
try
2020
{
21-
if (!PluginConfig.Instance.UseHintCompatibilityAdapter)
21+
if (!Plugin.Instance.Config.UseHintCompatibilityAdapter)
2222
return false;
2323

2424
if (hint is TextHint textHint && ReferenceHub.TryGetHubNetID(__instance.connectionToClient.identity.netId, out ReferenceHub referenceHub))
@@ -41,7 +41,7 @@ public static bool SendHintPatch1(ref string text, ref float duration, ref Playe
4141
{
4242
try
4343
{
44-
if (!PluginConfig.Instance.UseHintCompatibilityAdapter)
44+
if (!Plugin.Instance.Config.UseHintCompatibilityAdapter)
4545
return false;
4646

4747
string assemblyName = Assembly.GetCallingAssembly().FullName;
@@ -60,7 +60,7 @@ public static bool SendHintPatch2(ref string text, ref HintEffect[] effects, ref
6060
{
6161
try
6262
{
63-
if (!PluginConfig.Instance.UseHintCompatibilityAdapter)
63+
if (!Plugin.Instance.Config.UseHintCompatibilityAdapter)
6464
return false;
6565

6666
string assemblyName = Assembly.GetCallingAssembly().FullName;
@@ -80,7 +80,7 @@ public static bool ExiledHintPatch1(ref string message, ref float duration, ref
8080
{
8181
try
8282
{
83-
if (!PluginConfig.Instance.UseHintCompatibilityAdapter)
83+
if (!Plugin.Instance.Config.UseHintCompatibilityAdapter)
8484
return false;
8585

8686
string assemblyName = Assembly.GetCallingAssembly().FullName;
@@ -99,7 +99,7 @@ public static bool ExiledHintPatch2(ref Exiled.API.Features.Hint hint, ref Exile
9999
{
100100
try
101101
{
102-
if (!PluginConfig.Instance.UseHintCompatibilityAdapter)
102+
if (!Plugin.Instance.Config.UseHintCompatibilityAdapter)
103103
return false;
104104

105105
if (!hint.Show)

HintServiceMeow/HintServiceMeow.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
<PackageReadmeFile>README.md</PackageReadmeFile>
2020
<PackageTags>hsm, scpsl, labapi, exiled</PackageTags>
2121
<AssemblyVersion>5.5.0.0</AssemblyVersion>
22-
<FileVersion>5.5.0.0</FileVersion>
22+
<FileVersion>5.5.1.0</FileVersion>
2323
<Title>Hint Service Meow</Title>
24-
<Version>5.5.0.0</Version>
24+
<Version>5.5.1.0</Version>
2525
</PropertyGroup>
2626

2727
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">

HintServiceMeow/Plugin/Plugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal class Plugin : LabApi.Loader.Features.Plugins.Plugin
2727

2828
public override string Author => "MeowServer";
2929

30-
public override Version Version => new(5, 5, 0);
30+
public override Version Version => new(5, 5, 1);
3131

3232
public override Version RequiredExiledVersion => new(9, 6, 0);
3333

0 commit comments

Comments
 (0)