Skip to content
4 changes: 2 additions & 2 deletions EXILED/Exiled.API/Enums/DoorType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Exiled.API.Enums
{
using Exiled.API.Features.Doors;
using Features.Doors;
using Interactables.Interobjects;

/// <summary>
Expand Down Expand Up @@ -273,7 +273,7 @@ public enum DoorType
ElevatorGateB,

/// <summary>
/// Represents the Elevator door for <see cref="ElevatorGroup.Nuke01"/>.
/// Represents the Elevator door for <see cref="ElevatorGroup.Nuke01"/> and <see cref="ElevatorGroup.Nuke02"/>.
/// </summary>
ElevatorNuke,

Expand Down
4 changes: 0 additions & 4 deletions EXILED/Exiled.API/Enums/RespawnEffectType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@

namespace Exiled.API.Enums
{
using Features;

using PlayerRoles;

/// <summary>
/// Layers game respawn effects.
/// </summary>
Expand Down
3 changes: 1 addition & 2 deletions EXILED/Exiled.API/Features/Doors/ElevatorDoor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ namespace Exiled.API.Features.Doors
using System.Collections.Generic;
using System.Linq;

using Exiled.API.Enums;
using Enums;
using Interactables.Interobjects;
using Interactables.Interobjects.DoorUtils;
using UnityEngine;

/// <summary>
Expand Down
12 changes: 3 additions & 9 deletions EXILED/Exiled.API/Features/Items/Firearm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,18 @@ namespace Exiled.API.Features.Items

using CameraShaking;
using Enums;
using Exiled.API.Features.Pickups;
using Exiled.API.Interfaces;
using Exiled.API.Structs;
using Extensions;
using InventorySystem;
using InventorySystem.Items;
using InventorySystem.Items.Firearms;
using Interfaces;
using InventorySystem.Items.Firearms.Attachments;
using InventorySystem.Items.Firearms.Attachments.Components;
using InventorySystem.Items.Firearms.BasicMessages;
using InventorySystem.Items.Firearms.Modules;
using InventorySystem.Items.Pickups;
using MEC;
using Pickups;
using Structs;
using UnityEngine;

using BaseFirearm = InventorySystem.Items.Firearms.Firearm;
using FirearmPickup = Pickups.FirearmPickup;
using Object = UnityEngine.Object;

/// <summary>
/// A wrapper class for <see cref="InventorySystem.Items.Firearms.Firearm"/>.
Expand Down
4 changes: 1 addition & 3 deletions EXILED/Exiled.API/Features/Items/Flashlight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

namespace Exiled.API.Features.Items
{
using System;

using Exiled.API.Interfaces;
using Interfaces;
using InventorySystem.Items.ToggleableLights;
using InventorySystem.Items.ToggleableLights.Flashlight;
using InventorySystem.Items.ToggleableLights.Lantern;
Expand Down
18 changes: 10 additions & 8 deletions EXILED/Exiled.API/Features/Npc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ namespace Exiled.API.Features

using CentralAuth;
using CommandSystem;
using Exiled.API.Enums;
using Exiled.API.Features.Components;
using Exiled.API.Features.Roles;
using Components;
using Enums;
using Footprinting;
using GameCore;
using MEC;
using Mirror;
using PlayerRoles;
using Roles;
using UnityEngine;

using Object = UnityEngine.Object;
Expand Down Expand Up @@ -133,13 +133,15 @@ public override Vector3 Position
/// <returns>The NPC associated with the NetworkConnection, or <c>null</c> if not found.</returns>
public static new Npc? Get(NetworkConnection conn) => Player.Get(conn) as Npc;

// TODO: Write docs.

/// <summary>
/// Docs.
/// to be filled.
/// </summary>
/// <param name="name">Docs1.</param>
/// <param name="role">Docs2.</param>
/// <param name="position">Docs3.</param>
/// <returns>Docs4.</returns>
/// <param name="name">to be filled..</param>
/// <param name="role">to be filled...</param>
/// <param name="position">to be filled....</param>
/// <returns>to be filled.....</returns>
public static Npc Create(string name, RoleTypeId role, Vector3 position)
{
// TODO: Test this.
Expand Down
12 changes: 4 additions & 8 deletions EXILED/Exiled.API/Features/Pickups/Pickup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,19 @@

namespace Exiled.API.Features.Pickups
{
using System;
using System.Collections.Generic;
using System.Linq;

using Exiled.API.Extensions;
using Exiled.API.Features.Core;
using Exiled.API.Features.Pickups.Projectiles;
using Exiled.API.Interfaces;

using Core;
using Extensions;
using Interfaces;
using InventorySystem;
using InventorySystem.Items;
using InventorySystem.Items.Pickups;
using InventorySystem.Items.ThrowableProjectiles;
using InventorySystem.Items.Usables.Scp244;

using Mirror;
using Projectiles;
using RelativePositioning;
using UnityEngine;

Expand All @@ -37,7 +34,6 @@ namespace Exiled.API.Features.Pickups
using BaseScp1576Pickup = InventorySystem.Items.Usables.Scp1576.Scp1576Pickup;
using BaseScp2176Projectile = InventorySystem.Items.ThrowableProjectiles.Scp2176Projectile;
using BaseScp330Pickup = InventorySystem.Items.Usables.Scp330.Scp330Pickup;

using Object = UnityEngine.Object;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@

namespace Exiled.API.Features.Pickups.Projectiles
{
using System;
using System.Reflection;

using Exiled.API.Interfaces;
using HarmonyLib;

using Interfaces;
using InventorySystem.Items.ThrowableProjectiles;

using BaseScp018Projectile = InventorySystem.Items.ThrowableProjectiles.Scp018Projectile;
Expand Down
16 changes: 8 additions & 8 deletions EXILED/Exiled.API/Features/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,16 @@ namespace Exiled.API.Features
using CustomPlayerEffects;
using CustomPlayerEffects.Danger;
using DamageHandlers;
using Doors;
using Enums;
using Exiled.API.Features.Core.Interfaces;
using Exiled.API.Features.Doors;
using Exiled.API.Features.Hazards;
using Exiled.API.Features.Items;
using Exiled.API.Features.Pickups;
using Exiled.API.Features.Pools;
using Exiled.API.Features.Roles;
using Exiled.API.Interfaces;
using Exiled.API.Structs;
using Extensions;
using Footprinting;
using global::Scp914;
using Hazards;
using Hints;
using Interactables.Interobjects;
using Interfaces;
using InventorySystem;
using InventorySystem.Disarming;
using InventorySystem.Items;
Expand All @@ -41,21 +36,26 @@ namespace Exiled.API.Features
using InventorySystem.Items.Firearms.ShotEvents;
using InventorySystem.Items.Usables;
using InventorySystem.Items.Usables.Scp330;
using Items;
using MapGeneration.Distributors;
using MEC;
using Mirror;
using Mirror.LiteNetLib4Mirror;
using Pickups;
using PlayerRoles;
using PlayerRoles.FirstPersonControl;
using PlayerRoles.RoleAssign;
using PlayerRoles.Spectating;
using PlayerRoles.Voice;
using PlayerStatsSystem;
using PluginAPI.Core;
using Pools;
using RelativePositioning;
using RemoteAdmin;
using Respawning.NamingRules;
using Roles;
using RoundRestarting;
using Structs;
using UnityEngine;
using Utils;
using Utils.Networking;
Expand Down
30 changes: 19 additions & 11 deletions EXILED/Exiled.API/Features/Respawn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,25 +181,31 @@ public static bool TryGetWaveBase(SpawnableFaction faction, out SpawnableWaveBas
return false;
}

// TODO: Write docs.

/// <summary>
/// Docs.
/// to be filled.
/// </summary>
/// <param name="faction">Docs1.</param>
/// <param name="time">Docs2.</param>
/// <param name="faction">to be filled..</param>
/// <param name="time">to be filled...</param>
public static void AdvanceTime(Faction faction, float time) => WaveManager.AdvanceTimer(faction, time);

// TODO: Write docs.

/// <summary>
/// Docs.
/// to be filled.
/// </summary>
/// <param name="wave">Docs1.</param>
/// <param name="wave">to be filled..</param>
public static void SpawnWave(SpawnableWaveBase wave) => WaveManager.Spawn(wave);

// TODO: Write docs.

/// <summary>
/// Docs.
/// to be filled.
/// </summary>
/// <param name="faction">Docs1.</param>
/// <param name="mini">Docs2.</param>
/// <typeparam name="T">Docs3.</typeparam>
/// <param name="faction">to be filled..</param>
/// <param name="mini">to be filled...</param>
/// <typeparam name="T">to be filled....</typeparam>
public static void SpawnWave<T>(Faction faction, bool mini)
where T : SpawnableWaveBase
{
Expand Down Expand Up @@ -290,10 +296,12 @@ public static void ForceWave(Faction team)
ForceWave(wave);
}

// TODO: Write docs.

/// <summary>
/// Docs.
/// to be filled.
/// </summary>
/// <param name="wave">Docs1.</param>
/// <param name="wave">to be filled....</param>
public static void ForceWave(SpawnableWaveBase wave)
{
WaveManager.Spawn(wave);
Expand Down
12 changes: 6 additions & 6 deletions EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ public class RespawningTeamEventArgs : IDeniableEvent
/// <param name="maxRespawn">
/// <inheritdoc cref="MaximumRespawnAmount" />
/// </param>
/// <param name="nextKnownTeam">
/// <inheritdoc cref="NextKnownTeam" />
/// <param name="respawningTeam">
/// <inheritdoc cref="RespawningTeam" />
/// </param>
/// <param name="isAllowed">
/// <inheritdoc cref="IsAllowed" />
/// </param>
public RespawningTeamEventArgs(List<Player> players, Queue<RoleTypeId> queue, int maxRespawn, SpawnableWaveBase nextKnownTeam, bool isAllowed = true)
public RespawningTeamEventArgs(List<Player> players, Queue<RoleTypeId> queue, int maxRespawn, SpawnableWaveBase respawningTeam, bool isAllowed = true)
{
Players = players;
MaximumRespawnAmount = maxRespawn;
SpawnQueue = queue;
NextKnownTeam = nextKnownTeam;
RespawningTeam = respawningTeam;
IsAllowed = isAllowed;
}

Expand Down Expand Up @@ -74,9 +74,9 @@ public int MaximumRespawnAmount
}

/// <summary>
/// Gets or sets a value indicating what the next respawnable team is.
/// Gets or sets a value indicating what the currently respawning team is.
/// </summary>
public SpawnableWaveBase NextKnownTeam { get; set; }
public SpawnableWaveBase RespawningTeam { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the spawn can occur.
Expand Down
15 changes: 12 additions & 3 deletions EXILED/Exiled.Events/Patches/Events/Scp049/FinishingRecall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
namespace Exiled.Events.Patches.Events.Scp049
{
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Reflection.Emit;

using API.Features;
using API.Features.Pools;
using Exiled.Events.Attributes;
using Exiled.Events.EventArgs.Scp049;

using HarmonyLib;

using PlayerRoles.PlayableScps.Scp049;
using PlayerRoles.Subroutines;

Expand All @@ -30,7 +29,8 @@ namespace Exiled.Events.Patches.Events.Scp049
[HarmonyPatch(typeof(Scp049ResurrectAbility), nameof(Scp049ResurrectAbility.ServerComplete))]
internal static class FinishingRecall
{
private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
// TODO: fix
/*private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
List<CodeInstruction> newInstructions = ListPool<CodeInstruction>.Pool.Get(instructions);

Expand Down Expand Up @@ -78,6 +78,15 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
yield return newInstructions[z];

ListPool<CodeInstruction>.Pool.Return(newInstructions);
}*/

[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1313:Parameter names should begin with lower-case letter", Justification = "Prefix")]
private static bool Prefix(Scp049ResurrectAbility __instance)
{
FinishingRecallEventArgs ev = new(Player.Get(__instance.CurRagdoll.Info.OwnerHub), Player.Get(__instance.Owner), __instance.CurRagdoll);
Handlers.Scp049.OnFinishingRecall(ev);

return ev.IsAllowed;
}
}
}
Loading