Skip to content

Commit

Permalink
fuck, ill break it
Browse files Browse the repository at this point in the history
  • Loading branch information
IRacle1 committed Jul 20, 2024
1 parent 552f268 commit 27b3bcc
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions EXILED/Exiled.API/Features/Toys/Primitive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ public PrimitiveFlags Flags
set => Base.NetworkPrimitiveFlags = value;
}

/// <summary>
/// Creates a new <see cref="Primitive"/>.
/// </summary>
/// <param name="primitiveType">The type of primitive to spawn.</param>
/// <param name="spawn">Whether or not the <see cref="Primitive"/> should be initially spawned.</param>
/// <returns>The new <see cref="Primitive"/>.</returns>
public static Primitive Create(PrimitiveType primitiveType, bool spawn = true)
=> Create(primitiveType, Vector3.zero, Vector3.zero, Vector3.one, spawn);

/// <summary>
/// Creates a new <see cref="Primitive"/>.
/// </summary>
Expand All @@ -89,32 +98,32 @@ public PrimitiveFlags Flags
/// <param name="scale">The scale of the <see cref="Primitive"/>.</param>
/// <param name="spawn">Whether or not the <see cref="Primitive"/> should be initially spawned.</param>
/// <returns>The new <see cref="Primitive"/>.</returns>
public static Primitive Create(Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true)
=> Create(PrimitiveType.Sphere, ~PrimitiveFlags.None, position ?? Vector3.zero, rotation ?? Vector3.zero, scale ?? Vector3.one, Color.gray, false, spawn);
public static Primitive Create(Vector3 position, Vector3 rotation, Vector3 scale, bool spawn = true)
=> Create(position, rotation, scale, Color.gray, spawn);

/// <summary>
/// Creates a new <see cref="Primitive"/>.
/// </summary>
/// <param name="primitiveType">The type of primitive to spawn.</param>
/// <param name="position">The position of the <see cref="Primitive"/>.</param>
/// <param name="rotation">The rotation of the <see cref="Primitive"/>.</param>
/// <param name="scale">The scale of the <see cref="Primitive"/>.</param>
/// <param name="color">The color of the <see cref="Primitive"/>.</param>
/// <param name="spawn">Whether or not the <see cref="Primitive"/> should be initially spawned.</param>
/// <returns>The new <see cref="Primitive"/>.</returns>
public static Primitive Create(PrimitiveType primitiveType = PrimitiveType.Sphere, Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true)
=> Create(primitiveType, ~PrimitiveFlags.None, position ?? Vector3.zero, rotation ?? Vector3.zero, scale ?? Vector3.one, Color.gray, false, spawn);
public static Primitive Create(Vector3 position, Vector3 rotation, Vector3 scale, Color color, bool spawn = true)
=> Create(PrimitiveType.Sphere, ~PrimitiveFlags.None, position, rotation, scale, color, spawn);

/// <summary>
/// Creates a new <see cref="Primitive"/>.
/// </summary>
/// <param name="primitiveType">The type of primitive to spawn.</param>
/// <param name="position">The position of the <see cref="Primitive"/>.</param>
/// <param name="rotation">The rotation of the <see cref="Primitive"/>.</param>
/// <param name="scale">The scale of the <see cref="Primitive"/>.</param>
/// <param name="spawn">Whether or not the <see cref="Primitive"/> should be initially spawned.</param>
/// <param name="color">The color of the <see cref="Primitive"/>.</param>
/// <returns>The new <see cref="Primitive"/>.</returns>
public static Primitive Create(Vector3? position, Vector3? rotation, Vector3? scale, bool spawn, Color? color)
=> Create(PrimitiveType.Sphere, ~PrimitiveFlags.None, position ?? Vector3.zero, rotation ?? Vector3.zero, scale ?? Vector3.one, color ?? Color.gray, false, spawn);
public static Primitive Create(PrimitiveType primitiveType, Vector3 position, Vector3 rotation, Vector3 scale, bool spawn = true)
=> Create(primitiveType, position, rotation, scale, Color.gray, spawn);

/// <summary>
/// Creates a new <see cref="Primitive"/>.
Expand All @@ -123,11 +132,11 @@ public static Primitive Create(Vector3? position, Vector3? rotation, Vector3? sc
/// <param name="position">The position of the <see cref="Primitive"/>.</param>
/// <param name="rotation">The rotation of the <see cref="Primitive"/>.</param>
/// <param name="scale">The scale of the <see cref="Primitive"/>.</param>
/// <param name="spawn">Whether or not the <see cref="Primitive"/> should be initially spawned.</param>
/// <param name="color">The color of the <see cref="Primitive"/>.</param>
/// <param name="spawn">Whether or not the <see cref="Primitive"/> should be initially spawned.</param>
/// <returns>The new <see cref="Primitive"/>.</returns>
public static Primitive Create(PrimitiveType primitiveType, Vector3? position, Vector3? rotation, Vector3? scale, bool spawn, Color? color)
=> Create(primitiveType, ~PrimitiveFlags.None, position ?? Vector3.zero, rotation ?? Vector3.zero, scale ?? Vector3.one, color ?? Color.gray, false, spawn);
public static Primitive Create(PrimitiveType primitiveType, Vector3 position, Vector3 rotation, Vector3 scale, Color color, bool spawn = true)
=> Create(primitiveType, ~PrimitiveFlags.None, position, rotation, scale, color, spawn);

/// <summary>
/// Creates a new <see cref="Primitive"/>.
Expand All @@ -137,11 +146,11 @@ public static Primitive Create(PrimitiveType primitiveType, Vector3? position, V
/// <param name="position">The position of the <see cref="Primitive"/>.</param>
/// <param name="rotation">The rotation of the <see cref="Primitive"/>.</param>
/// <param name="scale">The scale of the <see cref="Primitive"/>.</param>
/// <param name="spawn">Whether or not the <see cref="Primitive"/> should be initially spawned.</param>
/// <param name="color">The color of the <see cref="Primitive"/>.</param>
/// <param name="spawn">Whether or not the <see cref="Primitive"/> should be initially spawned.</param>
/// <returns>The new <see cref="Primitive"/>.</returns>
public static Primitive Create(PrimitiveType primitiveType, PrimitiveFlags flags, Vector3? position, Vector3? rotation, Vector3? scale, bool spawn, Color? color)
=> Create(primitiveType, flags, position ?? Vector3.zero, rotation ?? Vector3.zero, scale ?? Vector3.one, color ?? Color.gray, false, spawn);
public static Primitive Create(PrimitiveType primitiveType, PrimitiveFlags flags, Vector3 position, Vector3 rotation, Vector3 scale, Color color, bool spawn)
=> Create(primitiveType, flags, position, rotation, scale, color, false, spawn);

/// <summary>
/// Creates a new <see cref="Primitive"/>.
Expand Down

0 comments on commit 27b3bcc

Please sign in to comment.