Skip to content
Merged
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
20 changes: 20 additions & 0 deletions LabApiExtensions/Configs/EffectConfig.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
namespace LabApiExtensions.Configs;

/// <summary>
/// Easy access for effect related methods.
/// </summary>
public sealed class EffectConfig
{
/// <summary>
/// The name of the effect.
/// </summary>
public string EffectName { get; set; }

/// <summary>
/// The duration of the effect.
/// </summary>
public float Duration { get; set; }

/// <summary>
/// The intensity of the effect.
/// </summary>
public byte Intensity { get; set; }

/// <inheritdoc cref="EffectConfig"/>
public EffectConfig() { }

/// <inheritdoc cref="EffectConfig"/>
/// <param name="effectName">The effect name.</param>
/// <param name="intensity">The effect intensity.</param>
/// <param name="duration">The effect duration.</param>
public EffectConfig(string effectName, byte intensity = 1, float duration = 0f)
{
EffectName = effectName;
Expand Down
87 changes: 87 additions & 0 deletions LabApiExtensions/Configs/MathValues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,74 +2,161 @@

namespace LabApiExtensions.Configs;

/// <summary>
/// Option to specify math operation and value for it.
/// </summary>
public sealed class MathValueDouble
{
/// <summary>
/// The value to apply with the math operation.
/// </summary>
public double Value { get; set; }

/// <summary>
/// Gets or sets the mathematical options to use for calculations.
/// </summary>
public MathOption Math { get; set; }

/// <summary>
/// Initializes a new instance of the MathValueDouble class.
/// </summary>
public MathValueDouble() { }

/// <summary>
/// Initializes a new instance of the MathValueDouble class with the specified mathematical operation and value.
/// </summary>
/// <param name="math">The mathematical operation to associate with the value.</param>
/// <param name="value">The numeric value to be used with the specified mathematical operation.</param>
public MathValueDouble(MathOption math, double value)
{
Math = math;
Value = value;
}
}

/// <inheritdoc cref="MathValueDouble"/>
public sealed class MathValueFloat
{
/// <inheritdoc cref="MathValueDouble.Value"/>
public float Value { get; set; }

/// <inheritdoc cref="MathValueDouble.Math"/>
public MathOption Math { get; set; }

/// <summary>
/// Initializes a new instance of the MathValueFloat class.
/// </summary>
public MathValueFloat() { }

/// <summary>
/// Initializes a new instance of the MathValueFloat class with the specified mathematical operation and value.
/// </summary>
/// <param name="math">The mathematical operation to associate with the value.</param>
/// <param name="value">The numeric value to be used with the specified mathematical operation.</param>
public MathValueFloat(MathOption math, float value)
{
Math = math;
Value = value;
}
}

/// <inheritdoc cref="MathValueDouble"/>
public sealed class MathValueLong
{
/// <inheritdoc cref="MathValueDouble.Value"/>
public long Value { get; set; }

/// <inheritdoc cref="MathValueDouble.Math"/>
public MathOption Math { get; set; }

/// <summary>
/// Initializes a new instance of the MathValueLong class.
/// </summary>
public MathValueLong() { }

/// <summary>
/// Initializes a new instance of the MathValueLong class with the specified mathematical operation and value.
/// </summary>
/// <param name="math">The mathematical operation to associate with the value.</param>
/// <param name="value">The numeric value to be used with the specified mathematical operation.</param>
public MathValueLong(MathOption math, long value)
{
Math = math;
Value = value;
}
}

/// <inheritdoc cref="MathValueDouble"/>
public sealed class MathValueInt
{
/// <inheritdoc cref="MathValueDouble.Value"/>
public int Value { get; set; }

/// <inheritdoc cref="MathValueDouble.Math"/>
public MathOption Math { get; set; }

/// <summary>
/// Initializes a new instance of the MathValueInt class.
/// </summary>
public MathValueInt() { }

/// <summary>
/// Initializes a new instance of the MathValueInt class with the specified mathematical operation and value.
/// </summary>
/// <param name="math">The mathematical operation to associate with the value.</param>
/// <param name="value">The numeric value to be used with the specified mathematical operation.</param>
public MathValueInt(MathOption math, int value)
{
Math = math;
Value = value;
}
}

/// <inheritdoc cref="MathValueDouble"/>
public sealed class MathValueShort
{
/// <inheritdoc cref="MathValueDouble.Value"/>
public short Value { get; set; }

/// <inheritdoc cref="MathValueDouble.Math"/>
public MathOption Math { get; set; }

/// <summary>
/// Initializes a new instance of the MathValueShort class.
/// </summary>
public MathValueShort() { }

/// <summary>
/// Initializes a new instance of the MathValueShort class with the specified mathematical operation and value.
/// </summary>
/// <param name="math">The mathematical operation to associate with the value.</param>
/// <param name="value">The numeric value to be used with the specified mathematical operation.</param>
public MathValueShort(MathOption math, short value)
{
Math = math;
Value = value;
}
}

/// <inheritdoc cref="MathValueDouble"/>
public sealed class MathValueByte
{
/// <inheritdoc cref="MathValueDouble.Value"/>
public byte Value { get; set; }

/// <inheritdoc cref="MathValueDouble.Math"/>
public MathOption Math { get; set; }

/// <summary>
/// Initializes a new instance of the MathValueByte class.
/// </summary>
public MathValueByte() { }

/// <summary>
/// Initializes a new instance of the MathValueByte class with the specified mathematical operation and value.
/// </summary>
/// <param name="math">The mathematical operation to associate with the value.</param>
/// <param name="value">The numeric value to be used with the specified mathematical operation.</param>
public MathValueByte(MathOption math, byte value)
{
Math = math;
Expand Down
6 changes: 6 additions & 0 deletions LabApiExtensions/Enums/DamageSubType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@

namespace LabApiExtensions.Enums;

/// <summary>
/// Represent a subtype of Damages.
/// </summary>
public enum DamageSubType
{
/// <summary>
/// No damage subtype.
/// </summary>
None = 0,
/// <summary>
/// Check <see cref="DamageUniversalType"/>.
Expand Down
78 changes: 78 additions & 0 deletions LabApiExtensions/Enums/DamageType.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,107 @@
namespace LabApiExtensions.Enums;

/// <summary>
/// Damage types until NW adds into BaseGame/LabApi.
/// </summary>
public enum DamageType
{
/// <summary>
/// Not a real Damage type. Use for 3rd party damage related stuff.
/// </summary>
Any = -1,
/// <summary>
/// No damage found.
/// </summary>
None = 0,
/// <summary>
/// Damage done by recontainment.
/// </summary>
Recontainment,
/// <summary>
/// Damage done by a firearm.
/// </summary>
Firearm,
/// <summary>
/// Damage done by warhead.
/// </summary>
Warhead,
/// <summary>
/// Damage done by <see cref="DamageUniversalType"/>.
/// </summary>
Universal,
/// <summary>
/// Damage done by an SCP.
/// </summary>
Scp,
/// <summary>
/// Damage done by Scp-096.
/// </summary>
Scp096,
/// <summary>
/// Damage done by Scp-049.
/// </summary>
Scp049,
/// <summary>
/// Damage done by MicroHID.
/// </summary>
MicroHid,
/// <summary>
/// Damage is by a custom reason.
/// </summary>
Custom,
/// <summary>
/// Damage done by an explosion.
/// </summary>
Explosion,
/// <summary>
/// Damage done by Scp-018.
/// </summary>
Scp018,
/// <summary>
/// Damage done by a distruptor.
/// </summary>
Disruptor,
/// <summary>
/// Damage done by a jailbird.
/// </summary>
Jailbird,
/// <summary>
/// Damage done by Scp-939.
/// </summary>
Scp939,
/// <summary>
/// Damage done by Scp-3114.
/// </summary>
Scp3114,
/// <summary>
/// Damage done by Scp-1507.
/// </summary>
Scp1507,
/// <summary>
/// Damage done by Scp-956.
/// </summary>
Scp956,
/// <summary>
/// Damage done by a snowball.
/// </summary>
Snowball,
/// <summary>
/// Damage done by Scp-173.
/// </summary>
Scp173,
/// <summary>
/// Damage is silent.
/// </summary>
/// <remarks>
/// No items or ragdoll will spawn.
/// </remarks>
Silent,
/// <summary>
/// Damage done by Scp-1509.
/// </summary>
Scp1509,
/// <summary>
/// Damage done by a gray candy.
/// </summary>
GrayCandy,
}
6 changes: 6 additions & 0 deletions LabApiExtensions/Enums/DamageUniversalType.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
namespace LabApiExtensions.Enums;

/// <summary>
/// Universal damage type.
/// </summary>
public enum DamageUniversalType : byte
{
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
Recontained,
Warhead,
Scp049,
Expand Down Expand Up @@ -33,5 +37,7 @@ public enum DamageUniversalType : byte
Scp1344,
Scp1507Peck,
Scp127Bullets,
Scp1509,
None = 255,
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
}
18 changes: 18 additions & 0 deletions LabApiExtensions/Enums/ListOperation.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
namespace LabApiExtensions.Enums;

/// <summary>
/// List operation for <see cref="FakeExtension.FakeSyncListExtension"/>.
/// </summary>
public enum ListOperation : byte
{
/// <summary>
/// Add value opertion.
/// </summary>
Add,
/// <summary>
/// Clear list operation.
/// </summary>
Clear,
/// <summary>
/// Insert value operation.
/// </summary>
Insert,
/// <summary>
/// Remove at index operation.
/// </summary>
RemoveAt,
/// <summary>
/// Set value operation.
/// </summary>
Set,
}
Loading
Loading