Beispiel #1
0
        private void RemoveAllOverlays(bool removeAdditional)
        {
            OverlayStorage.Clear();

            if (removeAdditional)
            {
                AdditionalTextures.Clear();
            }
        }
Beispiel #2
0
        /*
         * Méthode générale où tous les modèles se génèrent
         */
        public bool GenerateAll()
        {
            if (OutputFolderPath != "" && Modid != "" && ModelsToGenerate.Count > 0)
            {
                foreach (var element in ModelsToGenerate)
                {
                    bool   isValid     = false;
                    string textureName = AdditionalTextures.ContainsKey(element.Key) ? AdditionalTextures[element.Key] : "";
                    switch (element.Value)
                    {
                    case GenerationModes.GENERATED:
                        isValid = GenerateItemGenerated(element.Key);
                        break;

                    case GenerationModes.HANDHELD:
                        isValid = GenerateItemHandheld(element.Key);
                        break;

                    case GenerationModes.CUBE_ALL:
                        isValid = GenerateBlockCubeAll(element.Key);
                        break;

                    case GenerationModes.LOG:
                        isValid = GenerateBlockLog(element.Key);
                        break;

                    case GenerationModes.FURNACE:
                        isValid = GenerateBlockFurnace(element.Key);
                        break;

                    case GenerationModes.STAIRS:
                        isValid = GenerateBlockStairs(element.Key, textureName);
                        break;

                    case GenerationModes.SLABS:
                        isValid = GenerateBlockSlabs(element.Key, textureName);
                        break;

                    case GenerationModes.DOORS:
                        break;

                    case GenerationModes.FENCES:
                        break;

                    case GenerationModes.FENCE_GATE:
                        break;

                    case GenerationModes.CROPS:
                        break;

                    case GenerationModes.FLOWER:
                        break;

                    case GenerationModes.BUTTON:
                        break;
                    }
                    // Si jamais une génération se passe mal
                    if (!isValid)
                    {
                        MessageBox.Show("Une erreur s'est produite lors de la génération du model \"" + element.Key + "\"");
                        return(false);
                    }
                }

                ModelsToGenerate.Clear();
                AdditionalTextures.Clear();
                MessageBox.Show("Tous les modèles ont été générés avec succès dans " + pathManager.Assets);
                return(true);
            }
            else
            {
                MessageBox.Show("You must set the path of your mod folder and/or add at least 1 model to generate !");
                return(false);
            }
        }