コード例 #1
0
        private void filterExcludedDecorations()
        {
            if (!(decorationExclusionGroup != null))
            {
                return;
            }
            List <StaticGameDataDefinitionKey> keys = GroupDefinitionHelper.GetKeys <DecorationDefinition>(decorationExclusionGroup);
            int result;

            foreach (StaticGameDataDefinitionKey item in keys)
            {
                if (int.TryParse(item.Id, out result) && decorationDefinitions.ContainsKey(result))
                {
                    decorationDefinitions.Remove(result);
                }
            }
            keys = GroupDefinitionHelper.GetKeys <StructureDefinition>(decorationExclusionGroup);
            foreach (StaticGameDataDefinitionKey item2 in keys)
            {
                if (int.TryParse(item2.Id, out result) && structureDefinitions.ContainsKey(result))
                {
                    structureDefinitions.Remove(result);
                }
            }
        }
コード例 #2
0
        private List <StaticGameDataDefinition> filterStructureListByTheme(GroupDefinition themeDefinition)
        {
            List <StaticGameDataDefinition> list = new List <StaticGameDataDefinition>();

            foreach (StaticGameDataDefinitionKey key in GroupDefinitionHelper.GetKeys <StructureDefinition>(themeDefinition))
            {
                if (int.TryParse(key.Id, out var result) && structureDefinitions.ContainsKey(result))
                {
                    list.Add(structureDefinitions[result]);
                }
            }
            return(list);
        }