Esempio n. 1
0
        public override bool ReadFromINI(FileFormats.Text.INI iniFile)
        {
            if (!base.ReadFromINI(iniFile)) {
                return false;
            }

            iniFile.GetInteger(ID, "Spread", ref Spread);
            iniFile.GetDouble(ID, "SpreadPercentage", ref SpreadPercentage);
            iniFile.GetInteger(ID, "Growth", ref Growth);
            iniFile.GetDouble(ID, "GrowthPercentage", ref GrowthPercentage);

            iniFile.GetInteger(ID, "Value", ref Value);
            iniFile.GetInteger(ID, "Power", ref Power);

            var ImageIndex = -1;

            iniFile.GetInteger(ID, "Image", ref ImageIndex);

            var lst = CCFactory<OverlayTypeClass, OverlayClass>.Get().FactoryItems;

            switch (ImageIndex) {
                case -1:
                    break;

                case 2:
                    ImageOverlay = new Helpers.WeakRef<OverlayTypeClass>(lst[0x1B]);
                    NumFrames = NumImages = 12;
                    break;

                case 3:
                    ImageOverlay = new Helpers.WeakRef<OverlayTypeClass>(lst[0x7F]);
                    NumFrames = NumImages = 12;
                    NumExtraImages = 8;
                    break;

                case 4:
                    ImageOverlay = new Helpers.WeakRef<OverlayTypeClass>(lst[0x93]);
                    NumFrames = NumImages = 12;
                    NumExtraImages = 8;
                    break;

                case 0:
                case 1:
                default:
                    ImageOverlay = new Helpers.WeakRef<OverlayTypeClass>(lst[0x66]);
                    NumFrames = NumImages = 12;
                    NumExtraImages = 8;
                    break;

            }

            return true;
        }
Esempio n. 2
0
        public override bool ReadFromINI(FileFormats.Text.INI iniFile)
        {
            if (!base.ReadFromINI(iniFile)) {
                return false;
            }

            iniFile.GetInteger(ID, "DamageLevels", ref DamageLevels);

            iniFile.GetBool(ID, "Wall", ref Wall);
            iniFile.GetBool(ID, "Tiberium", ref Tiberium);
            iniFile.GetBool(ID, "Crate", ref Crate);
            iniFile.GetBool(ID, "CrateTrigger", ref CrateTrigger);
            iniFile.GetBool(ID, "NoUseLandTileType", ref NoUseTileLandType);
            iniFile.GetBool(ID, "IsVeinholeMonster", ref IsVeinholeMonster);
            iniFile.GetBool(ID, "IsVeins", ref IsVeins);
            iniFile.GetBool(ID, "Explodes", ref Explodes);
            iniFile.GetBool(ID, "ChainReaction", ref ChainReaction);
            iniFile.GetBool(ID, "Overrides", ref Overrides);
            iniFile.GetBool(ID, "DrawFlat", ref DrawFlat);
            iniFile.GetBool(ID, "IsRubble", ref IsRubble);
            iniFile.GetBool(ID, "IsARock", ref IsARock);

            return true;
        }
Esempio n. 3
0
        public override bool ReadFromINI(FileFormats.Text.INI iniFile)
        {
            if (!base.ReadFromINI(iniFile)) {
                return false;
            }

            iniFile.GetInteger(ID, "Strength", out Strength, Strength);
            iniFile.GetString(ID, "Image", out ImageName, ImageName);
            iniFile.GetString(ID, "AlphaImage", out AlphaImageName, AlphaImageName);
            iniFile.GetBool(ID, "AlternateArcticArt", out AlternateArcticArt, AlternateArcticArt);
            iniFile.GetBool(ID, "Crushable", out Crushable, Crushable);
            iniFile.GetBool(ID, "Bombable", out Bombable, Bombable);
            iniFile.GetBool(ID, "RadarInvisible", out RadarInvisible, RadarInvisible);
            iniFile.GetBool(ID, "Selectable", out Selectable, Selectable);
            iniFile.GetBool(ID, "LegalTarget", out LegalTarget, LegalTarget);
            iniFile.GetBool(ID, "Insignificant", out Insignificant, Insignificant);
            iniFile.GetBool(ID, "Immune", out Immune, Immune);
            iniFile.GetBool(ID, "HasRadialIndicator", out HasRadialIndicator, HasRadialIndicator);
            iniFile.GetBool(ID, "IgnoresFirestorm", out IgnoresFirestorm, IgnoresFirestorm);

            FileFormats.Text.INI.Art_INI.GetBool(ID, "UseLineTrail", ref UseLineTrail);
            FileFormats.Text.INI.Art_INI.GetBool(ID, "Theater", ref Theater);
            FileFormats.Text.INI.Art_INI.GetBool(ID, "NewTheater", ref NewTheater);
            FileFormats.Text.INI.Art_INI.GetBool(ID, "Voxel", ref Voxel);

            if (!Voxel) {
                Load2DArt();
            }

            if (AlphaImageName.Length > 0) {
                AlphaImage = new Helpers.WeakRef<FileFormats.Binary.SHP>(FileFormats.Binary.SHP.LoadFile(AlphaImageName + ".SHP"));
            } else {
                AlphaImage.Empty();
            }

            return true;
        }