Skip to content

Commit

Permalink
1.0.6
Browse files Browse the repository at this point in the history
Fixed ammo in weapons
  • Loading branch information
MrAfitol committed Feb 27, 2023
1 parent 661ce93 commit c62c1d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion BetterDrops/BetterDrops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class BetterDrops
public Config Config;

[PluginPriority(LoadPriority.Highest)]
[PluginEntryPoint("BetterDrops", "1.0.5", "Plugin to summon and spawn drops.", "Jesus-QC, update by MrAfitol")]
[PluginEntryPoint("BetterDrops", "1.0.6", "Plugin to summon and spawn drops.", "Jesus-QC, update by MrAfitol")]
public void LoadPlugin()
{
Instance = this;
Expand Down
7 changes: 5 additions & 2 deletions BetterDrops/Features/Components/DropController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using UnityEngine;
using Color = UnityEngine.Color;
using InventorySystem.Items.Pickups;
using InventorySystem.Items;

public class DropController: MonoBehaviour
{
Expand Down Expand Up @@ -175,12 +176,14 @@ private void OpenDrop()
{
if (item is Firearm firearm)
{
if (_randomAttachments)
firearm.ApplyAttachmentsCode(AttachmentsUtils.GetRandomAttachmentsCode(firearm.ItemTypeId), reValidate: true);

FirearmStatusFlags firearmStatusFlags = FirearmStatusFlags.MagazineInserted;
if (firearm.HasAdvantageFlag(AttachmentDescriptiveAdvantages.Flashlight))
firearmStatusFlags |= FirearmStatusFlags.FlashlightEnabled;

firearm.Status = new FirearmStatus(_fillMaxAmmo ? firearm.AmmoManagerModule.MaxAmmo : (byte)0, firearmStatusFlags,
_randomAttachments ? AttachmentsUtils.GetRandomAttachmentsCode(firearm.ItemTypeId) : firearm.GetCurrentAttachmentsCode());
firearm.Status = new FirearmStatus(firearm.AmmoManagerModule.MaxAmmo, firearmStatusFlags, firearm.GetCurrentAttachmentsCode());
}
}

Expand Down
6 changes: 3 additions & 3 deletions BetterDrops/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[assembly: AssemblyTitle("BetterDrops")]
[assembly: AssemblyDescription("Plugin to summon and spawn drops.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Jesus-QC")]
[assembly: AssemblyCompany("Jesus-QC and MrAftiol")]
[assembly: AssemblyProduct("BetterDrops")]
[assembly: AssemblyCopyright("Copyright © Jesus-QC 2021")]
[assembly: AssemblyTrademark("")]
Expand All @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.5.0")]
[assembly: AssemblyFileVersion("1.0.5.0")]
[assembly: AssemblyVersion("1.0.6.0")]
[assembly: AssemblyFileVersion("1.0.6.0")]

0 comments on commit c62c1d8

Please sign in to comment.