public override void LoadDataFromXML()
        {
            bool exists = false;

            if (DataXMLDoc != null)
            {
                _weaponID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "weaponID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("weaponID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("weaponID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(weaponID, "weaponID"));
                }
                SetPropertyExists("weaponID", exists);

                _weaponType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "weaponType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("weaponType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("weaponType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "weaponType"));
                }
                SetPropertyExists("weaponType", exists);
                _ammunitionID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "ammunitionID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("ammunitionID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("ammunitionID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "ammunitionID"));
                }
                SetPropertyExists("ammunitionID", exists);
                _name = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "name", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("name", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("name", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "name"));
                }
                SetPropertyExists("name", exists);
                _fireSoundID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "fireSoundID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("fireSoundID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("fireSoundID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "fireSoundID"));
                }
                SetPropertyExists("fireSoundID", exists);
                _muzzleFlashEffectID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "muzzleFlashEffectID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("muzzleFlashEffectID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("muzzleFlashEffectID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "muzzleFlashEffectID"));
                }
                SetPropertyExists("muzzleFlashEffectID", exists);

                _capacity = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "capacity", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("capacity", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("capacity", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "capacity"));
                }
                SetPropertyExists("capacity", exists);
                _randomLaunchAngle = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "randomLaunchAngle", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("randomLaunchAngle", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("randomLaunchAngle", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "randomLaunchAngle"));
                }
                SetPropertyExists("randomLaunchAngle", exists);
                _randomLaunchSpeed = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "randomLaunchSpeed", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("randomLaunchSpeed", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("randomLaunchSpeed", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "randomLaunchSpeed"));
                }
                SetPropertyExists("randomLaunchSpeed", exists);

                _reFireRate = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "reFireRate", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("reFireRate", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("reFireRate", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "reFireRate"));
                }
                SetPropertyExists("reFireRate", exists);
                _reloadTime = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "reloadTime", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("reloadTime", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("reloadTime", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "reloadTime"));
                }
                SetPropertyExists("reloadTime", exists);
                _launchVelocity = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "launchVelocity", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("launchVelocity", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("launchVelocity", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "launchVelocity"));
                }
                SetPropertyExists("launchVelocity", exists);

                _bRequiresBeamWeapon = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bRequiresBeamWeapon", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bRequiresBeamWeapon", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bRequiresBeamWeapon", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bRequiresBeamWeapon"));
                }
                SetPropertyExists("bRequiresBeamWeapon", exists);
                _bNoLifeLimit = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bNoLifeLimit", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bNoLifeLimit", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bNoLifeLimit", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bNoLifeLimit"));
                }
                SetPropertyExists("bNoLifeLimit", exists);
                _bFireFullAmmo = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bFireFullAmmo", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bFireFullAmmo", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bFireFullAmmo", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bFireFullAmmo"));
                }
                SetPropertyExists("bFireFullAmmo", exists);
                _bRequiresCollisionWeapon = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bRequiresCollisionWeapon", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bRequiresCollisionWeapon", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bRequiresCollisionWeapon", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bRequiresCollisionWeapon"));
                }
                SetPropertyExists("bRequiresCollisionWeapon", exists);

                base.LoadDataFromXML();
            }
        }
        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);
                _particleSystemName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "particleSystemName", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("particleSystemName", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("particleSystemName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "particleSystemName"));
                }
                SetPropertyExists("particleSystemName", exists);
                _explosionSoundID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "explosionSoundID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("explosionSoundID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("explosionSoundID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "explosionSoundID"));
                }
                SetPropertyExists("explosionSoundID", exists);
                _explosionType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "explosionType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("explosionType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("explosionType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "explosionType"));
                }
                SetPropertyExists("explosionType", exists);

                _renderingDistance = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "renderingDistance", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("renderingDistance", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("renderingDistance", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "renderingDistance"));
                }
                SetPropertyExists("renderingDistance", exists);
                _shakeDistance = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "shakeDistance", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("shakeDistance", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("shakeDistance", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "shakeDistance"));
                }
                SetPropertyExists("shakeDistance", exists);
                _pushForce = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "pushForce", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("pushForce", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("pushForce", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "pushForce"));
                }
                SetPropertyExists("pushForce", exists);
                _damage = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "damage", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("damage", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("damage", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "damage"));
                }
                SetPropertyExists("damage", exists);
                _maxSounds = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "maxSounds", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("maxSounds", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("maxSounds", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "maxSounds"));
                }
                SetPropertyExists("maxSounds", exists);

                _life = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "life", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("life", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("life", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "life"));
                }
                SetPropertyExists("life", exists);
                _angularForce = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "angularForce", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("angularForce", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("angularForce", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "angularForce"));
                }
                SetPropertyExists("angularForce", exists);

                _bCausesShake = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bCausesShake", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bCausesShake", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bCausesShake", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bCausesShake"));
                }
                SetPropertyExists("bCausesShake", exists);

                _impactSize = ParseHelpers.GetVector3DFromVD2Data(DataXMLDoc, "impactSize", out exists);
                _impactSize.OnElementChanged += impactSize_OnElementChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("impactSize", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("impactSize", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "impactSize"));
                }
                SetPropertyExists("impactSize", exists);

                base.LoadDataFromXML();
            }
        }
        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();
            }
        }
        public override void LoadDataFromXML()
        {
            bool exists = false;

            if (DataXMLDoc != null)
            {
                _hangarID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "hangarID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("hangarID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("hangarID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(hangarID, "hangarID"));
                }
                SetPropertyExists("hangarID", exists);

                _weaponType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "weaponType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("weaponType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("weaponType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "weaponType"));
                }
                SetPropertyExists("weaponType", exists);
                _fighterShipID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "fighterShipID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("fighterShipID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("fighterShipID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "fighterShipID"));
                }
                SetPropertyExists("fighterShipID", exists);
                _name = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "name", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("name", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("name", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "name"));
                }
                SetPropertyExists("name", exists);

                _maxFighters = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "maxFighters", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("maxFighters", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("maxFighters", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "maxFighters"));
                }
                SetPropertyExists("maxFighters", exists);
                _launchRange = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "launchRange", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("launchRange", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("launchRange", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "launchRange"));
                }
                SetPropertyExists("launchRange", exists);

                _launchSpeedMultiplier = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "launchSpeedMultiplier", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("launchSpeedMultiplier", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("launchSpeedMultiplier", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "launchSpeedMultiplier"));
                }
                SetPropertyExists("launchSpeedMultiplier", exists);

                _bPrimary = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bPrimary", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bPrimary", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bPrimary", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bPrimary"));
                }
                SetPropertyExists("bPrimary", exists);
                _bRepairHangar = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bRepairHangar", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bRepairHangar", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bRepairHangar", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bRepairHangar"));
                }
                SetPropertyExists("bRepairHangar", exists);
                _bForceSearchAndDestroy = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bForceSearchAndDestroy", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bForceSearchAndDestroy", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bForceSearchAndDestroy", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bForceSearchAndDestroy"));
                }
                SetPropertyExists("bForceSearchAndDestroy", exists);
                _bIndependent = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bIndependent", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bIndependent", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bIndependent", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bIndependent"));
                }
                SetPropertyExists("bIndependent", exists);
                _bSecondaryFire = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bSecondaryFire", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bSecondaryFire", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bSecondaryFire", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bSecondaryFire"));
                }
                SetPropertyExists("bSecondaryFire", exists);

                _launchTube = new ObservableCollection <VD2DataStructure>(DataStructureParseHelpers.GetlaunchTubeDataStructureListFromVD2Data(this, DataXMLDoc, out exists));
                _launchTube.CollectionChanged += OnlaunchTubeChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("launchTube", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("launchTube", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "launchTube"));
                }
                SetPropertyExists("launchTube", exists);
                base.LoadDataFromXML();
            }
        }
Exemple #5
0
        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);
                _soundType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "soundType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("soundType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("soundType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "soundType"));
                }
                SetPropertyExists("soundType", exists);
                _tailSound = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "tailSound", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("tailSound", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("tailSound", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "tailSound"));
                }
                SetPropertyExists("tailSound", exists);
                _startSound = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "startSound", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("startSound", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("startSound", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "startSound"));
                }
                SetPropertyExists("startSound", exists);
                _startSoundFile = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "startSoundFile", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("startSoundFile", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("startSoundFile", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "startSoundFile"));
                }
                SetPropertyExists("startSoundFile", exists);
                _soundEngineSoundType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "soundEngineSoundType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("soundEngineSoundType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("soundEngineSoundType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "soundEngineSoundType"));
                }
                SetPropertyExists("soundEngineSoundType", exists);

                _soundFile = new ObservableCollection <string>(ParseHelpers.GetStringListFromVD2Data(DataXMLDoc, "soundFile", out exists));
                _soundFile.CollectionChanged += OnsoundFileChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("soundFile", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("soundFile", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "soundFile"));
                }
                SetPropertyExists("soundFile", exists);

                _maxDistance = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "maxDistance", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("maxDistance", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("maxDistance", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "maxDistance"));
                }
                SetPropertyExists("maxDistance", exists);
                _referenceDistance = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "referenceDistance", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("referenceDistance", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("referenceDistance", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "referenceDistance"));
                }
                SetPropertyExists("referenceDistance", exists);
                _maxSounds = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "maxSounds", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("maxSounds", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("maxSounds", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "maxSounds"));
                }
                SetPropertyExists("maxSounds", exists);

                _soundPriority = new ObservableCollection <int>(ParseHelpers.GetInt32ListFromVD2Data(DataXMLDoc, "soundPriority", out exists));
                _soundPriority.CollectionChanged += OnsoundPriorityChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("soundPriority", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("soundPriority", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "soundPriority"));
                }
                SetPropertyExists("soundPriority", exists);

                _defaultVolume = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "defaultVolume", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("defaultVolume", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("defaultVolume", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "defaultVolume"));
                }
                SetPropertyExists("defaultVolume", exists);

                _bDisable3d = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bDisable3d", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bDisable3d", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bDisable3d", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bDisable3d"));
                }
                SetPropertyExists("bDisable3d", exists);

                base.LoadDataFromXML();
            }
        }
        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);

                _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);
                _name = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "name", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("name", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("name", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "name"));
                }
                SetPropertyExists("name", 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);
                _faction = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "faction", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("faction", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("faction", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "faction"));
                }
                SetPropertyExists("faction", exists);
                _descriptionText = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "descriptionText", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("descriptionText", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("descriptionText", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "descriptionText"));
                }
                SetPropertyExists("descriptionText", exists);
                _collisionShape = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "collisionShape", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("collisionShape", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("collisionShape", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "collisionShape"));
                }
                SetPropertyExists("collisionShape", 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);
                _debrisSizeAsShipClass = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "debrisSizeAsShipClass", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("debrisSizeAsShipClass", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("debrisSizeAsShipClass", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "debrisSizeAsShipClass"));
                }
                SetPropertyExists("debrisSizeAsShipClass", exists);

                _health = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "health", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("health", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("health", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "health"));
                }
                SetPropertyExists("health", exists);
                _timeToLive = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "timeToLive", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("timeToLive", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("timeToLive", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "timeToLive"));
                }
                SetPropertyExists("timeToLive", exists);
                _minimumMomentum = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "minimumMomentum", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("minimumMomentum", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("minimumMomentum", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "minimumMomentum"));
                }
                SetPropertyExists("minimumMomentum", exists);
                _minimumRotation = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "minimumRotation", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("minimumRotation", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("minimumRotation", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "minimumRotation"));
                }
                SetPropertyExists("minimumRotation", exists);

                _isMassInfinite = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "isMassInfinite", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("isMassInfinite", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("isMassInfinite", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "isMassInfinite"));
                }
                SetPropertyExists("isMassInfinite", exists);
                _bCanAddViaBattleEditorSlider = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bCanAddViaBattleEditorSlider", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bCanAddViaBattleEditorSlider", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bCanAddViaBattleEditorSlider", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bCanAddViaBattleEditorSlider"));
                }
                SetPropertyExists("bCanAddViaBattleEditorSlider", exists);

                _turret = new ObservableCollection <VD2DataStructure>(DataStructureParseHelpers.GetturretDataStructureListFromVD2Data(this, DataXMLDoc, out exists));
                _turret.CollectionChanged += OnturretChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("turret", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("turret", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "turret"));
                }
                SetPropertyExists("turret", exists);
                base.LoadDataFromXML();
            }
        }
        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);

                _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);
                _name = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "name", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("name", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("name", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "name"));
                }
                SetPropertyExists("name", 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);
                _doorSoundID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "doorSoundID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("doorSoundID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("doorSoundID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "doorSoundID"));
                }
                SetPropertyExists("doorSoundID", exists);

                _openTimeMultiplier = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "openTimeMultiplier", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("openTimeMultiplier", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("openTimeMultiplier", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "openTimeMultiplier"));
                }
                SetPropertyExists("openTimeMultiplier", exists);

                _bPhysicalDoor = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bPhysicalDoor", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bPhysicalDoor", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bPhysicalDoor", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bPhysicalDoor"));
                }
                SetPropertyExists("bPhysicalDoor", exists);
                _bOpenOnProximity = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bOpenOnProximity", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bOpenOnProximity", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bOpenOnProximity", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bOpenOnProximity"));
                }
                SetPropertyExists("bOpenOnProximity", exists);

                _translateMax = ParseHelpers.GetVector3DFromVD2Data(DataXMLDoc, "translateMax", out exists);
                _translateMax.OnElementChanged += translateMax_OnElementChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("translateMax", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("translateMax", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "translateMax"));
                }
                SetPropertyExists("translateMax", exists);

                base.LoadDataFromXML();
            }
        }
        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);

                _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);
                _name = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "name", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("name", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("name", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "name"));
                }
                SetPropertyExists("name", exists);
                _missileType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "missileType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("missileType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("missileType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "missileType"));
                }
                SetPropertyExists("missileType", 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);
                _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);
                _trailParticleName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "trailParticleName", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("trailParticleName", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("trailParticleName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "trailParticleName"));
                }
                SetPropertyExists("trailParticleName", 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);
                _missileParticleName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "missileParticleName", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("missileParticleName", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("missileParticleName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "missileParticleName"));
                }
                SetPropertyExists("missileParticleName", exists);

                _cruiseSpeed = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "cruiseSpeed", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("cruiseSpeed", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("cruiseSpeed", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "cruiseSpeed"));
                }
                SetPropertyExists("cruiseSpeed", exists);
                _timeTillCruise = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "timeTillCruise", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("timeTillCruise", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("timeTillCruise", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "timeTillCruise"));
                }
                SetPropertyExists("timeTillCruise", exists);
                _initialVelocity = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "initialVelocity", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("initialVelocity", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("initialVelocity", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "initialVelocity"));
                }
                SetPropertyExists("initialVelocity", 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);
                _timeTillActive = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "timeTillActive", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("timeTillActive", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("timeTillActive", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "timeTillActive"));
                }
                SetPropertyExists("timeTillActive", 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);
                _health = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "health", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("health", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("health", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "health"));
                }
                SetPropertyExists("health", exists);
                _yaw = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "yaw", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("yaw", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("yaw", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "yaw"));
                }
                SetPropertyExists("yaw", exists);
                _pitch = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "pitch", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("pitch", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("pitch", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "pitch"));
                }
                SetPropertyExists("pitch", exists);
                _roll = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "roll", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("roll", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("roll", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "roll"));
                }
                SetPropertyExists("roll", 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);
                _bSelfTarget = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bSelfTarget", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bSelfTarget", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bSelfTarget", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bSelfTarget"));
                }
                SetPropertyExists("bSelfTarget", exists);
                _bReAcquireTarget = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bReAcquireTarget", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bReAcquireTarget", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bReAcquireTarget", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bReAcquireTarget"));
                }
                SetPropertyExists("bReAcquireTarget", exists);

                _missileSize = ParseHelpers.GetVector3DFromVD2Data(DataXMLDoc, "missileSize", out exists);
                _missileSize.OnElementChanged += missileSize_OnElementChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("missileSize", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("missileSize", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "missileSize"));
                }
                SetPropertyExists("missileSize", exists);

                _mirv = DataStructureParseHelpers.GetmirvDataStructureFromVD2Data(this, DataXMLDoc, out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("mirv", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("mirv", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "mirv"));
                }
                SetPropertyExists("mirv", exists);

                base.LoadDataFromXML();
            }
        }
Exemple #9
0
        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);
                _musicFile = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "musicFile", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("musicFile", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("musicFile", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "musicFile"));
                }
                SetPropertyExists("musicFile", exists);
                _objectTypeMusic = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "objectTypeMusic", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("objectTypeMusic", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("objectTypeMusic", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "objectTypeMusic"));
                }
                SetPropertyExists("objectTypeMusic", exists);

                _defaultVolume = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "defaultVolume", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("defaultVolume", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("defaultVolume", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "defaultVolume"));
                }
                SetPropertyExists("defaultVolume", exists);

                _bAmbient = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bAmbient", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bAmbient", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bAmbient", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bAmbient"));
                }
                SetPropertyExists("bAmbient", exists);
                _bLooping = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bLooping", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bLooping", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bLooping", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bLooping"));
                }
                SetPropertyExists("bLooping", exists);

                base.LoadDataFromXML();
            }
        }
Exemple #10
0
        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);

                _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);
                _name = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "name", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("name", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("name", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "name"));
                }
                SetPropertyExists("name", 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);
                _wireframeMaterial = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "wireframeMaterial", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("wireframeMaterial", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("wireframeMaterial", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "wireframeMaterial"));
                }
                SetPropertyExists("wireframeMaterial", exists);
                _tacticalExplosionID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "tacticalExplosionID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("tacticalExplosionID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("tacticalExplosionID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "tacticalExplosionID"));
                }
                SetPropertyExists("tacticalExplosionID", exists);
                _babyExplosionID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "babyExplosionID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("babyExplosionID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("babyExplosionID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "babyExplosionID"));
                }
                SetPropertyExists("babyExplosionID", 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);
                _asteroidSize = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "asteroidSize", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("asteroidSize", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("asteroidSize", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "asteroidSize"));
                }
                SetPropertyExists("asteroidSize", exists);
                _displayName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "displayName", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("displayName", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("displayName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "displayName"));
                }
                SetPropertyExists("displayName", exists);
                _asteroidType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "asteroidType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("asteroidType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("asteroidType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "asteroidType"));
                }
                SetPropertyExists("asteroidType", exists);

                _descriptionText = new ObservableCollection <string>(ParseHelpers.GetStringListFromVD2Data(DataXMLDoc, "descriptionText", out exists));
                _descriptionText.CollectionChanged += OndescriptionTextChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("descriptionText", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("descriptionText", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "descriptionText"));
                }
                SetPropertyExists("descriptionText", exists);
                _collisionShape = new ObservableCollection <string>(ParseHelpers.GetStringListFromVD2Data(DataXMLDoc, "collisionShape", out exists));
                _collisionShape.CollectionChanged += OncollisionShapeChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("collisionShape", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("collisionShape", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "collisionShape"));
                }
                SetPropertyExists("collisionShape", exists);

                _babySpawnDamage = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "babySpawnDamage", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("babySpawnDamage", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("babySpawnDamage", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "babySpawnDamage"));
                }
                SetPropertyExists("babySpawnDamage", exists);

                _health = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "health", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("health", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("health", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "health"));
                }
                SetPropertyExists("health", exists);

                _bShowInTactical = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bShowInTactical", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bShowInTactical", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bShowInTactical", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bShowInTactical"));
                }
                SetPropertyExists("bShowInTactical", exists);
                _isMassInfinite = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "isMassInfinite", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("isMassInfinite", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("isMassInfinite", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "isMassInfinite"));
                }
                SetPropertyExists("isMassInfinite", exists);
                _bCanAddViaBattleEditorSlider = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bCanAddViaBattleEditorSlider", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bCanAddViaBattleEditorSlider", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bCanAddViaBattleEditorSlider", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bCanAddViaBattleEditorSlider"));
                }
                SetPropertyExists("bCanAddViaBattleEditorSlider", exists);

                _deathLinearVelocity = ParseHelpers.GetVector3DFromVD2Data(DataXMLDoc, "deathLinearVelocity", out exists);
                _deathLinearVelocity.OnElementChanged += deathLinearVelocity_OnElementChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("deathLinearVelocity", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("deathLinearVelocity", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "deathLinearVelocity"));
                }
                SetPropertyExists("deathLinearVelocity", exists);

                _deathSpawn = DataStructureParseHelpers.GetdeathSpawnDataStructureFromVD2Data(this, DataXMLDoc, out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("deathSpawn", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("deathSpawn", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "deathSpawn"));
                }
                SetPropertyExists("deathSpawn", exists);

                _baby = new ObservableCollection <VD2DataStructure>(DataStructureParseHelpers.GetbabyDataStructureListFromVD2Data(this, DataXMLDoc, out exists));
                _baby.CollectionChanged += OnbabyChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("baby", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("baby", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "baby"));
                }
                SetPropertyExists("baby", exists);
                base.LoadDataFromXML();
            }
        }
        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);

                _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);
                _name = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "name", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("name", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("name", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "name"));
                }
                SetPropertyExists("name", 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);
                _soundID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "soundID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("soundID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("soundID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "soundID"));
                }
                SetPropertyExists("soundID", exists);

                _proximityDistance = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "proximityDistance", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("proximityDistance", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("proximityDistance", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "proximityDistance"));
                }
                SetPropertyExists("proximityDistance", exists);

                _moveAwayTimeDuration = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "moveAwayTimeDuration", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("moveAwayTimeDuration", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("moveAwayTimeDuration", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "moveAwayTimeDuration"));
                }
                SetPropertyExists("moveAwayTimeDuration", exists);

                _bOpenOnProximity = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bOpenOnProximity", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bOpenOnProximity", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bOpenOnProximity", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bOpenOnProximity"));
                }
                SetPropertyExists("bOpenOnProximity", exists);

                _translateVector = ParseHelpers.GetVector3DFromVD2Data(DataXMLDoc, "translateVector", out exists);
                _translateVector.OnElementChanged += translateVector_OnElementChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("translateVector", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("translateVector", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "translateVector"));
                }
                SetPropertyExists("translateVector", exists);

                base.LoadDataFromXML();
            }
        }
Exemple #12
0
        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);

                _displayName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "displayName", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("displayName", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("displayName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "displayName"));
                }
                SetPropertyExists("displayName", exists);
                _upgradeCategory = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "upgradeCategory", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("upgradeCategory", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("upgradeCategory", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "upgradeCategory"));
                }
                SetPropertyExists("upgradeCategory", exists);
                _upgradeType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "upgradeType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("upgradeType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("upgradeType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "upgradeType"));
                }
                SetPropertyExists("upgradeType", exists);
                _shipActiveUpgradeType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "shipActiveUpgradeType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("shipActiveUpgradeType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("shipActiveUpgradeType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "shipActiveUpgradeType"));
                }
                SetPropertyExists("shipActiveUpgradeType", exists);
                _imageSet = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "imageSet", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("imageSet", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("imageSet", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "imageSet"));
                }
                SetPropertyExists("imageSet", exists);
                _image = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "image", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("image", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("image", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "image"));
                }
                SetPropertyExists("image", exists);
                _particleSystemName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "particleSystemName", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("particleSystemName", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("particleSystemName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "particleSystemName"));
                }
                SetPropertyExists("particleSystemName", exists);
                _shieldObjectID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "shieldObjectID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("shieldObjectID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("shieldObjectID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "shieldObjectID"));
                }
                SetPropertyExists("shieldObjectID", exists);
                _activeSoundID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "activeSoundID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("activeSoundID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("activeSoundID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "activeSoundID"));
                }
                SetPropertyExists("activeSoundID", exists);
                _missileID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "missileID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("missileID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("missileID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "missileID"));
                }
                SetPropertyExists("missileID", exists);
                _platformObjectID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "platformObjectID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("platformObjectID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("platformObjectID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "platformObjectID"));
                }
                SetPropertyExists("platformObjectID", exists);
                _shipID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "shipID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("shipID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("shipID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "shipID"));
                }
                SetPropertyExists("shipID", exists);

                _description = new ObservableCollection <string>(ParseHelpers.GetStringListFromVD2Data(DataXMLDoc, "description", out exists));
                _description.CollectionChanged += OndescriptionChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("description", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("description", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "description"));
                }
                SetPropertyExists("description", exists);

                _cost = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "cost", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("cost", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("cost", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "cost"));
                }
                SetPropertyExists("cost", exists);
                _rechargeTime = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "rechargeTime", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("rechargeTime", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("rechargeTime", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "rechargeTime"));
                }
                SetPropertyExists("rechargeTime", exists);

                _addCostAsPercentOfShip = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "addCostAsPercentOfShip", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("addCostAsPercentOfShip", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("addCostAsPercentOfShip", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "addCostAsPercentOfShip"));
                }
                SetPropertyExists("addCostAsPercentOfShip", exists);
                _durationTime = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "durationTime", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("durationTime", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("durationTime", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "durationTime"));
                }
                SetPropertyExists("durationTime", exists);
                _healthShieldRechargePercent = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "healthShieldRechargePercent", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("healthShieldRechargePercent", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("healthShieldRechargePercent", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "healthShieldRechargePercent"));
                }
                SetPropertyExists("healthShieldRechargePercent", exists);
                _maneuveringMultiplier = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "maneuveringMultiplier", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("maneuveringMultiplier", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("maneuveringMultiplier", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "maneuveringMultiplier"));
                }
                SetPropertyExists("maneuveringMultiplier", exists);

                _bIllegalUpgrade = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bIllegalUpgrade", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bIllegalUpgrade", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bIllegalUpgrade", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bIllegalUpgrade"));
                }
                SetPropertyExists("bIllegalUpgrade", exists);
                _bOneAtATimeUpgrade = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bOneAtATimeUpgrade", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bOneAtATimeUpgrade", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bOneAtATimeUpgrade", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bOneAtATimeUpgrade"));
                }
                SetPropertyExists("bOneAtATimeUpgrade", exists);
                _bAlwaysAvailableUpgrade = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bAlwaysAvailableUpgrade", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bAlwaysAvailableUpgrade", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bAlwaysAvailableUpgrade", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bAlwaysAvailableUpgrade"));
                }
                SetPropertyExists("bAlwaysAvailableUpgrade", exists);

                base.LoadDataFromXML();
            }
        }
        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();
            }
        }
Exemple #14
0
        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);

                _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);
                _name = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "name", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("name", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("name", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "name"));
                }
                SetPropertyExists("name", exists);
                _faction = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "faction", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("faction", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("faction", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "faction"));
                }
                SetPropertyExists("faction", 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);
                _wireframeMaterial = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "wireframeMaterial", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("wireframeMaterial", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("wireframeMaterial", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "wireframeMaterial"));
                }
                SetPropertyExists("wireframeMaterial", 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);
                _collisionShape = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "collisionShape", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("collisionShape", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("collisionShape", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "collisionShape"));
                }
                SetPropertyExists("collisionShape", exists);
                _gateInParticleSystem = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "gateInParticleSystem", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("gateInParticleSystem", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("gateInParticleSystem", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "gateInParticleSystem"));
                }
                SetPropertyExists("gateInParticleSystem", exists);
                _gateOutParticleSystem = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "gateOutParticleSystem", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("gateOutParticleSystem", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("gateOutParticleSystem", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "gateOutParticleSystem"));
                }
                SetPropertyExists("gateOutParticleSystem", exists);

                _descriptionText = new ObservableCollection <string>(ParseHelpers.GetStringListFromVD2Data(DataXMLDoc, "descriptionText", out exists));
                _descriptionText.CollectionChanged += OndescriptionTextChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("descriptionText", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("descriptionText", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "descriptionText"));
                }
                SetPropertyExists("descriptionText", exists);

                _rockSubPosition = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "rockSubPosition", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("rockSubPosition", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("rockSubPosition", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "rockSubPosition"));
                }
                SetPropertyExists("rockSubPosition", exists);

                _health = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "health", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("health", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("health", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "health"));
                }
                SetPropertyExists("health", exists);
                _cruiseSpeed = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "cruiseSpeed", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("cruiseSpeed", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("cruiseSpeed", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "cruiseSpeed"));
                }
                SetPropertyExists("cruiseSpeed", exists);
                _timeTillCruise = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "timeTillCruise", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("timeTillCruise", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("timeTillCruise", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "timeTillCruise"));
                }
                SetPropertyExists("timeTillCruise", exists);
                _yaw = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "yaw", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("yaw", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("yaw", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "yaw"));
                }
                SetPropertyExists("yaw", exists);
                _pitch = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "pitch", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("pitch", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("pitch", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "pitch"));
                }
                SetPropertyExists("pitch", exists);
                _roll = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "roll", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("roll", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("roll", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "roll"));
                }
                SetPropertyExists("roll", exists);

                _bNoShow = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bNoShow", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bNoShow", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bNoShow", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bNoShow"));
                }
                SetPropertyExists("bNoShow", exists);
                _bShowInTactical = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bShowInTactical", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bShowInTactical", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bShowInTactical", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bShowInTactical"));
                }
                SetPropertyExists("bShowInTactical", exists);
                _isMassInfinite = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "isMassInfinite", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("isMassInfinite", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("isMassInfinite", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "isMassInfinite"));
                }
                SetPropertyExists("isMassInfinite", exists);

                _cargoBay = DataStructureParseHelpers.GetcargoBayDataStructureFromVD2Data(this, DataXMLDoc, out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("cargoBay", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("cargoBay", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "cargoBay"));
                }
                SetPropertyExists("cargoBay", exists);
                _gateCollision = DataStructureParseHelpers.GetgateCollisionDataStructureFromVD2Data(this, DataXMLDoc, out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("gateCollision", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("gateCollision", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "gateCollision"));
                }
                SetPropertyExists("gateCollision", exists);

                base.LoadDataFromXML();
            }
        }
Exemple #15
0
        public override void LoadDataFromXML()
        {
            bool exists = false;

            if (DataXMLDoc != null)
            {
                _weaponID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "weaponID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("weaponID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("weaponID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(weaponID, "weaponID"));
                }
                SetPropertyExists("weaponID", exists);

                _weaponType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "weaponType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("weaponType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("weaponType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "weaponType"));
                }
                SetPropertyExists("weaponType", exists);
                _name = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "name", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("name", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("name", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "name"));
                }
                SetPropertyExists("name", exists);
                _turretWeapon = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "turretWeapon", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("turretWeapon", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("turretWeapon", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "turretWeapon"));
                }
                SetPropertyExists("turretWeapon", exists);
                _hardpointID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "hardpointID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("hardpointID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("hardpointID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "hardpointID"));
                }
                SetPropertyExists("hardpointID", exists);
                _linkedMovingElement = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "linkedMovingElement", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("linkedMovingElement", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("linkedMovingElement", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "linkedMovingElement"));
                }
                SetPropertyExists("linkedMovingElement", 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);
                _turnSoundID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "turnSoundID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("turnSoundID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("turnSoundID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "turnSoundID"));
                }
                SetPropertyExists("turnSoundID", exists);

                _mineQuota = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "mineQuota", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("mineQuota", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("mineQuota", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "mineQuota"));
                }
                SetPropertyExists("mineQuota", exists);

                _barrelDelay = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "barrelDelay", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("barrelDelay", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("barrelDelay", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "barrelDelay"));
                }
                SetPropertyExists("barrelDelay", exists);
                _pitchMax = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "pitchMax", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("pitchMax", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("pitchMax", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "pitchMax"));
                }
                SetPropertyExists("pitchMax", exists);
                _dMoveSpeed = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "dMoveSpeed", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("dMoveSpeed", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("dMoveSpeed", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "dMoveSpeed"));
                }
                SetPropertyExists("dMoveSpeed", exists);

                _bAlwaysShowInTactical = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bAlwaysShowInTactical", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bAlwaysShowInTactical", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bAlwaysShowInTactical", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bAlwaysShowInTactical"));
                }
                SetPropertyExists("bAlwaysShowInTactical", exists);
                _bPhysicalBody = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bPhysicalBody", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bPhysicalBody", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bPhysicalBody", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bPhysicalBody"));
                }
                SetPropertyExists("bPhysicalBody", exists);
                _bInvisibleTurret = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bInvisibleTurret", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bInvisibleTurret", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bInvisibleTurret", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bInvisibleTurret"));
                }
                SetPropertyExists("bInvisibleTurret", exists);
                _bOssilateTargetAimNodeOffset = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bOssilateTargetAimNodeOffset", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bOssilateTargetAimNodeOffset", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bOssilateTargetAimNodeOffset", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bOssilateTargetAimNodeOffset"));
                }
                SetPropertyExists("bOssilateTargetAimNodeOffset", exists);

                _turretViewPos = ParseHelpers.GetVector3DFromVD2Data(DataXMLDoc, "turretViewPos", out exists);
                _turretViewPos.OnElementChanged += turretViewPos_OnElementChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("turretViewPos", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("turretViewPos", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "turretViewPos"));
                }
                SetPropertyExists("turretViewPos", exists);

                _weaponDirection = DataStructureParseHelpers.GetweaponDirectionDataStructureFromVD2Data(this, DataXMLDoc, out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("weaponDirection", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("weaponDirection", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "weaponDirection"));
                }
                SetPropertyExists("weaponDirection", exists);
                _targetPriorityList = DataStructureParseHelpers.GettargetPriorityListDataStructureFromVD2Data(this, DataXMLDoc, out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("targetPriorityList", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("targetPriorityList", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "targetPriorityList"));
                }
                SetPropertyExists("targetPriorityList", exists);

                _turretBarrel = new ObservableCollection <VD2DataStructure>(DataStructureParseHelpers.GetturretBarrelDataStructureListFromVD2Data(this, DataXMLDoc, out exists));
                _turretBarrel.CollectionChanged += OnturretBarrelChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("turretBarrel", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("turretBarrel", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "turretBarrel"));
                }
                SetPropertyExists("turretBarrel", exists);
                base.LoadDataFromXML();
            }
        }
        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);

                _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);
                _mineType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "mineType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("mineType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("mineType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "mineType"));
                }
                SetPropertyExists("mineType", 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);
                _minimumShipClass = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "minimumShipClass", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("minimumShipClass", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("minimumShipClass", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "minimumShipClass"));
                }
                SetPropertyExists("minimumShipClass", exists);

                _detectionProximity = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "detectionProximity", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("detectionProximity", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("detectionProximity", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "detectionProximity"));
                }
                SetPropertyExists("detectionProximity", exists);
                _weaponPush = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "weaponPush", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("weaponPush", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("weaponPush", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "weaponPush"));
                }
                SetPropertyExists("weaponPush", exists);
                _renderingDistance = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "renderingDistance", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("renderingDistance", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("renderingDistance", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "renderingDistance"));
                }
                SetPropertyExists("renderingDistance", exists);

                _cruiseSpeed = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "cruiseSpeed", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("cruiseSpeed", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("cruiseSpeed", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "cruiseSpeed"));
                }
                SetPropertyExists("cruiseSpeed", exists);
                _timeTillCruise = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "timeTillCruise", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("timeTillCruise", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("timeTillCruise", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "timeTillCruise"));
                }
                SetPropertyExists("timeTillCruise", exists);
                _initialVelocity = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "initialVelocity", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("initialVelocity", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("initialVelocity", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "initialVelocity"));
                }
                SetPropertyExists("initialVelocity", 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);
                _timeTillActive = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "timeTillActive", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("timeTillActive", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("timeTillActive", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "timeTillActive"));
                }
                SetPropertyExists("timeTillActive", 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);
                _health = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "health", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("health", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("health", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "health"));
                }
                SetPropertyExists("health", exists);
                _yaw = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "yaw", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("yaw", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("yaw", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "yaw"));
                }
                SetPropertyExists("yaw", exists);
                _pitch = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "pitch", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("pitch", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("pitch", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "pitch"));
                }
                SetPropertyExists("pitch", exists);
                _roll = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "roll", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("roll", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("roll", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "roll"));
                }
                SetPropertyExists("roll", exists);

                _bUseParentTarget = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bUseParentTarget", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bUseParentTarget", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bUseParentTarget", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bUseParentTarget"));
                }
                SetPropertyExists("bUseParentTarget", exists);
                _bSpinner = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bSpinner", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bSpinner", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bSpinner", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bSpinner"));
                }
                SetPropertyExists("bSpinner", exists);
                _bKeepTarget = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bKeepTarget", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bKeepTarget", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bKeepTarget", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bKeepTarget"));
                }
                SetPropertyExists("bKeepTarget", exists);
                _bCheckFriendOrFoe = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bCheckFriendOrFoe", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bCheckFriendOrFoe", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bCheckFriendOrFoe", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bCheckFriendOrFoe"));
                }
                SetPropertyExists("bCheckFriendOrFoe", exists);
                _bCanAddViaBattleEditorSlider = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bCanAddViaBattleEditorSlider", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bCanAddViaBattleEditorSlider", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bCanAddViaBattleEditorSlider", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bCanAddViaBattleEditorSlider"));
                }
                SetPropertyExists("bCanAddViaBattleEditorSlider", 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);
                _bHeatMine = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "bHeatMine", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("bHeatMine", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("bHeatMine", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "bHeatMine"));
                }
                SetPropertyExists("bHeatMine", exists);

                _mirv = DataStructureParseHelpers.GetmirvDataStructureFromVD2Data(this, DataXMLDoc, out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("mirv", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("mirv", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "mirv"));
                }
                SetPropertyExists("mirv", exists);

                base.LoadDataFromXML();
            }
        }