Skip to content

Commit

Permalink
Remove Commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
louis1706 committed Jan 20, 2025
1 parent e22b4bd commit df80bd4
Showing 1 changed file with 2 additions and 63 deletions.
65 changes: 2 additions & 63 deletions EXILED/Exiled.CustomItems/API/Features/CustomItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -581,71 +581,10 @@ public virtual uint Spawn(IEnumerable<SpawnPoint> spawnPoints, uint limit)

spawned++;

/*if (spawnPoint is DynamicSpawnPoint dynamicSpawnPoint && dynamicSpawnPoint.Location == SpawnLocationType.InsideLocker)
{
for (int i = 0; i < 50; i++)
{
if (Exiled.API.Features.Lockers.Locker.List is null)
{
Log.Debug($"{nameof(Spawn)}: Locker list is null.");
continue;
}
Locker locker = Exiled.API.Features.Lockers.Locker.Random();
if (locker is null)
{
Log.Debug($"{nameof(Spawn)}: Selected locker is null.");
continue;
}
if (locker.Loot is null)
{
Log.Debug($"{nameof(Spawn)}: Invalid locker location. Attempting to find a new one..");
continue;
}
if (locker.Chambers is null)
{
Log.Debug($"{nameof(Spawn)}: Locker chambers is null");
continue;
}
LockerChamber chamber = locker.Chambers[Loader.Random.Next(Mathf.Max(0, locker.Chambers.Length - 1))];
if (chamber is null)
{
Log.Debug($"{nameof(Spawn)}: chamber is null");
continue;
}
Vector3 position = chamber._spawnpoint.transform.position;
Pickup? pickup = Spawn(position, null);
if (pickup?.Base is BaseFirearmPickup firearmPickup && this is CustomWeapon customWeapon)
{
firearmPickup.Status = new FirearmStatus(customWeapon.ClipSize, firearmPickup.Status.Flags, firearmPickup.Status.Attachments);
firearmPickup.NetworkStatus = firearmPickup.Status;
}
Log.Debug($"Spawned {Name} at {position} ({spawnPoint.Name})");
break;
}
}
else
{
Pickup? pickup = Spawn(spawnPoint.Position, null);
if (pickup?.Base is BaseFirearmPickup firearmPickup && this is CustomWeapon customWeapon)
{
firearmPickup.Status = new FirearmStatus(customWeapon.ClipSize, firearmPickup.Status.Flags, firearmPickup.Status.Attachments);
firearmPickup.NetworkStatus = firearmPickup.Status;
}
Log.Debug($"Spawned {Name} at {spawnPoint.Position} ({spawnPoint.Name})");
}*/

Pickup? pickup = Spawn(spawnPoint.Position);

Log.Debug($"Spawned {Name} at {spawnPoint.Position} ({spawnPoint.Name})");

if (pickup == null)
continue;

Expand Down

0 comments on commit df80bd4

Please sign in to comment.