Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from VT-DevGiT/devlopement
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
warquys authored Feb 9, 2022
2 parents cf8bee7 + a9b2397 commit 29ef23c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# VT-Api
VT-API is an API for Synapse plugins from SCP sl game. This API is complementary to that of synapse and offers methods and functionality for SCP sl plugins.

# Installation
Download the last release (here)[https://github.com/VT-DevGiT/VT-Api/releases]. Drop the VT-Api.dll in the Synapse\dependencies folder.

# Developers
If you want to add my code to synapse do it !
If you want to contribute go ahead, but tempted to use my conventions !
If you want to use my API, use there! You can check my exemple (here)[https://github.com/VT-DevGiT/VT-Api/tree/main/Exemple-Plugin] !

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private static bool FirearmUpgradePatch(FirearmItemProcessor __instance, Scp914K

foreach (ItemType newType in items)
{
if (item is Firearm firearm1 == false)
if (!(item is Firearm firearm1))
throw new InvalidOperationException("FirearmItemProcessor can't be used for non-firearm items, such as " + item.ItemTypeId);

var destroyOldItem = newType == oldItem.ItemType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static bool AmmoUpgradePatch(AmmoItemProcessor __instance, Scp914KnobSet
return false;
}

if (ipb is AmmoPickup ammoPickup == false) // change this in C#9
if (!(ipb is AmmoPickup ammoPickup)) // change this in C#9
return false;

var change = 0;
Expand Down Expand Up @@ -122,7 +122,7 @@ private static bool FirearmUpgradePatch(FirearmItemProcessor __instance, Scp914K
newItem = SynapseItem.None;
}

if (ipb is FirearmPickup oldFirearmPickup == false)
if (!(ipb is FirearmPickup oldFirearmPickup))
throw new InvalidOperationException("FirearmItemProcessor can't be used for non-firearm items, such as " + newItemBase?.ItemTypeId ?? "Unknow");


Expand Down

0 comments on commit 29ef23c

Please sign in to comment.