Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions LabApi/Features/Wrappers/Items/Firearm/FirearmItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,30 @@ internal FirearmItem(Firearm firearm)
/// </summary>
public float BaseLength => Base.BaseLength;

/// <summary>
/// Gets whether the player is currently reloading this firearm.
/// </summary>
public bool IsReloading => ReloaderModule.IsReloading;

/// <summary>
/// Gets whether the player is currently unloading this firearm.
/// </summary>
public bool IsUnloading => ReloaderModule.IsUnloading;

/// <summary>
/// Gets whether the player is either reloading or unloading this firearm.
/// </summary>
public bool IsReloadingOrUnloading => ReloaderModule.IsReloadingOrUnloading;

/// <summary>
/// Gets whether the player can reload this firearm.
/// </summary>
public bool CanReload => IReloadUnloadValidatorModule.ValidateReload(Base);
public bool CanReload => IReloadUnloadValidatorModule.ValidateReload(Base) && !IsReloadingOrUnloading;

/// <summary>
/// Gets whether the player can unload this firearm.
/// </summary>
public bool CanUnload => IReloadUnloadValidatorModule.ValidateUnload(Base);
public bool CanUnload => IReloadUnloadValidatorModule.ValidateUnload(Base) && !IsReloadingOrUnloading;

/// <summary>
/// Gets the firearm's ammo type.
Expand Down