Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made it work because devs have no braincells :) <3 #132

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion EXILED/Exiled.API/Exiled.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Lib.Harmony" Version="$(HarmonyVersion)" />
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopVersion)" IncludeAssets="All" PrivateAssets="All" />
<PackageReference Include="System.Memory" Version="4.5.5" />
<PackageReference Include="Lib.Harmony" Version="$(HarmonyVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions EXILED/Exiled.API/Features/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ public static Player Get(string args)
if (!player.IsVerified || player.Nickname is null)
continue;

if (!player.Nickname.Contains(args, StringComparison.OrdinalIgnoreCase))
if (!StringUtils.Contains(player.Nickname, args, StringComparison.OrdinalIgnoreCase))
continue;

string secondString = player.Nickname;
Expand Down Expand Up @@ -3761,6 +3761,6 @@ public void SetCooldownItem(float time, ItemType itemType)
/// Converts the player in a human-readable format.
/// </summary>
/// <returns>A string containing Player-related data.</returns>
public override string ToString() => $"{Id} ({Nickname}) [{UserId}] *{(Role is null ? "No role" : Role)}*";
public override string ToString() => $"{Id} ({Nickname}) [{UserId}] *{(Role is null ? "No role" : Role.ToString())}*";
}
}
2 changes: 1 addition & 1 deletion EXILED/Exiled.CustomItems/CustomItems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public override void OnDisabled()

Exiled.Events.Handlers.Player.ChangingItem -= playerHandler!.OnChangingItem;

harmony?.UnpatchAll();
harmony?.UnpatchAll(harmony.Id);

base.OnDisabled();
}
Expand Down
2 changes: 1 addition & 1 deletion EXILED/Exiled.CustomItems/Exiled.CustomItems.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Lib.Harmony" Version="$(HarmonyVersion)" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopVersion)" IncludeAssets="All" PrivateAssets="All" />
<PackageReference Include="Lib.Harmony" Version="$(HarmonyVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
if (!altTracker.TryGetValue(player, out int pressCount))
yield break;

Log.Debug($"{player.Nickname}: {pressCount} {(player.Role is FpcRole fpc ? fpc.MoveState : false)}");
Log.Debug($"{player.Nickname}: {pressCount} {player.Role is FpcRole { MoveState: PlayerMovementState.Sneaking } }");

Check failure on line 88 in EXILED/Exiled.CustomRoles/API/Features/KeypressActivator.cs

View workflow job for this annotation

GitHub Actions / build

Check failure on line 88 in EXILED/Exiled.CustomRoles/API/Features/KeypressActivator.cs

View workflow job for this annotation

GitHub Actions / build

AbilityKeypressTriggerType type = pressCount switch
{
1 when player.Role is FpcRole { MoveState: PlayerMovementState.Sneaking } => AbilityKeypressTriggerType.DisplayInfo,
Expand Down
1 change: 0 additions & 1 deletion EXILED/Exiled.CustomRoles/Exiled.CustomRoles.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopVersion)" IncludeAssets="All" PrivateAssets="All" />
<PackageReference Include="Lib.Harmony" Version="$(HarmonyVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion EXILED/Exiled.Events/Exiled.Events.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopVersion)" IncludeAssets="All" PrivateAssets="All" />
<PackageReference Include="Lib.Harmony" Version="$(HarmonyVersion)" />
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopVersion)" IncludeAssets="All" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion EXILED/Exiled.Events/Features/Patcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void ReloadDisabledPatches()
public void UnpatchAll()
{
Log.Debug("Unpatching events...");
Harmony.UnpatchAll(Harmony.Id);
Harmony.UnpatchAll();
UnpatchedTypes = GetAllPatchTypes();

Log.Debug("All events have been unpatched. Goodbye!");
Expand Down
1 change: 0 additions & 1 deletion EXILED/Exiled.Example/Exiled.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopVersion)" IncludeAssets="All" PrivateAssets="All" />
<PackageReference Include="Lib.Harmony" Version="$(HarmonyVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading