From 5ced6fa487de93c369624e7ec861aaf7d4639d8f Mon Sep 17 00:00:00 2001 From: SrLicht Date: Sat, 8 Jul 2023 17:14:31 -0300 Subject: [PATCH] Boop # SCP-049 * New event Scp049CallProgeny * Executed in Scp049CallAbility.ServerProcessCmd * New event Scp049MarkPlayer and Scp049LoseMarkedPlayer * Executed in Scp049SenseAbility.ServerProcessCmd and Scp049SenseAbility.ServerLoseTarget # SCP-049-2 * New event Scp0492ConsumeCorpse * Executed in ZombieConsumeAbility.ServerComplete # Player * New events **PlayerEnterEnvironmentalHazard**, **PlayerStayOnEnvironmentalHazard**, **PlayerExitEnviromantalHazard** * Executed in EnvironmentalHazard --- NwPluginAPI/Enums/ServerEventType.cs | 46 +++++++++++++++++++ .../Player/PlayerEnterEnvironmentalHazard.cs | 31 +++++++++++++ .../Player/PlayerExitEnviromantalHazard.cs | 31 +++++++++++++ .../Player/PlayerStayOnEnvironmentalHazard.cs | 31 +++++++++++++ .../Events/Args/Scp049/Scp049CallProgeny.cs | 35 ++++++++++++++ .../Args/Scp049/Scp049LoseMarkedPlayer.cs | 39 ++++++++++++++++ .../Events/Args/Scp049/Scp049MarkPlayer.cs | 43 +++++++++++++++++ .../Args/Scp0492/Scp0492ConsumeCorpse.cs | 37 +++++++++++++++ 8 files changed, 293 insertions(+) create mode 100644 NwPluginAPI/Events/Args/Player/PlayerEnterEnvironmentalHazard.cs create mode 100644 NwPluginAPI/Events/Args/Player/PlayerExitEnviromantalHazard.cs create mode 100644 NwPluginAPI/Events/Args/Player/PlayerStayOnEnvironmentalHazard.cs create mode 100644 NwPluginAPI/Events/Args/Scp049/Scp049CallProgeny.cs create mode 100644 NwPluginAPI/Events/Args/Scp049/Scp049LoseMarkedPlayer.cs create mode 100644 NwPluginAPI/Events/Args/Scp049/Scp049MarkPlayer.cs create mode 100644 NwPluginAPI/Events/Args/Scp0492/Scp0492ConsumeCorpse.cs diff --git a/NwPluginAPI/Enums/ServerEventType.cs b/NwPluginAPI/Enums/ServerEventType.cs index f4517ad..dd0b0cd 100644 --- a/NwPluginAPI/Enums/ServerEventType.cs +++ b/NwPluginAPI/Enums/ServerEventType.cs @@ -29,6 +29,8 @@ namespace PluginAPI.Enums using Interactables.Interobjects.DoorUtils; using Interactables.Interobjects; using Scp914; + using Hazards; + using PlayerRoles.PlayableScps.Scp049; /// /// Represents server event types. @@ -1087,5 +1089,49 @@ public enum ServerEventType : int /// Parameters: player, type. amount. /// PlayerDroppedAmmo = 131, + + /// + /// Executed when player enters a . + /// + /// + /// Parameters: player, hazard. + /// + PlayerEnterEnvironmentalHazard = 132, + + /// + /// Executed when player stays in an . + /// + /// + /// Parameters: player, hazard. + /// + PlayerStayOnEnvironmentalHazard = 133, + + /// + /// Executed when player exits a . + /// + /// + /// Parameters: player, hazard. + /// + PlayerExitEnvironmentalHazard = 134, + + /// + /// Executed when player consume a corpse as SCP-049-2 + /// + Scp0492ConsumeCorpse = 135, + + /// + /// Executed when a player as SCP-049 mark a player with SenseAbilty. + /// + Scp049MarkPlayer = 136, + + /// + /// Executed when a player as SCP-049 lose a player with SenseAbility. + /// + Scp049LosingPlayer = 137, + + /// + /// Executed when a player as SCP-049 use + /// + Scp049CallProgeny = 138 } } diff --git a/NwPluginAPI/Events/Args/Player/PlayerEnterEnvironmentalHazard.cs b/NwPluginAPI/Events/Args/Player/PlayerEnterEnvironmentalHazard.cs new file mode 100644 index 0000000..e3fd79a --- /dev/null +++ b/NwPluginAPI/Events/Args/Player/PlayerEnterEnvironmentalHazard.cs @@ -0,0 +1,31 @@ +using PluginAPI.Core.Attributes; +using PluginAPI.Enums; +using Hazards; + +namespace PluginAPI.Events.Args.Player +{ + public class PlayerEnterEnvironmentalHazard : IEventArguments + { + public ServerEventType BaseType { get; } = ServerEventType.PlayerEnterEnvironmentalHazard; + + /// + /// Gets the player who is entering the enviromental hazard. + /// + [EventArgument] + public Core.Player Player { get; } + + /// + /// Gets the enviromental hazard which the player is entering. + /// + [EventArgument] + public EnvironmentalHazard EnvironmentalHazard { get; } + + public PlayerEnterEnvironmentalHazard(ReferenceHub hub, EnvironmentalHazard hazard) + { + Player = Core.Player.Get(hub); + EnvironmentalHazard = hazard; + } + + PlayerEnterEnvironmentalHazard() { } + } +} diff --git a/NwPluginAPI/Events/Args/Player/PlayerExitEnviromantalHazard.cs b/NwPluginAPI/Events/Args/Player/PlayerExitEnviromantalHazard.cs new file mode 100644 index 0000000..a7f74f8 --- /dev/null +++ b/NwPluginAPI/Events/Args/Player/PlayerExitEnviromantalHazard.cs @@ -0,0 +1,31 @@ +using Hazards; +using PluginAPI.Core.Attributes; +using PluginAPI.Enums; + +namespace PluginAPI.Events.Args.Player +{ + public class PlayerExitEnviromantalHazard : IEventArguments + { + public ServerEventType BaseType { get; } = ServerEventType.PlayerExitEnvironmentalHazard; + + /// + /// Gets the player who is exiting the enviromental hazard. + /// + [EventArgument] + public Core.Player Player { get; } + + /// + /// Gets the enviromental hazard which the player is exiting. + /// + [EventArgument] + public EnvironmentalHazard EnvironmentalHazard { get; } + + public PlayerExitEnviromantalHazard(ReferenceHub hub, EnvironmentalHazard hazard) + { + Player = Core.Player.Get(hub); + EnvironmentalHazard = hazard; + } + + public PlayerExitEnviromantalHazard() { } + } +} diff --git a/NwPluginAPI/Events/Args/Player/PlayerStayOnEnvironmentalHazard.cs b/NwPluginAPI/Events/Args/Player/PlayerStayOnEnvironmentalHazard.cs new file mode 100644 index 0000000..e1c7992 --- /dev/null +++ b/NwPluginAPI/Events/Args/Player/PlayerStayOnEnvironmentalHazard.cs @@ -0,0 +1,31 @@ +using Hazards; +using PluginAPI.Core.Attributes; +using PluginAPI.Enums; + +namespace PluginAPI.Events.Args.Player +{ + public class PlayerStayOnEnvironmentalHazard : IEventArguments + { + public ServerEventType BaseType { get; } = ServerEventType.PlayerStayOnEnvironmentalHazard; + + /// + /// Gets the player who is staying the enviromental hazard. + /// + [EventArgument] + public Core.Player Player { get; } + + /// + /// Gets the enviromental hazard which the player is staying. + /// + [EventArgument] + public EnvironmentalHazard EnvironmentalHazard { get; } + + public PlayerStayOnEnvironmentalHazard(ReferenceHub hub, EnvironmentalHazard hazard) + { + Player = Core.Player.Get(hub); + EnvironmentalHazard = hazard; + } + + public PlayerStayOnEnvironmentalHazard() { } + } +} diff --git a/NwPluginAPI/Events/Args/Scp049/Scp049CallProgeny.cs b/NwPluginAPI/Events/Args/Scp049/Scp049CallProgeny.cs new file mode 100644 index 0000000..c6aa2a0 --- /dev/null +++ b/NwPluginAPI/Events/Args/Scp049/Scp049CallProgeny.cs @@ -0,0 +1,35 @@ +using PluginAPI.Core.Attributes; +using PluginAPI.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PluginAPI.Events.Args.Scp049 +{ + public class Scp049CallProgeny : IEventArguments + { + public ServerEventType BaseType { get; } = ServerEventType.Scp049CallProgeny; + + /// + /// Gets the player who is playing as SCP-049. + /// + [EventArgument] + public Core.Player Scp049 { get; } + + /// + /// Gets or set the duration of the ability. + /// + [EventArgument] + public double Duration { get; set; } + + public Scp049CallProgeny(ReferenceHub scp049, double duration) + { + Scp049 = Core.Player.Get(scp049); + Duration = duration; + } + + Scp049CallProgeny() { } + } +} diff --git a/NwPluginAPI/Events/Args/Scp049/Scp049LoseMarkedPlayer.cs b/NwPluginAPI/Events/Args/Scp049/Scp049LoseMarkedPlayer.cs new file mode 100644 index 0000000..8b49d29 --- /dev/null +++ b/NwPluginAPI/Events/Args/Scp049/Scp049LoseMarkedPlayer.cs @@ -0,0 +1,39 @@ +using PluginAPI.Core.Attributes; +using PluginAPI.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PluginAPI.Events.Args.Scp049 +{ + public class Scp049LoseMarkedPlayer : IEventArguments + { + public ServerEventType BaseType { get; } = ServerEventType.Scp049LosingPlayer; + + /// + /// Gets the player who is playing as SCP-049. + /// + [EventArgument] + public Core.Player Scp049 { get; } + + /// + /// Gets the player who escaped from SCP-049. + /// + [EventArgument] + public Core.Player Target { get; } + + /// + /// Get or set the cooldown for losing a target. + /// + [EventArgument] + public double Cooldown { get; set; } + + public Scp049LoseMarkedPlayer(ReferenceHub scp049, ReferenceHub target) + { + Scp049 = Core.Player.Get(scp049); + Target = Core.Player.Get(target); + } + } +} diff --git a/NwPluginAPI/Events/Args/Scp049/Scp049MarkPlayer.cs b/NwPluginAPI/Events/Args/Scp049/Scp049MarkPlayer.cs new file mode 100644 index 0000000..e58ac7c --- /dev/null +++ b/NwPluginAPI/Events/Args/Scp049/Scp049MarkPlayer.cs @@ -0,0 +1,43 @@ +using Hazards; +using PluginAPI.Core.Attributes; +using PluginAPI.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PluginAPI.Events.Args.Scp049 +{ + public class Scp049MarkPlayer : IEventArguments + { + public ServerEventType BaseType { get; } = ServerEventType.Scp049MarkPlayer; + + /// + /// Gets the player playing as SCP-049. + /// + [EventArgument] + public Core.Player Scp049 { get; } + + /// + /// Gets the player marked. + /// + [EventArgument] + public Core.Player Target { get; } + + /// + /// Get or set mark duration. + /// + [EventArgument] + public double Duration { get; set; } + + public Scp049MarkPlayer(ReferenceHub scp049, ReferenceHub target, double duration) + { + Scp049 = Core.Player.Get(scp049); + Target = Core.Player.Get(target); + Duration = duration; + } + + Scp049MarkPlayer() { } + } +} diff --git a/NwPluginAPI/Events/Args/Scp0492/Scp0492ConsumeCorpse.cs b/NwPluginAPI/Events/Args/Scp0492/Scp0492ConsumeCorpse.cs new file mode 100644 index 0000000..46f295b --- /dev/null +++ b/NwPluginAPI/Events/Args/Scp0492/Scp0492ConsumeCorpse.cs @@ -0,0 +1,37 @@ +using PluginAPI.Core.Attributes; +using PluginAPI.Enums; + +namespace PluginAPI.Events.Args.Scp0492 +{ + public class Scp0492ConsumeCorpse : IEventArguments + { + public ServerEventType BaseType { get; } = ServerEventType.Scp0492ConsumeCorpse; + + /// + /// Gets the player who is playing as SCP-049-2. + /// + [EventArgument] + public Core.Player Player { get; } + + /// + /// Gets the corpse consumed. + /// + [EventArgument] + public BasicRagdoll CorpseConsumed { get; } + + /// + /// Gets or sets the amount of healing for consuming a corpse. + /// + [EventArgument] + public float Heal { get; set; } + + public Scp0492ConsumeCorpse(ReferenceHub zombie, BasicRagdoll corpseConsumed, float healAmount) + { + Player = Core.Player.Get(zombie); + CorpseConsumed = corpseConsumed; + Heal = healAmount; + } + + Scp0492ConsumeCorpse() { } + } +} \ No newline at end of file