Skip to content

Commit

Permalink
docs: better grammar and spelling (#187)
Browse files Browse the repository at this point in the history
* docs: better english

"Whether or not" is incorrect, even though it is understandable, the language is incorrect and can just be whether, as whether infers there is a negative and a positive, https://english.stackexchange.com/questions/3382/whether-or-not-vs-whether. In the case of this, "or not" in "Whether or not" is not needed, as it is always undetermined the response in the documentation, the documentation won't know.

* docs: better english, again

Can remove the "or not" when there is a whether in there
  • Loading branch information
LumiFae authored Nov 22, 2024
1 parent f812681 commit 78cd561
Show file tree
Hide file tree
Showing 220 changed files with 607 additions and 607 deletions.
10 changes: 5 additions & 5 deletions EXILED/Exiled.API/Extensions/DamageTypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ public static class DamageTypeExtensions
/// Check if a <see cref="DamageType">damage type</see> is caused by a weapon.
/// </summary>
/// <param name="type">The damage type to be checked.</param>
/// <param name="checkMicro">Indicates whether or not the MicroHid damage type should be taken into account.</param>
/// <returns>Returns whether or not the <see cref="DamageType"/> is caused by weapon.</returns>
/// <param name="checkMicro">Indicates whether the MicroHid damage type should be taken into account.</param>
/// <returns>Returns whether the <see cref="DamageType"/> is caused by weapon.</returns>
public static bool IsWeapon(this DamageType type, bool checkMicro = true) => type switch
{
DamageType.Crossvec or DamageType.Logicer or DamageType.Revolver or DamageType.Shotgun or DamageType.AK or DamageType.Com15 or DamageType.Com18 or DamageType.E11Sr or DamageType.Fsp9 or DamageType.ParticleDisruptor or DamageType.Com45 or DamageType.Frmg0 or DamageType.A7 => true,
Expand All @@ -133,8 +133,8 @@ public static class DamageTypeExtensions
/// Check if a <see cref="DamageType">damage type</see> is caused by a SCP.
/// </summary>
/// <param name="type">The damage type to be checked.</param>
/// <param name="checkItems">Indicates whether or not the SCP-items damage types should be taken into account.</param>
/// <returns>Returns whether or not the <see cref="DamageType"/> is caused by SCP.</returns>
/// <param name="checkItems">Indicates whether the SCP-items damage types should be taken into account.</param>
/// <returns>Returns whether the <see cref="DamageType"/> is caused by SCP.</returns>
public static bool IsScp(this DamageType type, bool checkItems = true) => type switch
{
DamageType.Scp or DamageType.Scp049 or DamageType.Scp096 or DamageType.Scp106 or DamageType.Scp173 or DamageType.Scp939 or DamageType.Scp0492 or DamageType.Scp3114 => true,
Expand All @@ -146,7 +146,7 @@ public static class DamageTypeExtensions
/// Check if a <see cref="DamageType">damage type</see> is caused by a status effect.
/// </summary>
/// <param name="type">The damage type to be checked.</param>
/// <returns>Returns whether or not the <see cref="DamageType"/> is caused by status effect.</returns>
/// <returns>Returns whether the <see cref="DamageType"/> is caused by status effect.</returns>
public static bool IsStatusEffect(this DamageType type) => type switch
{
DamageType.Asphyxiation or DamageType.Poison or DamageType.Bleeding or DamageType.Scp207 or DamageType.Hypothermia or DamageType.Strangled => true,
Expand Down
4 changes: 2 additions & 2 deletions EXILED/Exiled.API/Extensions/DangerTypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static Type Type(this DangerType danger)
/// </summary>
/// <param name="danger">The <see cref="DangerType"/> enum.</param>
/// <param name="type">The type found with the corresponding DangerType.</param>
/// <returns>Whether or not the type has been found.</returns>
/// <returns>Whether the type has been found.</returns>
public static bool TryGetType(this DangerType danger, out Type type)
=> DangerTypeToType.TryGetValue(danger, out type);

Expand All @@ -70,7 +70,7 @@ public static DangerType GetDangerType(this DangerStackBase dangerStackBase)
/// </summary>
/// <param name="dangerStackBase">The <see cref="DangerStackBase"/> enum.</param>
/// <param name="danger">The danger type found.</param>
/// <returns>Whether or not the danger has been found.</returns>
/// <returns>Whether the danger has been found.</returns>
public static bool TryGetDangerType(this DangerStackBase dangerStackBase, out DangerType danger)
{
if (dangerStackBase == null || !TypeToDangerType.TryGetValue(dangerStackBase.GetType(), out danger))
Expand Down
6 changes: 3 additions & 3 deletions EXILED/Exiled.API/Extensions/DoorTypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ public static class DoorTypeExtensions
/// Checks if a <see cref="DoorType">door type</see> is a gate.
/// </summary>
/// <param name="door">The door to be checked.</param>
/// <returns>Returns whether the <see cref="DoorType"/> is a gate or not.</returns>
/// <returns>Returns whether the <see cref="DoorType"/> is a gate.</returns>
public static bool IsGate(this DoorType door) => door is DoorType.GateA or DoorType.GateB or DoorType.Scp914Gate or
DoorType.Scp049Gate or DoorType.GR18Gate or DoorType.SurfaceGate or DoorType.Scp173Gate;

/// <summary>
/// Checks if a <see cref="DoorType">door type</see> is a checkpoint.
/// </summary>
/// <param name="door">The door to be checked.</param>
/// <returns>Returns whether the <see cref="DoorType"/> is a checkpoint or not.</returns>
/// <returns>Returns whether the <see cref="DoorType"/> is a checkpoint.</returns>
public static bool IsCheckpoint(this DoorType door) => door is DoorType.CheckpointLczA or DoorType.CheckpointLczB or DoorType.CheckpointEzHczA or DoorType.CheckpointEzHczB;

/// <summary>
/// Checks if a <see cref="DoorType">door type</see> is an elevator.
/// </summary>
/// <param name="door">The door to be checked.</param>
/// <returns>Returns whether the <see cref="DoorType"/> is an elevator or not.</returns>
/// <returns>Returns whether the <see cref="DoorType"/> is an elevator.</returns>
public static bool IsElevator(this DoorType door) => door is DoorType.ElevatorGateA or DoorType.ElevatorGateB
or DoorType.ElevatorLczA or DoorType.ElevatorLczB or DoorType.ElevatorNuke or DoorType.ElevatorScp049;
}
Expand Down
28 changes: 14 additions & 14 deletions EXILED/Exiled.API/Extensions/EffectTypeExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static Type Type(this EffectType effect)
/// </summary>
/// <param name="effect">The <see cref="EffectType"/> enum.</param>
/// <param name="type">The type found with the corresponding EffecType.</param>
/// <returns>Whether or not the effectType has been found.</returns>
/// <returns>Whether the effectType has been found.</returns>
public static bool TryGetType(this EffectType effect, out Type type)
=> EffectTypeToType.TryGetValue(effect, out type);

Expand All @@ -111,7 +111,7 @@ public static EffectType GetEffectType(this StatusEffectBase statusEffectBase)
/// </summary>
/// <param name="statusEffectBase">The <see cref="StatusEffectBase"/> enum.</param>
/// <param name="effect">The effect found.</param>
/// <returns>Whether or not the effect has been found.</returns>
/// <returns>Whether the effect has been found.</returns>
public static bool TryGetEffectType(this StatusEffectBase statusEffectBase, out EffectType effect)
{
if (statusEffectBase == null || !TypeToEffectType.TryGetValue(statusEffectBase.GetType(), out effect))
Expand All @@ -131,56 +131,56 @@ public static bool TryGetEffectType(this StatusEffectBase statusEffectBase, out
public static void SetFogType(this FogControl fogControl, FogType fogType) => fogControl.Intensity = (byte)(fogType + 1);

/// <summary>
/// Returns whether or not the provided <paramref name="effect"/> drains health over time.
/// Returns whether the provided <paramref name="effect"/> drains health over time.
/// </summary>
/// <param name="effect">The <see cref="EffectType"/>.</param>
/// <returns>Whether or not the effect drains health over time.</returns>
/// <returns>Whether the effect drains health over time.</returns>
/// <seealso cref="IsHealing(EffectType)"/>
public static bool IsHarmful(this EffectType effect) => effect is EffectType.Asphyxiated or EffectType.Bleeding
or EffectType.Corroding or EffectType.Decontaminating or EffectType.Hemorrhage or EffectType.Hypothermia
or EffectType.Poisoned or EffectType.Scp207 or EffectType.SeveredHands or EffectType.Strangled;

/// <summary>
/// Returns whether or not the provided <paramref name="effect"/> heals a player.
/// Returns whether the provided <paramref name="effect"/> heals a player.
/// </summary>
/// <param name="effect">The <see cref="EffectType"/>.</param>
/// <returns>Whether or not the effect heals.</returns>
/// <returns>Whether the effect heals.</returns>
/// <seealso cref="IsHarmful(EffectType)"/>
public static bool IsHealing(this EffectType effect) => effect.TryGetType(out Type type) && typeof(IHealablePlayerEffect).IsAssignableFrom(type);

/// <summary>
/// Returns whether or not the provided <paramref name="effect"/> is a negative effect.
/// Returns whether the provided <paramref name="effect"/> is a negative effect.
/// </summary>
/// <param name="effect">The <see cref="EffectType"/>.</param>
/// <returns>Whether or not the effect is a negative effect.</returns>
/// <returns>Whether the effect is a negative effect.</returns>
/// <seealso cref="IsHarmful(EffectType)"/>
public static bool IsNegative(this EffectType effect) => IsHarmful(effect) || effect is EffectType.AmnesiaItems
or EffectType.AmnesiaVision or EffectType.Blinded or EffectType.Burned or EffectType.Concussed or EffectType.Deafened
or EffectType.Disabled or EffectType.Ensnared or EffectType.Exhausted or EffectType.Flashed or EffectType.SinkHole
or EffectType.Stained or EffectType.InsufficientLighting or EffectType.SoundtrackMute or EffectType.Scanned or EffectType.Slowness;

/// <summary>
/// Returns whether or not the provided <paramref name="effect"/> is a positive effect.
/// Returns whether the provided <paramref name="effect"/> is a positive effect.
/// </summary>
/// <param name="effect">The <see cref="EffectType"/>.</param>
/// <returns>Whether or not the effect is a positive effect.</returns>
/// <returns>Whether the effect is a positive effect.</returns>
/// <seealso cref="IsHealing(EffectType)"/>
public static bool IsPositive(this EffectType effect) => effect is EffectType.BodyshotReduction or EffectType.DamageReduction
or EffectType.Invigorated or EffectType.Invisible or EffectType.MovementBoost or EffectType.RainbowTaste
or EffectType.Scp207 or EffectType.Scp1853 or EffectType.Vitality or EffectType.AntiScp207 or EffectType.Ghostly;

/// <summary>
/// Returns whether or not the provided <paramref name="effect"/> affects the player's movement speed.
/// Returns whether the provided <paramref name="effect"/> affects the player's movement speed.
/// </summary>
/// <param name="effect">The <see cref="EffectType"/>.</param>
/// <returns>Whether or not the effect modifies the player's movement speed.</returns>
/// <returns>Whether the effect modifies the player's movement speed.</returns>
public static bool IsMovement(this EffectType effect) => effect.TryGetType(out Type type) && typeof(IMovementSpeedModifier).IsAssignableFrom(type);

/// <summary>
/// Returns whether or not the provided <paramref name="effect"/> is displayed to spectators as text.
/// Returns whether the provided <paramref name="effect"/> is displayed to spectators as text.
/// </summary>
/// <param name="effect">The <see cref="EffectType"/>.</param>
/// <returns>Whether or not the effect is displayed to spectators as text.</returns>
/// <returns>Whether the effect is displayed to spectators as text.</returns>
public static bool IsDisplayed(this EffectType effect) => effect.TryGetType(out Type type) && typeof(ISpectatorDataPlayerEffect).IsAssignableFrom(type);

/// <summary>
Expand Down
18 changes: 9 additions & 9 deletions EXILED/Exiled.API/Extensions/ItemExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,57 +30,57 @@ public static class ItemExtensions
/// Check if an <see cref="ItemType">item</see> is an ammo.
/// </summary>
/// <param name="item">The item to be checked.</param>
/// <returns>Returns whether the <see cref="ItemType"/> is an ammo or not.</returns>
/// <returns>Returns whether the <see cref="ItemType"/> is an ammo.</returns>
public static bool IsAmmo(this ItemType item) => item.GetAmmoType() is not AmmoType.None;

/// <summary>
/// Check if an <see cref="ItemType">item</see> is a weapon.
/// </summary>
/// <param name="type">The item to be checked.</param>
/// <param name="checkMicro">Indicates whether the MicroHID item should be taken into account or not.</param>
/// <returns>Returns whether the <see cref="ItemType"/> is a weapon or not.</returns>
/// <param name="checkMicro">Indicates whether the MicroHID item should be taken into account.</param>
/// <returns>Returns whether the <see cref="ItemType"/> is a weapon.</returns>
public static bool IsWeapon(this ItemType type, bool checkMicro = true) => type.GetFirearmType() is not FirearmType.None || (checkMicro && type is ItemType.MicroHID);

/// <summary>
/// Check if an <see cref="ItemType">item</see> is an SCP.
/// </summary>
/// <param name="type">The item to be checked.</param>
/// <returns>Returns whether or not the <see cref="ItemType"/> is an SCP.</returns>
/// <returns>Returns whether the <see cref="ItemType"/> is an SCP.</returns>
public static bool IsScp(this ItemType type) => GetCategory(type) == ItemCategory.SCPItem;

/// <summary>
/// Check if an <see cref="ItemType">item</see> is a throwable item.
/// </summary>
/// <param name="type">The item to be checked.</param>
/// <returns>Returns whether or not the <see cref="ItemType"/> is a throwable item.</returns>
/// <returns>Returns whether the <see cref="ItemType"/> is a throwable item.</returns>
public static bool IsThrowable(this ItemType type) => type is ItemType.SCP018 or ItemType.GrenadeHE or ItemType.GrenadeFlash or ItemType.SCP2176;

/// <summary>
/// Check if an <see cref="ItemType">item</see> is a medical item.
/// </summary>
/// <param name="type">The item to be checked.</param>
/// <returns>Returns whether or not the <see cref="ItemType"/> is a medical item.</returns>
/// <returns>Returns whether the <see cref="ItemType"/> is a medical item.</returns>
public static bool IsMedical(this ItemType type) => GetCategory(type) == ItemCategory.Medical;

/// <summary>
/// Check if an <see cref="ItemType">item</see> is a utility item.
/// </summary>
/// <param name="type">The item to be checked.</param>
/// <returns>Returns whether or not the <see cref="ItemType"/> is an utilty item.</returns>
/// <returns>Returns whether the <see cref="ItemType"/> is an utilty item.</returns>
public static bool IsUtility(this ItemType type) => type is ItemType.Flashlight or ItemType.Radio;

/// <summary>
/// Check if a <see cref="ItemType"/> is an armor item.
/// </summary>
/// <param name="type">The item to be checked.</param>
/// <returns>Returns whether or not the <see cref="ItemType"/> is an armor.</returns>
/// <returns>Returns whether the <see cref="ItemType"/> is an armor.</returns>
public static bool IsArmor(this ItemType type) => GetCategory(type) == ItemCategory.Armor;

/// <summary>
/// Check if an <see cref="ItemType">item</see> is a keycard.
/// </summary>
/// <param name="type">The item to be checked.</param>
/// <returns>Returns whether or not the <see cref="ItemType"/> is a keycard.</returns>
/// <returns>Returns whether the <see cref="ItemType"/> is a keycard.</returns>
public static bool IsKeycard(this ItemType type) => GetCategory(type) == ItemCategory.Keycard;

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions EXILED/Exiled.API/Extensions/MirrorExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public static void SetRoomLightIntensityForTargetOnly(this Room room, Player tar
/// </summary>
/// <param name="player">Player to change.</param>
/// <param name="type">Model type.</param>
/// <param name="skipJump">Whether or not to skip the little jump that works around an invisibility issue.</param>
/// <param name="skipJump">Whether to skip the little jump that works around an invisibility issue.</param>
/// <param name="unitId">The UnitNameId to use for the player's new role, if the player's new role uses unit names. (is NTF).</param>
public static void ChangeAppearance(this Player player, RoleTypeId type, bool skipJump = false, byte unitId = 0) => ChangeAppearance(player, type, Player.List.Where(x => x != player), skipJump, unitId);

Expand All @@ -250,7 +250,7 @@ public static void SetRoomLightIntensityForTargetOnly(this Room room, Player tar
/// <param name="player">Player to change.</param>
/// <param name="type">Model type.</param>
/// <param name="playersToAffect">The players who should see the changed appearance.</param>
/// <param name="skipJump">Whether or not to skip the little jump that works around an invisibility issue.</param>
/// <param name="skipJump">Whether to skip the little jump that works around an invisibility issue.</param>
/// <param name="unitId">The UnitNameId to use for the player's new role, if the player's new role uses unit names. (is NTF).</param>
public static void ChangeAppearance(this Player player, RoleTypeId type, IEnumerable<Player> playersToAffect, bool skipJump = false, byte unitId = 0)
{
Expand Down
Loading

0 comments on commit 78cd561

Please sign in to comment.