private static void ApplyFilters(NetFilterMappings mappings) { if (mappings == null || mappings.Mappings == null) { return; } uint[] itemNets = FindObjectsOfType <ItemNet>().Select(p => p.itemCollector.ObjectIndex).ToArray(); foreach (var mapping in mappings.Mappings) { if (itemNets.Contains(mapping.NetId)) { if (m_netSetup.ContainsKey(mapping.NetId)) { m_netSetup[mapping.NetId] = mapping.ActiveNetFilter; } else { m_netSetup.Add(mapping.NetId, mapping.ActiveNetFilter); } } } }
public MessageSyncNetFilters(Messages type, NetFilterMappings mappings) : base(type) { Mappings = mappings; }