diff --git a/EXILED/Exiled.API/Exiled.API.csproj b/EXILED/Exiled.API/Exiled.API.csproj index c8737a790c..0d86a22672 100644 --- a/EXILED/Exiled.API/Exiled.API.csproj +++ b/EXILED/Exiled.API/Exiled.API.csproj @@ -41,7 +41,18 @@ - if not "$(EXILED_DEV_PLUGINAPI_REFERENCE)"=="" copy /y "$(OutputPath)$(AssemblyName).dll" "$(EXILED_DEV_PLUGINAPI_REFERENCE)\dependencies\" && if not "$(EXILED_DEV_REFERENCES)"=="" copy /y "$(OutputPath)$(AssemblyName).dll" "$(EXILED_DEV_REFERENCES)\Plugins\dependencies\" + + if not "$(EXILED_DEV_PLUGINAPI_REFERENCE)"=="" ( + copy /y "$(OutputPath)$(AssemblyName).dll" "$(EXILED_DEV_PLUGINAPI_REFERENCE)\dependencies\" + ) + if not "$(EXILED_DEV_REFERENCES)"=="" ( + copy /y "$(OutputPath)$(AssemblyName).dll" "$(EXILED_DEV_REFERENCES)\Plugins\dependencies\" + ) + if not "$(EXILED_DEV_PLUGINAPI_REFERENCE_GLOBAL)"=="" ( + if not exist "$(EXILED_DEV_PLUGINAPI_REFERENCE_GLOBAL)\dependencies\global" mkdir "$(EXILED_DEV_PLUGINAPI_REFERENCE_GLOBAL)\dependencies\global" + copy /y "$(OutputPath)$(AssemblyName).dll" "$(EXILED_DEV_PLUGINAPI_REFERENCE_GLOBAL)\dependencies\global\" + ) + if [[ ! -z "$EXILED_DEV_REFERENCES" ]]; then cp "$(OutputPath)$(AssemblyName).dll" "$EXILED_DEV_REFERENCES/Plugins/dependencies/"; fi diff --git a/EXILED/Exiled.API/Features/Items/Keycard.cs b/EXILED/Exiled.API/Features/Items/Keycard.cs index 4e68dd60a5..6010ab6781 100644 --- a/EXILED/Exiled.API/Features/Items/Keycard.cs +++ b/EXILED/Exiled.API/Features/Items/Keycard.cs @@ -33,7 +33,7 @@ public Keycard(KeycardItem itemBase) /// /// The of the keycard. internal Keycard(ItemType type) - : this((KeycardItem)Server.Host.Inventory.CreateItemInstance(new(type, 0), false)) + : this((KeycardItem)Server.Host.Inventory.CreateItemInstance(new(type, 1), false)) { } diff --git a/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs b/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs index d53846cbb0..b9870d75d6 100644 --- a/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs +++ b/EXILED/Exiled.CustomItems/API/Features/CustomKeycard.cs @@ -75,10 +75,10 @@ public override ItemType Type /// public override void Give(Player player, Item item, bool displayMessage = true) { - base.Give(player, item, displayMessage); - if (item.Is(out Keycard card)) SetupKeycard(card); + base.Give(player, item, displayMessage); + } /// diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs index 394fd8815b..e6a53933a0 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs @@ -8,6 +8,7 @@ namespace Exiled.Events.Patches.Events.Scp914 { using System.Collections.Generic; + using System.Reflection; using System.Reflection.Emit; using API.Features; @@ -22,6 +23,7 @@ namespace Exiled.Events.Patches.Events.Scp914 using static HarmonyLib.AccessTools; + using OpCode = System.Reflection.Emit.OpCode; using Scp914 = Handlers.Scp914; /// @@ -112,8 +114,17 @@ private static IEnumerable Transpiler(IEnumerable x.opcode == OpCodes.Stloc_S && x.operand is LocalBuilder { LocalIndex: 10 }) + offset; - + //index = newInstructions.FindIndex(x => x.opcode == OpCodes.Stloc_S && x.operand is LocalBuilder { LocalIndex: 10 }) + offset; + ConstructorInfo plugin_api_constructor = typeof(LabApi.Events.Arguments.Scp914Events.Scp914ProcessingInventoryItemEventArgs) + .GetConstructor(new[] { + typeof(InventorySystem.Items.ItemBase), + typeof(Scp914KnobSetting), + typeof(ReferenceHub) + }); + index = newInstructions.FindIndex(x => x.Is(OpCodes.Newobj, plugin_api_constructor)) + offset; + //ridtp lcz914 + //noclip + //give tuxwonder7 47 newInstructions.InsertRange( index, new CodeInstruction[] @@ -121,34 +132,34 @@ private static IEnumerable Transpiler(IEnumerable