From 21d1333b08ba687ce9558f5332a13dfe0b263cb5 Mon Sep 17 00:00:00 2001 From: miniduikboot Date: Fri, 10 Nov 2023 15:40:06 +0100 Subject: [PATCH] Make API remarks show up in the documentation Some xmldoc processors don't process stuff that is not inside a remarks tag, so we add them here. --- .../Events/Game/Player/IPlayerCheckMurderEvent.cs | 10 +++++++--- .../Events/Game/Player/IPlayerMurderEvent.cs | 6 +++++- src/Impostor.Api/Games/IGame.cs | 4 +++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Impostor.Api/Events/Game/Player/IPlayerCheckMurderEvent.cs b/src/Impostor.Api/Events/Game/Player/IPlayerCheckMurderEvent.cs index 878d5a5..a1192ac 100644 --- a/src/Impostor.Api/Events/Game/Player/IPlayerCheckMurderEvent.cs +++ b/src/Impostor.Api/Events/Game/Player/IPlayerCheckMurderEvent.cs @@ -4,24 +4,28 @@ using Impostor.Api.Net.Inner.Objects; namespace Impostor.Api.Events.Player { /// - /// Event that allows changing or canceling an upcoming player murder. + /// Event that allows changing or canceling an upcoming player murder. /// + /// /// Note that this event only triggers if the Host of the Game did not disable server authority. /// /// If you want to get an event after the murder took place, listen to . + /// public interface IPlayerCheckMurderEvent : IPlayerEvent, IEventCancelable { /// - /// Gets the player who got murdered. + /// Gets the player who will be murdered. /// IInnerPlayerControl Victim { get; } /// - /// Gets or sets the result of this event. + /// Gets or sets the result of this event. /// + /// /// Its initial value is what would have happened in the normal game flow. /// - If set to Succeeded, the Victim will die. /// - If set to FailedProtected, the Victim will be protected with a shield animation and the attacker will have a cooldown set. + /// MurderResultFlags Result { get; set; } } } diff --git a/src/Impostor.Api/Events/Game/Player/IPlayerMurderEvent.cs b/src/Impostor.Api/Events/Game/Player/IPlayerMurderEvent.cs index b90ea3e..7c49e7b 100644 --- a/src/Impostor.Api/Events/Game/Player/IPlayerMurderEvent.cs +++ b/src/Impostor.Api/Events/Game/Player/IPlayerMurderEvent.cs @@ -4,12 +4,14 @@ using Impostor.Api.Net.Inner.Objects; namespace Impostor.Api.Events.Player { /// - /// Event that is called when a player is killed by another player. + /// Event that is called when a player is killed by another player. /// + /// /// This event works regardless of server authority is enabled or not. /// /// If you want to cancel this kill, listen to /// If you want to know about players that were voted out, listed to + /// public interface IPlayerMurderEvent : IPlayerEvent { /// @@ -20,7 +22,9 @@ namespace Impostor.Api.Events.Player /// /// Gets the result of the event. /// + /// /// Note that if FailedError or FailedProtected is set, the kill did not take place + /// MurderResultFlags Result { get; } } } diff --git a/src/Impostor.Api/Games/IGame.cs b/src/Impostor.Api/Games/IGame.cs index 8f5d29b..05d6015 100644 --- a/src/Impostor.Api/Games/IGame.cs +++ b/src/Impostor.Api/Games/IGame.cs @@ -40,9 +40,11 @@ namespace Impostor.Api.Games int HostId { get; } /// - /// Gets a value indicating whether the Host of the game has requested host authority. + /// Gets a value indicating whether the Host of the game has requested host authority. /// + /// /// Vanilla Among Us does not request this, but certain client-side mods will. + /// bool IsHostAuthoritive { get; } IClientPlayer? GetClientPlayer(int clientId); -- 2.39.5