Skip to content

Commit fcee074

Browse files
committed
fix: Fix NPC constraint for NPC.Get and fix csproj for latest rider
1 parent cdc0257 commit fcee074

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

S1API/Entities/NPC.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ public bool ConversationCanBeHidden
592592
/// </summary>
593593
/// <typeparam name="T">The NPC class to get the instance of.</typeparam>
594594
/// <returns></returns>
595-
public static NPC? Get<T>() =>
595+
public static NPC? Get<T>() where T : NPC =>
596596
All.FirstOrDefault(npc => npc.GetType() == typeof(T));
597597

598598
#endregion

S1API/S1API.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<Platforms>AnyCPU</Platforms>
1818
<RootNamespace>S1API</RootNamespace>
1919
<GenerateDocumentationFile>true</GenerateDocumentationFile>
20+
<LangVersion>latest</LangVersion>
2021
</PropertyGroup>
2122

2223
<PropertyGroup Condition="'$(Configuration)' == 'MonoMelon' or '$(Configuration)' == 'MonoBepInEx'">

0 commit comments

Comments
 (0)