Beispiel #1
0
        void IXleSerializable.WriteData(XleSerializationInfo info)
        {
            if (EntryPoints == null)
            {
                EntryPoints = new List <EntryPoint>();
            }
            while (EntryPoints.Count > 0 && EntryPoints.Last().Location == Point.Zero)
            {
                EntryPoints.RemoveAt(EntryPoints.Count - 1);
            }

            info.Write("MapName", mMapName);
            info.Write("ExtenderName", ExtenderName);

            info.Write("MapID", mMapID);
            info.Write("TileSet", mTileSet);
            info.Write("TileImage", mTileImage);
            info.Write("OutsideTile", mOutsideTile);
            info.Write("Events", mEvents.ToArray());
            info.Write("EntryPoints", EntryPoints);

            if (HasRoofs)
            {
                info.Write("Roofs", Roofs);
            }
            if (HasGuards)
            {
                info.Write("Guards", Guards);
            }

            WriteData(info);
        }
Beispiel #2
0
        void IXleSerializable.WriteData(XleSerializationInfo info)
        {
            List <TileInfo> tiles = new List <TileInfo>();

            if (mTiles.Count == 0)
            {
                info.Write("Tiles", new int[] { });
            }
            else
            {
                tiles.Capacity = mTiles.Keys.Max() + 1;
                for (int i = 0; i < mTiles.Keys.Max() + 1; i++)
                {
                    tiles.Add(TileInfo.Normal);
                }

                foreach (int key in mTiles.Keys)
                {
                    tiles[key] = mTiles[key];
                }

                info.Write("Tiles", tiles.Select(x => (int)x).ToArray(), NumericEncoding.Csv);
            }
            info.Write("TileGroups", TileGroups);
        }
Beispiel #3
0
 public override void Serialize(XleSerializationInfo info, RectangleF value)
 {
     info.Write("X", value.X, true);
     info.Write("Y", value.Y, true);
     info.Write("Width", value.Width, true);
     info.Write("Height", value.Height, true);
 }
Beispiel #4
0
 void IXleSerializable.WriteData(XleSerializationInfo info)
 {
     info.Write("Tiles", Tiles.ToArray(), NumericEncoding.Csv);
     info.Write("AnimationTime", AnimationTime);
     info.WriteEnum("AnimationType", AnimationType, false);
     info.WriteEnum("GroupType", GroupType, false);
     info.Write("AnimateChance", AnimateChance);
 }
Beispiel #5
0
 void IXleSerializable.WriteData(XleSerializationInfo info)
 {
     info.Write("X", X);
     info.Write("Y", Y);
     info.Write("Width", Width);
     info.Write("Height", Height);
     info.Write("RoofData", mData, NumericEncoding.Csv);
 }
Beispiel #6
0
        protected override void WriteData(XleSerializationInfo info)
        {
            base.WriteData(info);

            info.Write("BuyRaftMap", mBuyRaftMap);
            info.Write("BuyRaftX", mBuyRaftPt.X);
            info.Write("BuyRaftY", mBuyRaftPt.Y);
        }
Beispiel #7
0
 void IXleSerializable.WriteData(XleSerializationInfo info)
 {
     info.Write("GuardDefaultAttack", DefaultAttack);
     info.Write("GuardDefaultDefense", DefaultDefense);
     info.Write("GuardDefaultHP", DefaultHP);
     info.Write("GuardDefaultColor", DefaultColor.ToArgb());
     info.Write("Guards", mGuards);
 }
Beispiel #8
0
        protected override void WriteData(XleSerializationInfo info)
        {
            base.WriteData(info);

            info.Write("MapID", MapID);
            info.Write("AskUser", mAsk);
            info.Write("TargetEntryPoint", TargetEntryPoint);
            info.Write("CommandText", mCommandText);
        }
Beispiel #9
0
        void IXleSerializable.WriteData(XleSerializationInfo info)
        {
            info.Write("X", rect.X);
            info.Write("Y", rect.Y);
            info.Write("Width", rect.Width);
            info.Write("Height", rect.Height);
            info.Write("ExtenderName", ExtenderName);

            WriteData(info);
        }
Beispiel #10
0
 protected override void WriteData(XleSerializationInfo info)
 {
     info.Write("Width", mWidth, true);
     info.Write("Height", mHeight, true);
     info.Write("Levels", mLevels, true);
     info.Write("Data", mData, NumericEncoding.Csv);
     info.Write("MaxMonsters", MaxMonsters);
     info.Write("MonsterHealthScale", MonsterHealthScale);
     info.Write("MonsterDamageScale", MonsterDamageScale);
 }
Beispiel #11
0
        void IXleSerializable.WriteData(XleSerializationInfo info)
        {
            info.Write("X", X);
            info.Write("Y", Y);
            info.Write("Color", Color.ToArgb());

            info.Write("HP", HP);
            info.Write("Attack", Attack);
            info.Write("Defense", Defense);
        }
Beispiel #12
0
 void IXleSerializable.WriteData(XleSerializationInfo info)
 {
     info.Write("X", Location.X);
     info.Write("Y", Location.Y);
     info.Write("MapID", MapNumber);
 }
Beispiel #13
0
 protected override void WriteData(XleSerializationInfo info)
 {
     info.Write("RequiredItem", RequiredItem);
     info.Write("ReplacementTile", ReplacementTile);
 }
Beispiel #14
0
 public override void Serialize(XleSerializationInfo info, Point value)
 {
     info.Write("X", value.X, true);
     info.Write("Y", value.Y, true);
 }
Beispiel #15
0
 void IXleSerializable.WriteData(XleSerializationInfo info)
 {
     info.Write("Width", mWidth);
     info.Write("Height", mHeight);
     info.Write("Data", mData);
 }
Beispiel #16
0
 public override void Serialize(XleSerializationInfo info, Size value)
 {
     info.Write("Width", value.Width, true);
     info.Write("Height", value.Height, true);
 }
Beispiel #17
0
 protected override void WriteData(XleSerializationInfo info)
 {
     info.Write("Width", Width);
     info.Write("Height", Height);
     info.Write("MapData", mData, NumericEncoding.Csv);
 }
Beispiel #18
0
 public void WriteData(XleSerializationInfo info)
 {
     info.Write("ID", ID);
     info.Write("Quality", Quality);
 }
Beispiel #19
0
 protected override void WriteData(XleSerializationInfo info)
 {
     info.Write("ContainsItem", mContainsItem);
     info.Write("Contents", mContents);
 }
Beispiel #20
0
        protected override void WriteData(XleSerializationInfo info)
        {
            base.WriteData(info);

            info.Write("Mail", Mail.ToArray());
        }
Beispiel #21
0
        protected override void WriteData(XleSerializationInfo info)
        {
            base.WriteData(info);

            info.Write("AllowedItemTypes", AllowedItemTypes.ToArray());
        }
Beispiel #22
0
 protected override void WriteData(XleSerializationInfo info)
 {
     info.Write("Width", mWidth, true);
     info.Write("Height", mHeight, true);
     info.Write("Data", mData, NumericEncoding.Csv);
 }
Beispiel #23
0
 protected override void WriteData(XleSerializationInfo info)
 {
     info.Write("ShopName", mShopName);
     info.Write("CostFactor", mCostFactor);
 }
Beispiel #24
0
 void IXleSerializable.WriteData(XleSerializationInfo info)
 {
     info.Write("Attributes", atr);
 }
Beispiel #25
0
        void IXleSerializable.WriteData(XleSerializationInfo info)
        {
            if (Cheater)
            {
                info.Write("Cheater", Cheater);
            }

            info.Write("Attributes", mAttributes);
            info.Write("Food", food);
            info.Write("Gold", gold);
            info.Write("GoldInBank", goldBank);
            info.Write("TimeDays", timedays);
            info.Write("TimeQuality", timequality);

            info.Write("OnRaft", onRaft);
            info.Write("Rafts", rafts);

            info.Write("GameSpeed", gamespeed);
            info.Write("Map", map);
            info.Write("LastMap", lastMap);
            info.Write("Dungeon", dungeon);
            info.Write("HP", hp);
            info.Write("Level", level);
            info.Write("ReturnMap", returnMap);
            info.Write("ReturnX", returnX);
            info.Write("ReturnY", returnY);
            info.WriteEnum <Direction>("ReturnFacing", returnFacing, false);
            info.Write("X", x);
            info.Write("Y", y);
            info.Write("DungeonLevel", dungeonLevel);
            info.Write("Facing", (int)faceDirection);

            info.Write("CurrentArmorIndex", currentArmorIndex);
            info.Write("CurrentWeaponIndex", currentWeaponIndex);
            info.Write("Weapons", Weapons);
            info.Write("Armor", Armor);

            info.Write("Item", Items);
            info.Write("Hold", hold);

            info.Write("LastAttacked", lastAttacked);
            info.Write("VaultGold", VaultGold);

            info.Write("Chests", chests);

            info.Write("Loan", loan);                   // loan amount
            info.Write("DueDate", dueDate);             // time in days that the money is due

            info.Write("MailTown", mailTown);

            info.Write("Name", mName);
            info.Write("StoryData", StoryData);
        }
Beispiel #26
0
 void IXleSerializable.WriteData(XleSerializationInfo info)
 {
     info.Write("Items", mItems);
 }
Beispiel #27
0
 void IXleSerializable.WriteData(XleSerializationInfo info)
 {
     info.WriteEnum("Facing", Facing, false);
     info.Write("Location", Location);
     info.Write("DungeonLevel", DungeonLevel);
 }