public override void LoadDataFromXML() { bool exists = false; if (DataXMLDoc != null) { _objectID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "objectID", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("objectID", exists); } else { SetPropertyExistsInBaseData("objectID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(objectID, "objectID")); } SetPropertyExists("objectID", exists); _effectType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "effectType", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("effectType", exists); } else { SetPropertyExistsInBaseData("effectType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "effectType")); } SetPropertyExists("effectType", exists); _materialName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "materialName", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("materialName", exists); } else { SetPropertyExistsInBaseData("materialName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "materialName")); } SetPropertyExists("materialName", exists); _count = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "count", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("count", exists); } else { SetPropertyExistsInBaseData("count", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "count")); } SetPropertyExists("count", exists); _numberOfChains = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "numberOfChains", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("numberOfChains", exists); } else { SetPropertyExistsInBaseData("numberOfChains", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "numberOfChains")); } SetPropertyExists("numberOfChains", exists); _maxChainElements = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "maxChainElements", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("maxChainElements", exists); } else { SetPropertyExistsInBaseData("maxChainElements", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "maxChainElements")); } SetPropertyExists("maxChainElements", exists); _trailLength = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "trailLength", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("trailLength", exists); } else { SetPropertyExistsInBaseData("trailLength", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "trailLength")); } SetPropertyExists("trailLength", exists); _maxRangeZ = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "maxRangeZ", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("maxRangeZ", exists); } else { SetPropertyExistsInBaseData("maxRangeZ", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "maxRangeZ")); } SetPropertyExists("maxRangeZ", exists); _defaultDimensions = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "defaultDimensions", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("defaultDimensions", exists); } else { SetPropertyExistsInBaseData("defaultDimensions", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "defaultDimensions")); } SetPropertyExists("defaultDimensions", exists); _widthChange = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "widthChange", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("widthChange", exists); } else { SetPropertyExistsInBaseData("widthChange", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "widthChange")); } SetPropertyExists("widthChange", exists); _initialWidth = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "initialWidth", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("initialWidth", exists); } else { SetPropertyExistsInBaseData("initialWidth", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "initialWidth")); } SetPropertyExists("initialWidth", exists); _initialColor = ParseHelpers.GetColorFromVD2Data(DataXMLDoc, "initialColor", out exists); _initialColor.OnElementChanged += initialColor_OnElementChanged; if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("initialColor", exists); } else { SetPropertyExistsInBaseData("initialColor", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "initialColor")); } SetPropertyExists("initialColor", exists); _colorChange = ParseHelpers.GetColorFromVD2Data(DataXMLDoc, "colorChange", out exists); _colorChange.OnElementChanged += colorChange_OnElementChanged; if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("colorChange", exists); } else { SetPropertyExistsInBaseData("colorChange", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "colorChange")); } SetPropertyExists("colorChange", exists); base.LoadDataFromXML(); } }