-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add InspectingWeaponEvent #2063
Closed
Ruemena
wants to merge
17
commits into
Exiled-Team:apis-rework
from
Ruemena:ihateworkingwithgithubandgit
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
96e7282
DOES IT OWRK????? LETS FIND OUT
Ruemena a568983
Update FirearmRequestReceived.cs
Ruemena 86b014e
Update InspectingWeaponEventArgs.cs
Ruemena 0e47da5
Update InspectingWeaponEventArgs.cs
Ruemena 51f065e
um
Ruemena ffe6ac2
Update FirearmRequestReceived.cs
Ruemena 44beb78
Merge branch 'dev' into ihateworkingwithgithubandgit
Ruemena 8f614a9
Update FirearmRequestReceived.cs
Ruemena c14840d
Update InspectingWeaponEventArgs.cs
Ruemena 917fc2c
Merge branch 'dev' into ihateworkingwithgithubandgit
Ruemena 4a3625c
Merge branch 'dev' into ihateworkingwithgithubandgit
Ruemena 6410b06
Merge branch 'dev' into ihateworkingwithgithubandgit
Ruemena e3e912a
Merge branch 'dev' into ihateworkingwithgithubandgit
Ruemena 02ce919
Merge branch 'Exiled-Team:master' into ihateworkingwithgithubandgit
Ruemena 7f654eb
Merge branch 'dev' into ihateworkingwithgithubandgit
Thundermaker300 fa1b0d1
Merge branch 'apis-rework' into ihateworkingwithgithubandgit
louis1706 c42289a
Merge branch 'apis-rework' into ihateworkingwithgithubandgit
louis1706 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
Exiled.Events/EventArgs/Player/InspectingWeaponEventArgs.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,60 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="InspectingWeaponEventArgs.cs" company="Exiled Team"> | ||
// Copyright (c) Exiled Team. All rights reserved. | ||
// Licensed under the CC BY-SA 3.0 license. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
namespace Exiled.Events.EventArgs.Player | ||
{ | ||
using API.Features; | ||
|
||
using Exiled.API.Features.Items; | ||
|
||
using Interfaces; | ||
|
||
using InventorySystem.Items.Firearms.BasicMessages; | ||
|
||
/// <summary> | ||
/// Contains all information before a player inspects a weapon. | ||
/// </summary> | ||
public class InspectingWeaponEventArgs : IPlayerEvent, IDeniableEvent, IItemEvent | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="InspectingWeaponEventArgs" /> class. | ||
/// </summary> | ||
/// <param name="inspector"> | ||
/// <inheritdoc cref="Player" /> | ||
/// </param> | ||
/// <param name="firearm"> | ||
/// <inheritdoc cref="Firearm" /> | ||
/// </param> | ||
/// <param name="isAllowed"> | ||
/// <inheritdoc cref="IsAllowed" /> | ||
/// </param> | ||
public InspectingWeaponEventArgs(Player inspector, Firearm firearm, bool isAllowed = true) | ||
{ | ||
Player = inspector; | ||
Firearm = firearm; | ||
IsAllowed = isAllowed; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the player who's inspecting. | ||
/// </summary> | ||
public Player Player { get; } | ||
|
||
/// <summary> | ||
/// Gets the target <see cref="API.Features.Items.Firearm" /> to be inspected. | ||
/// </summary> | ||
public Firearm Firearm { get; } | ||
|
||
/// <inheritdoc/> | ||
public Item Item => Firearm; | ||
|
||
/// <summary> | ||
/// Gets or sets a value indicating whether or not spectators will see the inspect animation. | ||
/// </summary> | ||
public bool IsAllowed { get; set; } = true; | ||
} | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need verification with new update