private void ProcessNewPickups() { SkylinesOverwatch.Data data = SkylinesOverwatch.Data.Instance; foreach (ushort pickup in data.BuildingsUpdated) { if (data.IsLandfillSite(pickup)) { continue; } if (data.IsBuildingWithGarbage(pickup)) { foreach (ushort id in _landfills.Keys) { _landfills[id].AddPickup(pickup); } } else { foreach (ushort id in _landfills.Keys) { _landfills[id].AddCheckup(pickup); } } } }
private void ProcessIdleGarbageTrucks() { SkylinesOverwatch.Data data = SkylinesOverwatch.Data.Instance; foreach (ushort x in data.BuildingsUpdated) { if (!data.IsLandfillSite(x)) { continue; } if (!_landfills.ContainsKey(x)) { continue; } _landfills[x].DispatchIdleVehicle(); } }
private void ProcessNewLandfills() { SkylinesOverwatch.Data data = SkylinesOverwatch.Data.Instance; foreach (ushort x in data.BuildingsUpdated) { if (!data.IsLandfillSite(x)) { continue; } if (_landfills.ContainsKey(x)) { continue; } _landfills.Add(x, new Landfill(x, ref _master, ref _oldtargets, ref _lastchangetimes)); foreach (ushort pickup in data.BuildingsWithGarbage) { _landfills[x].AddPickup(pickup); } } }