using System; using System.Collections.Generic; using XRL.World; // maybe this is a little extra but whatever namespace AutoDropBedding { public static class Extensions { // todo: find other things that set bedding on fire private static readonly List Firestarters = new List() {"Campfire", "BlueCampfire"}; public static bool HasAnyLiquid(this Cell cell) { foreach (var _ in cell.GetObjects(o => o.HasPart("LiquidVolume"))) return true; return false; } public static bool HasFirestarter(this Cell cell) { foreach (string thing in Firestarters) { if (cell.HasObject(thing)) return true; } return false; } } }