public override void Destroy(DestroyMode mode = DestroyMode.Vanish)
{
base.Destroy();
if (mode == DestroyMode.Deconstruct)
{
List<ThingCount> costList = this.def.costList;
foreach (ThingCount cost in costList)
{
Thing deconstructedResource = ThingMaker.MakeThing(cost.thingDef);
deconstructedResource.stackCount = cost.count;
GenSpawn.Spawn(deconstructedResource, this.Position);
}
}
numberOfAlertSpeakers--;
if (numberOfAlertSpeakers == 0)
{
RemoveAnyStatBonusFromAllColonists();
RemoveAnyStatMalusFromAllColonists();
RemoveAnyThoughtBonusFromAllColonists();
RemoveAnyThoughtMalusFromAllColonists();
}
}