Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	CustomItems/CustomItems.csproj
#	CustomItems/packages.config
  • Loading branch information
joker-119 committed Apr 11, 2022
2 parents 0ae8802 + d6e9c14 commit 18779fa
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 12 deletions.
11 changes: 6 additions & 5 deletions CustomItems/CustomItems.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
<HintPath>..\packages\Lib.Harmony.2.0.4\lib\net472\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(EXILED_REFERENCES)\Assembly-CSharp-Publicized.dll</HintPath>
<HintPath>..\packages\EXILED.5.0.0-beta.5\lib\net472\Assembly-CSharp-Publicized.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(EXILED_REFERENCES)\Assembly-CSharp-firstpass.dll</HintPath>
Expand Down Expand Up @@ -74,8 +75,8 @@
<Reference Include="Mirror, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(EXILED_REFERENCES)\Mirror.dll</HintPath>
</Reference>
<Reference Include="NorthwoodLib, Version=1.2.1.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\References\NorthwoodLib.dll</HintPath>
<Reference Include="NorthwoodLib, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.5.0.0-beta.5\lib\net472\NorthwoodLib.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -101,7 +102,7 @@
<Compile Include="Configs\Items.cs" />
<Compile Include="Events\ServerHandler.cs" />
<Compile Include="Items\AntiMemeticPills.cs" />
<Compile Include="Items\AutoGun.cs" />
<Compile Include="Items\AutoGun.cs" />
<Compile Include="Items\DeflectorShield.cs" />
<Compile Include="Items\EmpGrenade.cs" />
<Compile Include="Items\GrenadeLauncher.cs" />
Expand Down Expand Up @@ -137,4 +138,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
8 changes: 1 addition & 7 deletions CustomItems/Patches/StickyGrenade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@ private static void Prefix(EffectGrenade __instance)
{
if (Items.C4Charge.Instance.IsSticky && Items.C4Charge.PlacedCharges.ContainsKey(Pickup.Get(__instance)))
{
var rigidbody = __instance.gameObject.GetComponent<Rigidbody>();
rigidbody.isKinematic = false;
rigidbody.useGravity = false;
rigidbody.velocity = Vector3.zero;
rigidbody.angularVelocity = Vector3.zero;
rigidbody.freezeRotation = true;
rigidbody.mass = 100000;
__instance.gameObject.GetComponent<Rigidbody>().isKinematic = true;
}
}
}
Expand Down
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,53 @@ InsideHidRight
InsideLczWc
InsideServersBottom
```
### Attachment Names
```
None
IronSights
DotSight
HoloSight
NightVisionSight
AmmoSight
ScopeSight
StandardStock
ExtendedStock
RetractedStock
LightweightStock
HeavyStock
RecoilReducingStock
Foregrip
Laser
Flashlight
AmmoCounter
StandardBarrel
ExtendedBarrel
SoundSuppressor
FlashHider
MuzzleBrake
MuzzleBooster
StandardMagFMJ
StandardMagAP
StandardMagJHP
ExtendedMagFMJ
ExtendedMagAP
ExtendedMagJHP
DrumMagFMJ
DrumMagAP
DrumMagJHP,
LowcapMagFMJ
LowcapMagAP
LowcapMagJHP
CylinderMag4
CylinderMag6
CylinderMag8
CarbineBody
RifleBody
ShortBarrel
ShotgunChoke
ShotgunExtendedBarrel
NoRifleStock
```

### API Notes **(FOR DEVELOPERS ONLY)**
Tl;dr - All you need to do is make a class that inherits CustomItem, CustomWeapon or CustomGrenade (depending on what kind of item you're making), override LoadEvents() and UnloadEvents() to register event handlers to the weapon, then inside the event handlers, start everything with
Expand Down

0 comments on commit 18779fa

Please sign in to comment.