Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refractor!: rename blindness effectype #317

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions EXILED/Exiled.API/Enums/EffectType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public enum EffectType
Bleeding,

/// <summary>
/// Blurs the player's screen.
/// Make the player screen darker.
/// </summary>
Blinded,
Blindness,

/// <summary>
/// Increases damage the player receives. Does not apply any standalone damage.
Expand Down Expand Up @@ -256,7 +256,7 @@ public enum EffectType
PitDeath,

/// <summary>
/// <see cref="CustomPlayerEffects.Blurred"/>.
/// Blurs the player's screen.
/// </summary>
Blurred,
}
Expand Down
4 changes: 2 additions & 2 deletions EXILED/Exiled.API/Extensions/EffectTypeExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static class EffectTypeExtension
{ EffectType.AmnesiaVision, typeof(AmnesiaVision) },
{ EffectType.Asphyxiated, typeof(Asphyxiated) },
{ EffectType.Bleeding, typeof(Bleeding) },
{ EffectType.Blinded, typeof(Blindness) },
{ EffectType.Blindness, typeof(Blindness) },
{ EffectType.BodyshotReduction, typeof(BodyshotReduction) },
{ EffectType.Burned, typeof(Burned) },
{ EffectType.CardiacArrest, typeof(CardiacArrest) },
Expand Down Expand Up @@ -159,7 +159,7 @@ or EffectType.Corroding or EffectType.Decontaminating or EffectType.Hemorrhage o
/// <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.AmnesiaVision or EffectType.Blindness 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;

Expand Down
14 changes: 7 additions & 7 deletions EXILED/Exiled.API/Features/Items/FlashGrenade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public float MinimalDurationEffect
}

/// <summary>
/// Gets or sets the additional duration of the <see cref="EffectType.Blinded"/> effect.
/// Gets or sets the additional duration of the <see cref="EffectType.Blurred"/> effect.
/// </summary>
public float AdditionalBlindedEffect
public float AdditionalBlurredEffect
{
get => Projectile.AdditionalBlindedEffect;
set => Projectile.AdditionalBlindedEffect = value;
get => Projectile.AdditionalBlurredEffect;
set => Projectile.AdditionalBlurredEffect = value;
}

/// <summary>
Expand Down Expand Up @@ -105,7 +105,7 @@ public FlashbangProjectile SpawnActive(Vector3 position, Player owner = null)
grenade.Base.gameObject.SetActive(true);

grenade.MinimalDurationEffect = MinimalDurationEffect;
grenade.AdditionalBlindedEffect = AdditionalBlindedEffect;
grenade.AdditionalBlurredEffect = AdditionalBlurredEffect;
grenade.SurfaceDistanceIntensifier = SurfaceDistanceIntensifier;
grenade.FuseTime = FuseTime;

Expand All @@ -125,7 +125,7 @@ public FlashbangProjectile SpawnActive(Vector3 position, Player owner = null)
public override Item Clone() => new FlashGrenade()
{
MinimalDurationEffect = MinimalDurationEffect,
AdditionalBlindedEffect = AdditionalBlindedEffect,
AdditionalBlurredEffect = AdditionalBlurredEffect,
SurfaceDistanceIntensifier = SurfaceDistanceIntensifier,
FuseTime = FuseTime,
Repickable = Repickable,
Expand All @@ -145,7 +145,7 @@ internal override void ReadPickupInfo(Pickup pickup)
if (pickup is FlashGrenadePickup flashGrenadePickup)
{
MinimalDurationEffect = flashGrenadePickup.MinimalDurationEffect;
AdditionalBlindedEffect = flashGrenadePickup.AdditionalBlindedEffect;
AdditionalBlurredEffect = flashGrenadePickup.AdditionalBlurredEffect;
SurfaceDistanceIntensifier = flashGrenadePickup.SurfaceDistanceIntensifier;
FuseTime = flashGrenadePickup.FuseTime;
}
Expand Down
10 changes: 5 additions & 5 deletions EXILED/Exiled.API/Features/Pickups/FlashGrenadePickup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ internal FlashGrenadePickup()
public float MinimalDurationEffect { get; set; }

/// <summary>
/// Gets or sets the additional duration of the <see cref="EffectType.Blinded"/> effect.
/// Gets or sets the additional duration of the <see cref="EffectType.Blurred"/> effect.
/// </summary>
public float AdditionalBlindedEffect { get; set; }
public float AdditionalBlurredEffect { get; set; }

/// <summary>
/// Gets or sets the how mush the flash grenade going to be intensified when explode at <see cref="RoomType.Surface"/>.
Expand All @@ -58,7 +58,7 @@ internal override void ReadItemInfo(Item item)
if (item is FlashGrenade flashGrenadeitem)
{
MinimalDurationEffect = flashGrenadeitem.MinimalDurationEffect;
AdditionalBlindedEffect = flashGrenadeitem.AdditionalBlindedEffect;
AdditionalBlurredEffect = flashGrenadeitem.AdditionalBlurredEffect;
SurfaceDistanceIntensifier = flashGrenadeitem.SurfaceDistanceIntensifier;
FuseTime = flashGrenadeitem.FuseTime;
}
Expand All @@ -70,7 +70,7 @@ internal override void WriteProjectileInfo(Projectile projectile)
if (projectile is FlashbangProjectile flashbangProjectile)
{
flashbangProjectile.MinimalDurationEffect = MinimalDurationEffect;
flashbangProjectile.AdditionalBlindedEffect = AdditionalBlindedEffect;
flashbangProjectile.AdditionalBlurredEffect = AdditionalBlurredEffect;
flashbangProjectile.SurfaceDistanceIntensifier = SurfaceDistanceIntensifier;
flashbangProjectile.FuseTime = FuseTime;
}
Expand All @@ -83,7 +83,7 @@ protected override void InitializeProperties(ItemBase itemBase)
if (itemBase is ThrowableItem throwable && throwable.Projectile is FlashbangGrenade flashGrenade)
{
MinimalDurationEffect = flashGrenade._minimalEffectDuration;
AdditionalBlindedEffect = flashGrenade._additionalBlurDuration;
AdditionalBlurredEffect = flashGrenade._additionalBlurDuration;
SurfaceDistanceIntensifier = flashGrenade._surfaceZoneDistanceIntensifier;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public float MinimalDurationEffect
}

/// <summary>
/// Gets or sets the additional duration of the <see cref="EffectType.Blinded"/> effect.
/// Gets or sets the additional duration of the <see cref="EffectType.Blurred"/> effect.
/// </summary>
public float AdditionalBlindedEffect
public float AdditionalBlurredEffect
{
get => Base._additionalBlurDuration;
set => Base._additionalBlurDuration = value;
Expand Down
Loading