public static bool IsInLocation(Husk husk, LocationType type, out Location location) { location = null; var current = husk.Location.GetLocation(); if (type.HasFlag(current.Type)) { location = current; return(true); } return(false); }