-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3aff9bf
commit 8e46083
Showing
11 changed files
with
516 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="IScp3114Event.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.Interfaces | ||
{ | ||
using Exiled.API.Features.Roles; | ||
|
||
/// <summary> | ||
/// Event args used for all <see cref="Scp3114Role" /> related events. | ||
/// </summary> | ||
public interface IScp3114Event : IPlayerEvent | ||
{ | ||
/// <summary> | ||
/// Gets the <see cref="Scp3114Role" /> triggering the event. | ||
/// </summary> | ||
public Scp3114Role Scp3114 { get; } | ||
} | ||
} |
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,46 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="DisguisedEventArgs.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.Scp3114 | ||
{ | ||
using API.Features; | ||
using Exiled.API.Features.Roles; | ||
using Interfaces; | ||
|
||
using PlayerRoles.Ragdolls; | ||
|
||
/// <summary> | ||
/// Contains all information before SCP-3114 changes its target focus. | ||
/// </summary> | ||
public class DisguisedEventArgs : IScp3114Event, IRagdollEvent | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DisguisedEventArgs" /> class. | ||
/// </summary> | ||
/// <param name="player"> | ||
/// <inheritdoc cref="Player" /> | ||
/// </param> | ||
/// <param name="ragdoll"> | ||
/// <inheritdoc cref="Ragdoll" /> | ||
/// </param> | ||
public DisguisedEventArgs(ReferenceHub player, DynamicRagdoll ragdoll) | ||
{ | ||
Player = Player.Get(player); | ||
Scp3114 = Player.Role.As<Scp3114Role>(); | ||
Ragdoll = Ragdoll.Get(ragdoll); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public Player Player { get; } | ||
|
||
/// <inheritdoc/> | ||
public Scp3114Role Scp3114 { get; } | ||
|
||
/// <inheritdoc/> | ||
public Ragdoll Ragdoll { get; } | ||
} | ||
} |
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,49 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="DisguisingEventArgs.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.Scp3114 | ||
{ | ||
using API.Features; | ||
using Exiled.API.Features.Roles; | ||
using Interfaces; | ||
|
||
using PlayerRoles.Ragdolls; | ||
|
||
/// <summary> | ||
/// Contains all information before SCP-3114 it's diguised to a new role. | ||
/// </summary> | ||
public class DisguisingEventArgs : IScp3114Event, IDeniableEvent, IRagdollEvent | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DisguisingEventArgs" /> class. | ||
/// </summary> | ||
/// <param name="player"> | ||
/// <inheritdoc cref="Player" /> | ||
/// </param> | ||
/// <param name="ragdoll"> | ||
/// <inheritdoc cref="Ragdoll" /> | ||
/// </param> | ||
public DisguisingEventArgs(ReferenceHub player, DynamicRagdoll ragdoll) | ||
{ | ||
Player = Player.Get(player); | ||
Scp3114 = Player.Role.As<Scp3114Role>(); | ||
Ragdoll = Ragdoll.Get(ragdoll); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public bool IsAllowed { get; set; } = true; | ||
|
||
/// <inheritdoc/> | ||
public Player Player { get; } | ||
|
||
/// <inheritdoc/> | ||
public Scp3114Role Scp3114 { get; } | ||
|
||
/// <inheritdoc/> | ||
public Ragdoll Ragdoll { get; } | ||
} | ||
} |
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 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="RevealedEventArgs.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.Scp3114 | ||
{ | ||
using API.Features; | ||
using Exiled.API.Features.Roles; | ||
using Interfaces; | ||
|
||
/// <summary> | ||
/// Contains all information before SCP-3114 changes its target focus. | ||
/// </summary> | ||
public class RevealedEventArgs : IScp3114Event | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="RevealedEventArgs" /> class. | ||
/// </summary> | ||
/// <param name="player"> | ||
/// <inheritdoc cref="Player" /> | ||
/// </param> | ||
public RevealedEventArgs(ReferenceHub player) | ||
{ | ||
Player = Player.Get(player); | ||
Scp3114 = Player.Role.As<Scp3114Role>(); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public Player Player { get; } | ||
|
||
/// <inheritdoc/> | ||
public Scp3114Role Scp3114 { get; } | ||
} | ||
} |
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,44 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="RevealingEventArgs.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.Scp3114 | ||
{ | ||
using API.Features; | ||
using Exiled.API.Features.Roles; | ||
using Interfaces; | ||
|
||
/// <summary> | ||
/// Contains all information before SCP-3114 changes its target focus. | ||
/// </summary> | ||
public class RevealingEventArgs : IScp3114Event, IDeniableEvent | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="RevealingEventArgs" /> class. | ||
/// </summary> | ||
/// <param name="player"> | ||
/// <inheritdoc cref="Player" /> | ||
/// </param> | ||
/// <param name="isAllowed"> | ||
/// <inheritdoc cref="IsAllowed" /> | ||
/// </param> | ||
public RevealingEventArgs(ReferenceHub player, bool isAllowed = true) | ||
{ | ||
Player = Player.Get(player); | ||
Scp3114 = Player.Role.As<Scp3114Role>(); | ||
IsAllowed = isAllowed; | ||
} | ||
|
||
/// <inheritdoc/> | ||
public bool IsAllowed { get; set; } | ||
|
||
/// <inheritdoc/> | ||
public Player Player { get; } | ||
|
||
/// <inheritdoc/> | ||
public Scp3114Role Scp3114 { get; } | ||
} | ||
} |
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,52 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="TryUseBodyEventArgs.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.Scp3114 | ||
{ | ||
using API.Features; | ||
using Exiled.API.Features.Roles; | ||
using Interfaces; | ||
using PlayerRoles.Ragdolls; | ||
|
||
/// <summary> | ||
/// Contains all information before SCP-3114 changes its target focus. | ||
/// </summary> | ||
public class TryUseBodyEventArgs : IScp3114Event, IDeniableEvent, IRagdollEvent | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="TryUseBodyEventArgs" /> class. | ||
/// </summary> | ||
/// <param name="player"> | ||
/// <inheritdoc cref="Player" /> | ||
/// </param> | ||
/// <param name="ragdoll"> | ||
/// <inheritdoc cref="Ragdoll" /> | ||
/// </param> | ||
/// <param name="isAllowed"> | ||
/// <inheritdoc cref="IsAllowed" /> | ||
/// </param> | ||
public TryUseBodyEventArgs(ReferenceHub player, BasicRagdoll ragdoll, bool isAllowed = true) | ||
{ | ||
Player = Player.Get(player); | ||
Scp3114 = Player.Role.As<Scp3114Role>(); | ||
Ragdoll = Ragdoll.Get(ragdoll); | ||
IsAllowed = isAllowed; | ||
} | ||
|
||
/// <inheritdoc/> | ||
public bool IsAllowed { get; set; } | ||
|
||
/// <inheritdoc/> | ||
public Player Player { get; } | ||
|
||
/// <inheritdoc/> | ||
public Ragdoll Ragdoll { get; } | ||
|
||
/// <inheritdoc/> | ||
public Scp3114Role Scp3114 { get; } | ||
} | ||
} |
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,76 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="Scp3114.cs" company="Exiled Team"> | ||
// Copyright (c) Exiled Team. All rights reserved. | ||
// Licensed under the CC BY-SA 3.0 license. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
namespace Exiled.Events.Handlers | ||
{ | ||
#pragma warning disable SA1623 // Property summary documentation should match accessors | ||
|
||
using Exiled.Events.EventArgs.Scp244; | ||
using Exiled.Events.EventArgs.Scp3114; | ||
using Exiled.Events.Features; | ||
|
||
/// <summary> | ||
/// Scp3114 related events. | ||
/// </summary> | ||
public static class Scp3114 | ||
{ | ||
/// <summary> | ||
/// Invoked before Disguising. | ||
/// </summary> | ||
public static Event<DisguisingEventArgs> Disguising { get; set; } = new(); | ||
|
||
/// <summary> | ||
/// Invoked before Disguising. | ||
/// </summary> | ||
public static Event<DisguisedEventArgs> Disguised { get; set; } = new(); | ||
|
||
/// <summary> | ||
/// Invoked before Disguising. | ||
/// </summary> | ||
public static Event<TryUseBodyEventArgs> TryUseBody { get; set; } = new(); | ||
|
||
/// <summary> | ||
/// Invoked before Disguising. | ||
/// </summary> | ||
public static Event<RevealedEventArgs> Revealed { get; set; } = new(); | ||
|
||
/// <summary> | ||
/// Invoked before Disguising. | ||
/// </summary> | ||
public static Event<RevealingEventArgs> Revealing { get; set; } = new(); | ||
|
||
/// <summary> | ||
/// Called before diguising to a new Roles. | ||
/// </summary> | ||
/// <param name="ev">The <see cref="DisguisingEventArgs" /> instance.</param> | ||
public static void OnDisguising(DisguisingEventArgs ev) => Disguising.InvokeSafely(ev); | ||
|
||
/// <summary> | ||
/// Called before diguising to a new Roles. | ||
/// </summary> | ||
/// <param name="ev">The <see cref="DisguisedEventArgs" /> instance.</param> | ||
public static void OnDisguised(DisguisedEventArgs ev) => Disguised.InvokeSafely(ev); | ||
|
||
/// <summary> | ||
/// Called before diguising to a new Roles. | ||
/// </summary> | ||
/// <param name="ev">The <see cref="TryUseBodyEventArgs" /> instance.</param> | ||
public static void OnTryUseBody(TryUseBodyEventArgs ev) => TryUseBody.InvokeSafely(ev); | ||
|
||
/// <summary> | ||
/// Called before diguising to a new Roles. | ||
/// </summary> | ||
/// <param name="ev">The <see cref="RevealedEventArgs" /> instance.</param> | ||
public static void OnRevealed(RevealedEventArgs ev) => Revealed.InvokeSafely(ev); | ||
|
||
/// <summary> | ||
/// Called before diguising to a new Roles. | ||
/// </summary> | ||
/// <param name="ev">The <see cref="RevealingEventArgs" /> instance.</param> | ||
public static void OnRevealing(RevealingEventArgs ev) => Revealing.InvokeSafely(ev); | ||
} | ||
} |
Oops, something went wrong.