public static void MergeInto(this DropTableListConfigurationFile source, DropTableListConfigurationFile target)
        {
            foreach (var sourceMob in source.Subsections)
            {
                if (target.Subsections.ContainsKey(sourceMob.Key))
                {
                    var targetMob = target.Subsections[sourceMob.Key];

                    foreach (var sourceItem in sourceMob.Value.Subsections)
                    {
                        if (!sourceItem.Value.EnableConfig)
                        {
                            continue;
                        }

                        if (targetMob.Subsections.ContainsKey(sourceItem.Key))
                        {
                            Log.LogWarning($"Overlapping drop configs for {sourceItem.Value.SectionKey}, overriding existing.");
                        }

                        targetMob.Subsections[sourceItem.Key] = sourceItem.Value;
                    }
                }
                else
                {
                    target.Subsections[sourceMob.Key] = sourceMob.Value;
                }
            }
        }
Ejemplo n.º 2
0
        protected override void BeforePack()
        {
            DropTableConfigs = ConfigurationManager.DropTableConfigs;
            DropTableLists   = ConfigurationManager.DropTableLists;

            Log.LogDebug($"Packaged DropTable configurations: {ConfigurationManager.DropTableConfigs?.Subsections?.Count ?? 0}");
            Log.LogDebug($"Packaged DropTable lists: {ConfigurationManager.DropTableLists?.Subsections?.Count ?? 0}");
        }