-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Right Click Melee Attack to Guns (#24)
* meleeweaponsystem * gun prototype changes * stop breaking the game !!!!!!!! * okey lets go (#WD EDIT TIME) (GOIDA!!!!) * antigoida (file removed because moved) ILOVEGITILOVEGITILOVEGITILOVEGITILOVEGIT * WD EDIT START Co-authored-by: Spatison <[email protected]> * summary typo fix --------- Co-authored-by: vanx <#vanxxxx> Co-authored-by: Spatison <[email protected]>
- Loading branch information
Showing
14 changed files
with
173 additions
and
28 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
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
37 changes: 37 additions & 0 deletions
37
Content.Shared/_White/Weapons/Melee/Events/MeleeAttemptedEvent.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,37 @@ | ||
namespace Content.Shared._White.Weapons.Melee.Events; | ||
|
||
/// <summary> | ||
/// Raised on a melee when someone is attempting to attack with it. | ||
/// Cancel this event to prevent it from attacking. | ||
/// </summary> | ||
[ByRefEvent] | ||
public record struct MeleeAttemptedEvent | ||
{ | ||
/// <summary> | ||
/// The user attempting to attack with the weapon. | ||
/// </summary> | ||
public EntityUid User; | ||
|
||
/// <summary> | ||
/// The weapon being used. | ||
/// </summary> | ||
public EntityUid Used; | ||
|
||
public bool Cancelled { get; private set; } | ||
|
||
/// <summary> | ||
/// Prevent the weapon from attacking | ||
/// </summary> | ||
public void Cancel() | ||
{ | ||
Cancelled = true; | ||
} | ||
|
||
/// <summary> | ||
/// Allow the weapon to attack again, only use if you know what you are doing | ||
/// </summary> | ||
public void Uncancel() | ||
{ | ||
Cancelled = false; | ||
} | ||
} |
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
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
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