コード例 #1
0
ファイル: Model.cs プロジェクト: TaleOfTwoWastelands/ESPSharp
        public override void WriteXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (FileName != null)
            {
                ele.TryPathTo("FileName", true, out subEle);
                FileName.WriteXML(subEle, master);
            }
            if (Unknown != null)
            {
                ele.TryPathTo("Unknown", true, out subEle);
                Unknown.WriteXML(subEle, master);
            }
            if (TextureFileHash != null)
            {
                ele.TryPathTo("TextureFileHash", true, out subEle);
                TextureFileHash.WriteXML(subEle, master);
            }
            if (AlternateTextures != null)
            {
                ele.TryPathTo("AlternateTextures", true, out subEle);
                AlternateTextures.WriteXML(subEle, master);
            }
            if (FaceGenModelFlags != null)
            {
                ele.TryPathTo("FaceGenModelFlags", true, out subEle);
                FaceGenModelFlags.WriteXML(subEle, master);
            }
        }
コード例 #2
0
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (Version != null)
            {
                ele.TryPathTo("Version", true, out subEle);
                Version.WriteXML(subEle, master);
            }
            if (Data != null)
            {
                ele.TryPathTo("Data", true, out subEle);
                Data.WriteXML(subEle, master);
            }
            if (Vertices != null)
            {
                ele.TryPathTo("Vertices", true, out subEle);
                Vertices.WriteXML(subEle, master);
            }
            if (Triangles != null)
            {
                ele.TryPathTo("Triangles", true, out subEle);
                Triangles.WriteXML(subEle, master);
            }
            if (Unknown != null)
            {
                ele.TryPathTo("Unknown", true, out subEle);
                Unknown.WriteXML(subEle, master);
            }
            if (Doors != null)
            {
                ele.TryPathTo("Doors", true, out subEle);
                Doors.WriteXML(subEle, master);
            }
            if (Grid != null)
            {
                ele.TryPathTo("Grid", true, out subEle);
                Grid.WriteXML(subEle, master);
            }
            if (ExternalConnections != null)
            {
                ele.TryPathTo("ExternalConnections", true, out subEle);
                ExternalConnections.WriteXML(subEle, master);
            }
        }
コード例 #3
0
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (ObjectBounds != null)
            {
                ele.TryPathTo("ObjectBounds", true, out subEle);
                ObjectBounds.WriteXML(subEle, master);
            }
            if (Name != null)
            {
                ele.TryPathTo("Name", true, out subEle);
                Name.WriteXML(subEle, master);
            }
            if (Model != null)
            {
                ele.TryPathTo("Model", true, out subEle);
                Model.WriteXML(subEle, master);
            }
            if (Destructable != null)
            {
                ele.TryPathTo("Destructable", true, out subEle);
                Destructable.WriteXML(subEle, master);
            }
            if (Unknown != null)
            {
                ele.TryPathTo("Unknown", true, out subEle);
                Unknown.WriteXML(subEle, master);
            }
            if (Sound != null)
            {
                ele.TryPathTo("Sound", true, out subEle);
                Sound.WriteXML(subEle, master);
            }
        }
コード例 #4
0
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierSunrise != null)
            {
                ele.TryPathTo("ImageSpaceModifier/Sunrise", true, out subEle);
                ImageSpaceModifierSunrise.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierDay != null)
            {
                ele.TryPathTo("ImageSpaceModifier/Day", true, out subEle);
                ImageSpaceModifierDay.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierSunset != null)
            {
                ele.TryPathTo("ImageSpaceModifier/Sunset", true, out subEle);
                ImageSpaceModifierSunset.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierNight != null)
            {
                ele.TryPathTo("ImageSpaceModifier/Night", true, out subEle);
                ImageSpaceModifierNight.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierHighNoon != null)
            {
                ele.TryPathTo("ImageSpaceModifier/HighNoon", true, out subEle);
                ImageSpaceModifierHighNoon.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierMidnight != null)
            {
                ele.TryPathTo("ImageSpaceModifier/Midnight", true, out subEle);
                ImageSpaceModifierMidnight.WriteXML(subEle, master);
            }
            if (CloudTextureLayer0 != null)
            {
                ele.TryPathTo("CloudTexture/Layer0", true, out subEle);
                CloudTextureLayer0.WriteXML(subEle, master);
            }
            if (CloudTextureLayer1 != null)
            {
                ele.TryPathTo("CloudTexture/Layer1", true, out subEle);
                CloudTextureLayer1.WriteXML(subEle, master);
            }
            if (CloudTextureLayer2 != null)
            {
                ele.TryPathTo("CloudTexture/Layer2", true, out subEle);
                CloudTextureLayer2.WriteXML(subEle, master);
            }
            if (CloudTextureLayer3 != null)
            {
                ele.TryPathTo("CloudTexture/Layer3", true, out subEle);
                CloudTextureLayer3.WriteXML(subEle, master);
            }
            if (Model != null)
            {
                ele.TryPathTo("Model", true, out subEle);
                Model.WriteXML(subEle, master);
            }
            if (Unknown != null)
            {
                ele.TryPathTo("Unknown", true, out subEle);
                Unknown.WriteXML(subEle, master);
            }
            if (CloudLayerSpeed != null)
            {
                ele.TryPathTo("CloudLayerSpeed", true, out subEle);
                CloudLayerSpeed.WriteXML(subEle, master);
            }
            if (CloudLayerColors != null)
            {
                ele.TryPathTo("CloudLayerColors", true, out subEle);
                CloudLayerColors.WriteXML(subEle, master);
            }
            if (EnvironmentalColors != null)
            {
                ele.TryPathTo("EnvironmentalColors", true, out subEle);
                EnvironmentalColors.WriteXML(subEle, master);
            }
            if (WeatherFogDistance != null)
            {
                ele.TryPathTo("WeatherFogDistance", true, out subEle);
                WeatherFogDistance.WriteXML(subEle, master);
            }
            if (Unused != null)
            {
                ele.TryPathTo("Unused", true, out subEle);
                Unused.WriteXML(subEle, master);
            }
            if (Data != null)
            {
                ele.TryPathTo("Data", true, out subEle);
                Data.WriteXML(subEle, master);
            }
            if (Sounds != null)
            {
                ele.TryPathTo("Sounds", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Sound"
                };
                int i = 0;
                foreach (var entry in Sounds)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
        }
コード例 #5
0
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (ObjectBounds != null)
            {
                ele.TryPathTo("ObjectBounds", true, out subEle);
                ObjectBounds.WriteXML(subEle, master);
            }
            if (Name != null)
            {
                ele.TryPathTo("Name", true, out subEle);
                Name.WriteXML(subEle, master);
            }
            if (Model != null)
            {
                ele.TryPathTo("Model", true, out subEle);
                Model.WriteXML(subEle, master);
            }
            if (BaseStats != null)
            {
                ele.TryPathTo("BaseStats", true, out subEle);
                BaseStats.WriteXML(subEle, master);
            }
            if (Factions != null)
            {
                ele.TryPathTo("Factions", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Faction"
                };
                int i = 0;
                Factions.Sort();
                foreach (var entry in Factions)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (DeathItem != null)
            {
                ele.TryPathTo("DeathItem", true, out subEle);
                DeathItem.WriteXML(subEle, master);
            }
            if (VoiceType != null)
            {
                ele.TryPathTo("VoiceType", true, out subEle);
                VoiceType.WriteXML(subEle, master);
            }
            if (Template != null)
            {
                ele.TryPathTo("Template", true, out subEle);
                Template.WriteXML(subEle, master);
            }
            if (Race != null)
            {
                ele.TryPathTo("Race", true, out subEle);
                Race.WriteXML(subEle, master);
            }
            if (ActorEffects != null)
            {
                ele.TryPathTo("ActorEffects", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "ActorEffect"
                };
                int i = 0;
                ActorEffects.Sort();
                foreach (var entry in ActorEffects)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (UnarmedAttackEffect != null)
            {
                ele.TryPathTo("Unarmed/AttackEffect", true, out subEle);
                UnarmedAttackEffect.WriteXML(subEle, master);
            }
            if (UnarmedAttackAnimation != null)
            {
                ele.TryPathTo("Unarmed/AttackAnimation", true, out subEle);
                UnarmedAttackAnimation.WriteXML(subEle, master);
            }
            if (Destructable != null)
            {
                ele.TryPathTo("Destructable", true, out subEle);
                Destructable.WriteXML(subEle, master);
            }
            if (Script != null)
            {
                ele.TryPathTo("Script", true, out subEle);
                Script.WriteXML(subEle, master);
            }
            if (Contents != null)
            {
                ele.TryPathTo("Contents", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Item"
                };
                int i = 0;
                Contents.Sort();
                foreach (var entry in Contents)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (AIData != null)
            {
                ele.TryPathTo("AIData", true, out subEle);
                AIData.WriteXML(subEle, master);
            }
            if (Packages != null)
            {
                ele.TryPathTo("Packages", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Package"
                };
                int i = 0;
                foreach (var entry in Packages)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (Class != null)
            {
                ele.TryPathTo("Class", true, out subEle);
                Class.WriteXML(subEle, master);
            }
            if (Data != null)
            {
                ele.TryPathTo("Data", true, out subEle);
                Data.WriteXML(subEle, master);
            }
            if (Skills != null)
            {
                ele.TryPathTo("Skills", true, out subEle);
                Skills.WriteXML(subEle, master);
            }
            if (HeadParts != null)
            {
                ele.TryPathTo("HeadParts", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "HeadPart"
                };
                int i = 0;
                HeadParts.Sort();
                foreach (var entry in HeadParts)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (HairType != null)
            {
                ele.TryPathTo("Hair/Type", true, out subEle);
                HairType.WriteXML(subEle, master);
            }
            if (HairLength != null)
            {
                ele.TryPathTo("Hair/Length", true, out subEle);
                HairLength.WriteXML(subEle, master);
            }
            if (Eyes != null)
            {
                ele.TryPathTo("Eyes", true, out subEle);
                Eyes.WriteXML(subEle, master);
            }
            if (HairColor != null)
            {
                ele.TryPathTo("Hair/Color", true, out subEle);
                HairColor.WriteXML(subEle, master);
            }
            if (CombatStyle != null)
            {
                ele.TryPathTo("CombatStyle", true, out subEle);
                CombatStyle.WriteXML(subEle, master);
            }
            if (ImpactMaterialType != null)
            {
                ele.TryPathTo("ImpactMaterialType", true, out subEle);
                ImpactMaterialType.WriteXML(subEle, master);
            }
            if (FaceGenGeometrySymmetric != null)
            {
                ele.TryPathTo("FaceGen/Geometry/Symmetric", true, out subEle);
                FaceGenGeometrySymmetric.WriteXML(subEle, master);
            }
            if (FaceGenGeometryAsymmetric != null)
            {
                ele.TryPathTo("FaceGen/Geometry/Asymmetric", true, out subEle);
                FaceGenGeometryAsymmetric.WriteXML(subEle, master);
            }
            if (FaceGenTexture != null)
            {
                ele.TryPathTo("FaceGen/Texture", true, out subEle);
                FaceGenTexture.WriteXML(subEle, master);
            }
            if (Unknown != null)
            {
                ele.TryPathTo("Unknown", true, out subEle);
                Unknown.WriteXML(subEle, master);
            }
            if (Height != null)
            {
                ele.TryPathTo("Height", true, out subEle);
                Height.WriteXML(subEle, master);
            }
            if (Weight != null)
            {
                ele.TryPathTo("Weight", true, out subEle);
                Weight.WriteXML(subEle, master);
            }
        }
コード例 #6
0
ファイル: Cell.cs プロジェクト: TaleOfTwoWastelands/ESPSharp
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (Name != null)
            {
                ele.TryPathTo("Name", true, out subEle);
                Name.WriteXML(subEle, master);
            }
            if (CellFlags != null)
            {
                ele.TryPathTo("CellFlags", true, out subEle);
                CellFlags.WriteXML(subEle, master);
            }
            if (Grid != null)
            {
                ele.TryPathTo("Grid", true, out subEle);
                Grid.WriteXML(subEle, master);
            }
            if (Lighting != null)
            {
                ele.TryPathTo("Lighting", true, out subEle);
                Lighting.WriteXML(subEle, master);
            }
            if (FootstepMaterial != null)
            {
                ele.TryPathTo("FootstepMaterial", true, out subEle);
                FootstepMaterial.WriteXML(subEle, master);
            }
            if (LightTemplate != null)
            {
                ele.TryPathTo("LightTemplate", true, out subEle);
                LightTemplate.WriteXML(subEle, master);
            }
            if (LightTemplateInherit != null)
            {
                ele.TryPathTo("LightTemplateInherit", true, out subEle);
                LightTemplateInherit.WriteXML(subEle, master);
            }
            if (WaterHeight != null)
            {
                ele.TryPathTo("WaterHeight", true, out subEle);
                WaterHeight.WriteXML(subEle, master);
            }
            if (WaterNoiseTexture != null)
            {
                ele.TryPathTo("WaterNoiseTexture", true, out subEle);
                WaterNoiseTexture.WriteXML(subEle, master);
            }
            if (Regions != null)
            {
                ele.TryPathTo("Regions", true, out subEle);
                Regions.WriteXML(subEle, master);
            }
            if (ImageSpace != null)
            {
                ele.TryPathTo("ImageSpace", true, out subEle);
                ImageSpace.WriteXML(subEle, master);
            }
            if (Unknown != null)
            {
                ele.TryPathTo("Unknown", true, out subEle);
                Unknown.WriteXML(subEle, master);
            }
            if (EncounterZone != null)
            {
                ele.TryPathTo("EncounterZone", true, out subEle);
                EncounterZone.WriteXML(subEle, master);
            }
            if (Climate != null)
            {
                ele.TryPathTo("Climate", true, out subEle);
                Climate.WriteXML(subEle, master);
            }
            if (Water != null)
            {
                ele.TryPathTo("Water", true, out subEle);
                Water.WriteXML(subEle, master);
            }
            if (Owner != null)
            {
                ele.TryPathTo("Owner", true, out subEle);
                Owner.WriteXML(subEle, master);
            }
            if (FactionRank != null)
            {
                ele.TryPathTo("FactionRank", true, out subEle);
                FactionRank.WriteXML(subEle, master);
            }
            if (AcousticSpace != null)
            {
                ele.TryPathTo("AcousticSpace", true, out subEle);
                AcousticSpace.WriteXML(subEle, master);
            }
            if (Unused != null)
            {
                ele.TryPathTo("Unused", true, out subEle);
                Unused.WriteXML(subEle, master);
            }
            if (MusicType != null)
            {
                ele.TryPathTo("MusicType", true, out subEle);
                MusicType.WriteXML(subEle, master);
            }
        }
コード例 #7
0
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (AddedQuests != null)
            {
                ele.TryPathTo("AddedQuests", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "AddedQuest"
                };
                int i = 0;
                AddedQuests.Sort();
                foreach (var entry in AddedQuests)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (RemovedQuests != null)
            {
                ele.TryPathTo("RemovedQuests", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "RemovedQuest"
                };
                int i = 0;
                foreach (var entry in RemovedQuests)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (UnusedInfos != null)
            {
                ele.TryPathTo("UnusedInfos", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Unused"
                };
                int i = 0;
                foreach (var entry in UnusedInfos)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (Name != null)
            {
                ele.TryPathTo("Name", true, out subEle);
                Name.WriteXML(subEle, master);
            }
            if (Priority != null)
            {
                ele.TryPathTo("Priority", true, out subEle);
                Priority.WriteXML(subEle, master);
            }
            if (Unknown != null)
            {
                ele.TryPathTo("Unknown", true, out subEle);
                Unknown.WriteXML(subEle, master);
            }
            if (Data != null)
            {
                ele.TryPathTo("Data", true, out subEle);
                Data.WriteXML(subEle, master);
            }
        }
コード例 #8
0
ファイル: Race.cs プロジェクト: TaleOfTwoWastelands/ESPSharp
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (Name != null)
            {
                ele.TryPathTo("Name", true, out subEle);
                Name.WriteXML(subEle, master);
            }
            if (Description != null)
            {
                ele.TryPathTo("Description", true, out subEle);
                Description.WriteXML(subEle, master);
            }
            if (Relationships != null)
            {
                ele.TryPathTo("Relationships", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Relationship"
                };
                int i = 0;
                foreach (var entry in Relationships)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (Data != null)
            {
                ele.TryPathTo("Data", true, out subEle);
                Data.WriteXML(subEle, master);
            }
            if (OlderRace != null)
            {
                ele.TryPathTo("Race/Older", true, out subEle);
                OlderRace.WriteXML(subEle, master);
            }
            if (YoungerRace != null)
            {
                ele.TryPathTo("Race/Younger", true, out subEle);
                YoungerRace.WriteXML(subEle, master);
            }
            if (UnknownMarker != null)
            {
                ele.TryPathTo("UnknownMarker", true, out subEle);
                UnknownMarker.WriteXML(subEle, master);
            }
            if (DefaultVoices != null)
            {
                ele.TryPathTo("Defaults/Voices", true, out subEle);
                DefaultVoices.WriteXML(subEle, master);
            }
            if (DefaultHairStyles != null)
            {
                ele.TryPathTo("Defaults/HairStyles", true, out subEle);
                DefaultHairStyles.WriteXML(subEle, master);
            }
            if (DefaultHairColors != null)
            {
                ele.TryPathTo("Defaults/HairColors", true, out subEle);
                DefaultHairColors.WriteXML(subEle, master);
            }
            if (FaceGenMainClamp != null)
            {
                ele.TryPathTo("FaceGen/Clamps/Main", true, out subEle);
                FaceGenMainClamp.WriteXML(subEle, master);
            }
            if (FaceGenFaceClamp != null)
            {
                ele.TryPathTo("FaceGen/Clamps/Face", true, out subEle);
                FaceGenFaceClamp.WriteXML(subEle, master);
            }
            if (Unknown != null)
            {
                ele.TryPathTo("Unknown", true, out subEle);
                Unknown.WriteXML(subEle, master);
            }
            if (HeadData != null)
            {
                ele.TryPathTo("HeadData", true, out subEle);
                HeadData.WriteXML(subEle, master);
            }
            if (BodyData != null)
            {
                ele.TryPathTo("BodyData", true, out subEle);
                BodyData.WriteXML(subEle, master);
            }
            if (Hairs != null)
            {
                ele.TryPathTo("Hairs", true, out subEle);
                Hairs.WriteXML(subEle, master);
            }
            if (Eyes != null)
            {
                ele.TryPathTo("Eyes", true, out subEle);
                Eyes.WriteXML(subEle, master);
            }
            if (MaleFaceGenData != null)
            {
                ele.TryPathTo("FaceGen/Male", true, out subEle);
                MaleFaceGenData.WriteXML(subEle, master);
            }
            if (FemaleFaceGenData != null)
            {
                ele.TryPathTo("FaceGen/Female", true, out subEle);
                FemaleFaceGenData.WriteXML(subEle, master);
            }
        }