Skip to content
Merged
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
16 changes: 16 additions & 0 deletions EXILED/Exiled.API/Features/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ namespace Exiled.API.Features
using System.Collections.ObjectModel;
using System.Linq;

using CommandSystem.Commands.RemoteAdmin.Cleanup;
using Decals;
using Enums;
using Exiled.API.Extensions;
using Exiled.API.Features.Hazards;
Expand All @@ -27,6 +29,7 @@ namespace Exiled.API.Features
using PlayerRoles.Ragdolls;
using UnityEngine;
using Utils;
using Utils.Networking;

using Object = UnityEngine.Object;

Expand Down Expand Up @@ -271,6 +274,19 @@ public static void CleanAllRagdolls(IEnumerable<Ragdoll> ragDolls)
ragDoll.Destroy();
}

/// <summary>
/// Destroy specified amount of specified <see cref="DecalPoolType"/> object.
/// </summary>
/// <param name="decalType">Decal type to destroy.</param>
/// <param name="amount">Amount of decals to destroy.</param>
public static void Clean(DecalPoolType decalType, int amount) => new DecalCleanupMessage(decalType, amount).SendToAuthenticated();

/// <summary>
/// Destroy all specified <see cref="DecalPoolType"/> objects.
/// </summary>
/// <param name="decalType">Decal type to destroy.</param>
public static void Clean(DecalPoolType decalType) => Clean(decalType, int.MaxValue);

/// <summary>
/// Places a blood decal.
/// </summary>
Expand Down