public override void LoadDataFromXML() { bool exists = false; if (DataXMLDoc != null) { _projectileID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "projectileID", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("projectileID", exists); } else { SetPropertyExistsInBaseData("projectileID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(projectileID, "projectileID")); } SetPropertyExists("projectileID", exists); _objectType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "objectType", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("objectType", exists); } else { SetPropertyExistsInBaseData("objectType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "objectType")); } SetPropertyExists("objectType", exists); _projectileType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "projectileType", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("projectileType", exists); } else { SetPropertyExistsInBaseData("projectileType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "projectileType")); } SetPropertyExists("projectileType", exists); _projectileParticleName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "projectileParticleName", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("projectileParticleName", exists); } else { SetPropertyExistsInBaseData("projectileParticleName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "projectileParticleName")); } SetPropertyExists("projectileParticleName", exists); _meshName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "meshName", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("meshName", exists); } else { SetPropertyExistsInBaseData("meshName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "meshName")); } SetPropertyExists("meshName", exists); _explosionID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "explosionID", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("explosionID", exists); } else { SetPropertyExistsInBaseData("explosionID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "explosionID")); } SetPropertyExists("explosionID", exists); _projectileExpireExplosionID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "projectileExpireExplosionID", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("projectileExpireExplosionID", exists); } else { SetPropertyExistsInBaseData("projectileExpireExplosionID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "projectileExpireExplosionID")); } SetPropertyExists("projectileExpireExplosionID", exists); _areaOfEffectID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "areaOfEffectID", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("areaOfEffectID", exists); } else { SetPropertyExistsInBaseData("areaOfEffectID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "areaOfEffectID")); } SetPropertyExists("areaOfEffectID", exists); _instantKillShipClass = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "instantKillShipClass", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("instantKillShipClass", exists); } else { SetPropertyExistsInBaseData("instantKillShipClass", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "instantKillShipClass")); } SetPropertyExists("instantKillShipClass", exists); _materialNameHead = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "materialNameHead", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("materialNameHead", exists); } else { SetPropertyExistsInBaseData("materialNameHead", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "materialNameHead")); } SetPropertyExists("materialNameHead", exists); _materialNameTail = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "materialNameTail", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("materialNameTail", exists); } else { SetPropertyExistsInBaseData("materialNameTail", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "materialNameTail")); } SetPropertyExists("materialNameTail", exists); _ribbonID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "ribbonID", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("ribbonID", exists); } else { SetPropertyExistsInBaseData("ribbonID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "ribbonID")); } SetPropertyExists("ribbonID", exists); _dPExpire = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "dPExpire", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("dPExpire", exists); } else { SetPropertyExistsInBaseData("dPExpire", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "dPExpire")); } SetPropertyExists("dPExpire", exists); _damageOverTime = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "damageOverTime", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("damageOverTime", exists); } else { SetPropertyExistsInBaseData("damageOverTime", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "damageOverTime")); } SetPropertyExists("damageOverTime", exists); _damageOverTimeMax = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "damageOverTimeMax", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("damageOverTimeMax", exists); } else { SetPropertyExistsInBaseData("damageOverTimeMax", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "damageOverTimeMax")); } SetPropertyExists("damageOverTimeMax", exists); _duration = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "duration", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("duration", exists); } else { SetPropertyExistsInBaseData("duration", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "duration")); } SetPropertyExists("duration", exists); _maxDuration = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "maxDuration", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("maxDuration", exists); } else { SetPropertyExistsInBaseData("maxDuration", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "maxDuration")); } SetPropertyExists("maxDuration", exists); _projectileHeadSize = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "projectileHeadSize", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("projectileHeadSize", exists); } else { SetPropertyExistsInBaseData("projectileHeadSize", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "projectileHeadSize")); } SetPropertyExists("projectileHeadSize", exists); _projectileTailSize = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "projectileTailSize", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("projectileTailSize", exists); } else { SetPropertyExistsInBaseData("projectileTailSize", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "projectileTailSize")); } SetPropertyExists("projectileTailSize", exists); _projectileVelocity = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "projectileVelocity", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("projectileVelocity", exists); } else { SetPropertyExistsInBaseData("projectileVelocity", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "projectileVelocity")); } SetPropertyExists("projectileVelocity", exists); _initialLife = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "initialLife", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("initialLife", exists); } else { SetPropertyExistsInBaseData("initialLife", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "initialLife")); } SetPropertyExists("initialLife", exists); _damage = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "damage", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("damage", exists); } else { SetPropertyExistsInBaseData("damage", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "damage")); } SetPropertyExists("damage", exists); _weaponPush = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "weaponPush", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("weaponPush", exists); } else { SetPropertyExistsInBaseData("weaponPush", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "weaponPush")); } SetPropertyExists("weaponPush", exists); _range = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "range", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("range", exists); } else { SetPropertyExistsInBaseData("range", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "range")); } SetPropertyExists("range", exists); _bShowProjectileExpire = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bShowProjectileExpire", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("bShowProjectileExpire", exists); } else { SetPropertyExistsInBaseData("bShowProjectileExpire", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bShowProjectileExpire")); } SetPropertyExists("bShowProjectileExpire", exists); _bPersistsOnHit = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bPersistsOnHit", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("bPersistsOnHit", exists); } else { SetPropertyExistsInBaseData("bPersistsOnHit", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bPersistsOnHit")); } SetPropertyExists("bPersistsOnHit", exists); _bAntiCapital = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bAntiCapital", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("bAntiCapital", exists); } else { SetPropertyExistsInBaseData("bAntiCapital", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bAntiCapital")); } SetPropertyExists("bAntiCapital", exists); _bCrewKiller = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bCrewKiller", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("bCrewKiller", exists); } else { SetPropertyExistsInBaseData("bCrewKiller", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bCrewKiller")); } SetPropertyExists("bCrewKiller", exists); _bIgnoresShields = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bIgnoresShields", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("bIgnoresShields", exists); } else { SetPropertyExistsInBaseData("bIgnoresShields", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bIgnoresShields")); } SetPropertyExists("bIgnoresShields", exists); _bMining = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bMining", out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("bMining", exists); } else { SetPropertyExistsInBaseData("bMining", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bMining")); } SetPropertyExists("bMining", exists); _projectileSize = ParseHelpers.GetVector3DFromVD2Data(DataXMLDoc, "projectileSize", out exists); _projectileSize.OnElementChanged += projectileSize_OnElementChanged; if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("projectileSize", exists); } else { SetPropertyExistsInBaseData("projectileSize", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "projectileSize")); } SetPropertyExists("projectileSize", exists); _canister = DataStructureParseHelpers.GetcanisterDataStructureFromVD2Data(this, DataXMLDoc, out exists); if (Source.ShortName == "Base") { SetPropertyExistsInBaseData("canister", exists); } else { SetPropertyExistsInBaseData("canister", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "canister")); } SetPropertyExists("canister", exists); base.LoadDataFromXML(); } }