From 964b9ff043884bb5d0fcce8b0b53aeab1d97a734 Mon Sep 17 00:00:00 2001 From: rayzer Date: Sat, 3 Sep 2022 12:30:52 -0500 Subject: [PATCH] stuff --- API/Modifiers/KeycardModifier.cs | 13 +++++------ ItemUtils.csproj | 37 +++----------------------------- packages.config | 4 ---- 3 files changed, 8 insertions(+), 46 deletions(-) delete mode 100644 packages.config diff --git a/API/Modifiers/KeycardModifier.cs b/API/Modifiers/KeycardModifier.cs index f34d4e6..e0d714c 100644 --- a/API/Modifiers/KeycardModifier.cs +++ b/API/Modifiers/KeycardModifier.cs @@ -14,8 +14,6 @@ namespace ItemUtils.API.Modifiers { public class KeycardModifier : ItemModifier { - //Only need to test remote cards - public bool CanBeUsedRemotely { get; set; } = false; public List AddedPermissions { get; set; } = new List(); public List RemovedPermissions { get; set; } = new List(); @@ -46,12 +44,11 @@ private bool CheckPermissions(Player plyr, KeycardPermissions perms, bool oldRes { Log.Debug($"Starting check of permissions {perms}", PluginMain.Instance.Config.DebugMode); - if (perms == KeycardPermissions.None) - return true; - - if (plyr.IsScp) + if (perms == KeycardPermissions.None || plyr.IsScp) return oldResult; + perms &= ~KeycardPermissions.ScpOverride; + if (CanBeUsedRemotely) { foreach (Item item in plyr.Items) @@ -70,8 +67,8 @@ private bool CheckPermissions(Keycard card, KeycardPermissions perms) if (CanModify(card, card.Owner)) { - newPerms += (ushort)AddedPermissions.Sum((perm) => (ushort)perm); - newPerms -= (ushort)RemovedPermissions.Sum((perm) => (ushort)perm); + newPerms += (ushort)AddedPermissions.Sum(perm => (ushort)perm); + newPerms -= (ushort)RemovedPermissions.Sum(perm => (ushort)perm); } Log.Debug($"Checking permission {perms} against card with perms {newPerms}", PluginMain.Instance.Config.DebugMode); diff --git a/ItemUtils.csproj b/ItemUtils.csproj index d5d9404..a9e13b0 100644 --- a/ItemUtils.csproj +++ b/ItemUtils.csproj @@ -43,40 +43,7 @@ False ..\..\..\Downloads\Dev (3)\Assembly-CSharp-Publicized.dll - - packages\EXILED.5.2.1\lib\net472\CommandSystem.Core.dll - - - packages\EXILED.5.2.1\lib\net472\Exiled.API.dll - - - packages\EXILED.5.2.1\lib\net472\Exiled.Bootstrap.dll - - - packages\EXILED.5.2.1\lib\net472\Exiled.CreditTags.dll - - - packages\EXILED.5.2.1\lib\net472\Exiled.CustomItems.dll - - - packages\EXILED.5.2.1\lib\net472\Exiled.CustomRoles.dll - - - packages\EXILED.5.2.1\lib\net472\Exiled.Events.dll - - - packages\EXILED.5.2.1\lib\net472\Exiled.Loader.dll - - - packages\EXILED.5.2.1\lib\net472\Exiled.Permissions.dll - - - packages\EXILED.5.2.1\lib\net472\Exiled.Updater.dll - - - packages\EXILED.5.2.1\lib\net472\NorthwoodLib.dll - ..\..\..\Downloads\Exiledsa\EXILED\Plugins\dependencies\SemVer.dll @@ -118,7 +85,9 @@ - + + 5.3.0 + \ No newline at end of file diff --git a/packages.config b/packages.config deleted file mode 100644 index cfe28c8..0000000 --- a/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file