private void LaunderTagBits() { if (dirtyTagBits) { tagBits.ClearAll(); foreach (Tag tag in tags) { tagBits.SetTag(tag); } dirtyTagBits = false; } }
private void UpdateStorageFetchableBits() { ChoreType storageFetch = Db.Get().ChoreTypes.StorageFetch; ChoreType foodFetch = Db.Get().ChoreTypes.FoodFetch; storageFetchableBits.ClearAll(); foreach (FetchChore fetchChore in fetchChores) { if ((fetchChore.choreType == storageFetch || fetchChore.choreType == foodFetch) && (bool)fetchChore.destination) { int cell = Grid.PosToCell(fetchChore.destination); if (MinionGroupProber.Get().IsReachable(cell, fetchChore.destination.GetOffsets(cell))) { storageFetchableBits.Or(ref fetchChore.tagBits); } } } }