コード例 #1
0
 public void Merge(MyDestructionDefinition src)
 {
     DestructionDamage = src.DestructionDamage;
     Icon = src.Icon;
     ConvertedFractureIntegrityRatio = src.ConvertedFractureIntegrityRatio;
     FracturedPieceDefinitions = src.FracturedPieceDefinitions;
 }
コード例 #2
0
 public void Merge(MyDestructionDefinition src)
 {
     DestructionDamage = src.DestructionDamage;
     Icons             = src.Icons;
     ConvertedFractureIntegrityRatio = src.ConvertedFractureIntegrityRatio;
     FracturedPieceDefinitions       = src.FracturedPieceDefinitions;
 }
コード例 #3
0
            public void Clear(bool unload = false)
            {
                base.Clear();

                m_cubeSizes         = new float[typeof(MyCubeSize).GetEnumValues().Length];
                m_cubeSizesOriginal = new float[typeof(MyCubeSize).GetEnumValues().Length];
                m_basePrefabNames   = new string[m_cubeSizes.Length * 4]; // Index computed 4 * enumInt + 2*static + creative.

                m_definitionsById = new DefinitionDictionary <MyDefinitionBase>(100);

                m_voxelMaterialsByName   = new Dictionary <string, MyVoxelMaterialDefinition>(10);
                m_voxelMaterialsByIndex  = new Dictionary <byte, MyVoxelMaterialDefinition>(10);
                m_voxelMaterialRareCount = 0;

                m_physicalItemDefinitions = new List <MyPhysicalItemDefinition>(10);

                m_weaponDefinitionsById = new DefinitionDictionary <MyWeaponDefinition>(10);
                m_ammoDefinitionsById   = new DefinitionDictionary <MyAmmoDefinition>(10);

                m_blockPositions         = new Dictionary <string, Vector2I>(10);
                m_uniqueCubeBlocksBySize = new DefinitionDictionary <MyCubeBlockDefinition> [m_cubeSizes.Length];
                for (int i = 0; i < m_cubeSizes.Length; ++i)
                {
                    m_uniqueCubeBlocksBySize[i] = new DefinitionDictionary <MyCubeBlockDefinition>(10);
                }

                m_blueprintsById = new DefinitionDictionary <MyBlueprintDefinitionBase>(10);

                m_spawnGroupDefinitions = new List <MySpawnGroupDefinition>(10);

                m_containerTypeDefinitions = new DefinitionDictionary <MyContainerTypeDefinition>(10);

                m_handItemsById             = new DefinitionDictionary <MyHandItemDefinition>(10);
                m_physicalItemsByHandItemId = new DefinitionDictionary <MyPhysicalItemDefinition>(m_handItemsById.Count);
                m_handItemsByPhysicalItemId = new DefinitionDictionary <MyHandItemDefinition>(m_handItemsById.Count);

                m_scenarioDefinitions      = new List <MyScenarioDefinition>(10);
                m_characters               = new Dictionary <string, MyCharacterDefinition>();
                m_animationsBySkeletonType = new Dictionary <string, Dictionary <string, MyAnimationDefinition> >();

                m_blueprintClasses      = new DefinitionDictionary <MyBlueprintClassDefinition>(10);
                m_blueprintClassEntries = new HashSet <BlueprintClassEntry>();
                m_blueprintsByResultId  = new DefinitionDictionary <MyBlueprintDefinitionBase>(10);

                m_environmentItemsEntries = new HashSet <EnvironmentItemsEntry>();
                m_componentBlockEntries   = new HashSet <MyComponentBlockEntry>();

                m_componentBlocks    = new HashSet <MyDefinitionId>(MyDefinitionId.Comparer);
                m_componentIdToBlock = new Dictionary <MyDefinitionId, MyCubeBlockDefinition>(MyDefinitionId.Comparer);

                m_categoryClasses = new List <MyGuiBlockCategoryDefinition>(25);
                m_categories      = new Dictionary <string, MyGuiBlockCategoryDefinition>(25);

                m_prefabs      = new Dictionary <string, MyPrefabDefinition>();
                m_respawnShips = new Dictionary <string, MyRespawnShipDefinition>();

                m_sounds = new DefinitionDictionary <MyAudioDefinition>(10);

                m_shipSounds       = new DefinitionDictionary <MyShipSoundsDefinition>(10);                m_behaviorDefinitions = new DefinitionDictionary <MyBehaviorDefinition>(10);
                m_voxelMapStorages = new Dictionary <string, MyVoxelMapStorageDefinition>(64);
                m_characterNames   = new List <MyCharacterName>(32);

                m_battleDefinition = new MyBattleDefinition();

                m_planetGeneratorDefinitions = new DefinitionDictionary <MyPlanetGeneratorDefinition>(5);

                m_componentGroups       = new DefinitionDictionary <MyComponentGroupDefinition>(4);
                m_componentGroupMembers = new Dictionary <MyDefinitionId, MyTuple <int, MyComponentGroupDefinition> >();

                m_planetPrefabDefinitions = new DefinitionDictionary <MyPlanetPrefabDefinition>(5);

                m_groupedIds = new Dictionary <string, Dictionary <string, MyGroupedIds> >();

                m_scriptedGroupDefinitions = new DefinitionDictionary <MyScriptedGroupDefinition>(10);
                m_pirateAntennaDefinitions = new DefinitionDictionary <MyPirateAntennaDefinition>(4);

                m_componentSubstitutions = new Dictionary <MyDefinitionId, MyComponentSubstitutionDefinition>();

                m_destructionDefinition = new MyDestructionDefinition();

                m_mapMultiBlockDefToCubeBlockDef = new Dictionary <string, MyCubeBlockDefinition>();
                m_factionDefinitionsByTag.Clear();

                m_idToRope = new Dictionary <MyDefinitionId, MyRopeDefinition>(MyDefinitionId.Comparer);

                m_gridCreateDefinitions = new DefinitionDictionary <MyGridCreateToolDefinition>(3);

                m_entityComponentDefinitions = new DefinitionDictionary <MyComponentDefinitionBase>(10);
                m_entityContainers           = new DefinitionDictionary <MyContainerDefinition>(10);
                if (unload)
                {
                    m_physicalMaterialsByName = new Dictionary <string, MyPhysicalMaterialDefinition>();
                }

                m_lootBagDefinition = null;
            }
コード例 #4
0
 public void Merge(MyDestructionDefinition src)
 {
     DestructionDamage = src.DestructionDamage;
     Icon = src.Icon;
 }