using SPT.Reflection.Patching;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
namespace SPT.Custom.Patches
{
///
/// This patch prevents the weird pink smoke / flares that are still in the sky the next raid if a player has just extracted
/// while the airplane is dropping a crate
///
public class FixAirdropFlareDisposePatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(GClass2458).GetMethod(nameof(GClass2458.Dispose));
}
[PatchPrefix]
public static void Prefix(Dictionary ___dictionary_0)
{
if (___dictionary_0 == null)
{
return;
}
foreach (KeyValuePair keyValuePair in ___dictionary_0)
{
Object.Destroy(keyValuePair.Key);
}
}
}
}