forked from Exiled-Official/EXILED
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into Adding-TapeUsingEvent
- Loading branch information
Showing
5 changed files
with
120 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
EXILED/Exiled.Events/EventArgs/Item/ChangingMicroHIDPickupStateEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="ChangingMicroHIDPickupStateEventArgs.cs" company="ExMod Team"> | ||
// Copyright (c) ExMod Team. All rights reserved. | ||
// Licensed under the CC BY-SA 3.0 license. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
namespace Exiled.Events.EventArgs.Item | ||
{ | ||
using Exiled.API.Features.Pickups; | ||
|
||
using Interfaces; | ||
using InventorySystem.Items.MicroHID.Modules; | ||
using InventorySystem.Items.Pickups; | ||
|
||
/// <summary> | ||
/// Contains all information before MicroHID pickup state is changed. | ||
/// </summary> | ||
public class ChangingMicroHIDPickupStateEventArgs : IDeniableEvent, IPickupEvent | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ChangingMicroHIDPickupStateEventArgs" /> class. | ||
/// </summary> | ||
/// <param name="microHID"> | ||
/// <inheritdoc cref="MicroHID" /> | ||
/// </param> | ||
/// <param name="newPhase"> | ||
/// <inheritdoc cref="NewPhase" /> | ||
/// </param> | ||
/// <param name="isAllowed"> | ||
/// <inheritdoc cref="IsAllowed" /> | ||
/// </param> | ||
public ChangingMicroHIDPickupStateEventArgs(ItemPickupBase microHID, MicroHidPhase newPhase, bool isAllowed = true) | ||
{ | ||
MicroHID = Pickup.Get<MicroHIDPickup>(microHID); | ||
NewPhase = newPhase; | ||
IsAllowed = isAllowed; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the MicroHID instance. | ||
/// </summary> | ||
public MicroHIDPickup MicroHID { get; } | ||
|
||
/// <summary> | ||
/// Gets or sets the new MicroHID state. | ||
/// </summary> | ||
public MicroHidPhase NewPhase { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets a value indicating whether the MicroHID state can be changed. | ||
/// </summary> | ||
public bool IsAllowed { get; set; } | ||
|
||
/// <inheritdoc/> | ||
public Pickup Pickup => MicroHID; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters