public override void PrettyWrite(IPrettyWriter iw)
 {
     iw.Append(Name);
     iw.FutureIndent++;
     iw.AppendLine($"\nversion: {Version}");
     iw.AppendLine($"ID: {Id}");
     BlockHeadersInfo.PrettyWrite(iw);
     iw.Append($"\n{SaveGameHeaders.Count} headers:");
     EnumerablePrettyWriteHelper(SaveGameHeaders, iw, false);
     SaveHeader.PrettyWrite(iw);
     iw.AppendLine();
     if (AdjacencyList != null)
     {
         iw.Append("adjacents: ");
         EnumerablePrettyWriteHelper(AdjacencyList, iw, false);
     }
     if (LightStyleList != null)
     {
         iw.Append("light styles: ");
         EnumerablePrettyWriteHelper(LightStyleList, iw, false);
     }
     iw.Append($"{Blocks.Count} blocks:");
     EnumerablePrettyWriteHelper(Blocks, iw);             // add last field bool
     iw.FutureIndent--;
 }
 public override void PrettyWrite(IPrettyWriter pw)
 {
     Debug.Assert(Tables.Count > 0, "there's no tables hmmmmmmmmmmmm");
     pw.Append($"{Tables.Count} send table{(Tables.Count > 1 ? "s" : "")}:");
     pw.FutureIndent++;
     foreach (SendTable sendTable in Tables)
     {
         pw.AppendLine();
         sendTable.PrettyWrite(pw);
     }
     pw.FutureIndent--;
     pw.AppendLine();
     if ((ServerClasses?.Count ?? 0) > 0)
     {
         pw.Append($"{ServerClasses!.Count} class{(ServerClasses.Count > 1 ? "es" : "")}:");
         pw.FutureIndent++;
         foreach (ServerClass classInfo in ServerClasses)
         {
             pw.AppendLine();
             classInfo.PrettyWrite(pw);
         }
         pw.FutureIndent--;
     }
     else
     {
         pw.Append("no classes");
     }
 }
示例#3
0
 public override void PrettyWrite(IPrettyWriter pw)
 {
     if (EntryData != null)
     {
         if ((EntryData.ContentsKnown && !EntryData.InlineToString) || (EntryData.InlineToString && TableRef.TableEntries.Count == 1))
         {
             pw.Append(Name);
             if (EntryData.InlineToString)
             {
                 pw.Append(": ");
                 EntryData.PrettyWrite(pw);
             }
             else
             {
                 pw.FutureIndent++;
                 pw.AppendLine();
                 EntryData.PrettyWrite(pw);
                 pw.FutureIndent--;
             }
         }
         else
         {
             pw.Append(Name.PadRight(PadLength + 2, '.'));
             EntryData.PrettyWrite(pw);
         }
     }
     else
     {
         pw.Append(Name);
     }
 }
示例#4
0
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.AppendLine($"name: {TableName}");
     pw.AppendLine($"max entries: {MaxEntries}");
     pw.AppendLine($"number of entries: {NumEntries}");
     pw.AppendLine($"user data fixed size: {UserDataFixedSize}");
     pw.AppendLine($"user data size: {UserDataSize}");
     pw.AppendLine($"user data size in bits: {UserDataSizeBits}");
     if (DemoRef.Header.NetworkProtocol >= 15)
     {
         pw.AppendLine($"flags: {Flags}");
     }
     pw.Append("table update:");
     pw.FutureIndent++;
     pw.AppendLine();
     if (TableUpdates == null)
     {
         pw.Append("table update could not be parsed");
     }
     else
     {
         TableUpdates.PrettyWrite(pw);
     }
     pw.FutureIndent--;
 }
示例#5
0
 public override void PrettyWrite(IPrettyWriter iw)
 {
     iw.Append(Name);
     iw.FutureIndent++;
     iw.Append($"\nmws: {Id}");
     iw.FutureIndent--;
 }
示例#6
0
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.Append($"name: {Name}");
     if (Data != null)
     {
         pw.Append($", data: {Data}");
     }
 }
示例#7
0
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.Append(Command);
     if (ButtonCode.HasValue)
     {
         pw.Append($"   ({ButtonCode.Value})");
     }
 }
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.Append($"destination: {Destination}");
     for (int i = 0; i < MessageCount; i++)
     {
         pw.Append($"\nmessage {i + 1}: {Messages[i].Replace("\n", @"\n")}");
     }
 }
        public override void PrettyWrite(IPrettyWriter pw)
        {
            pw.Append(SoundName != null
                                ? $"sound: {SoundName}"
                                : "sound index:");

            pw.Append($" [{SoundIndex}]");
        }
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.AppendLine($"codec: {Codec}");
     pw.Append($"quality: {Quality}");
     if (Quality == 255)
     {
         pw.Append($"\nunknown: {Unknown}");
     }
 }
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.Append($"engine tick: {EngineTick}");
     if (DemoInfo.Game != SourceGame.HL2_OE)
     {
         pw.AppendLine($"\nhost frame time: {HostFrameTime}");
         pw.Append($"host frame time std dev: {HostFrameTimeStdDev}");
     }
 }
        public override void PrettyWrite(IPrettyWriter pw)
        {
            int tmp = pw.LastLineLength;

            pw.Append(FProp.TypeString());
            pw.PadLastLine(tmp + 12, ' ');
            pw.Append($"{FProp.Name}: ");
            pw.Append(PropToString());
        }
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.Append(TableName != null ? $"table: {TableName}" : "table id:");
     pw.AppendLine($" ({TableId})");
     pw.AppendLine($"number of changed entries: {ChangedEntriesCount}");
     pw.Append("table update:");
     pw.FutureIndent++;
     pw.AppendLine();
     TableUpdates.PrettyWrite(pw);
     pw.FutureIndent--;
 }
示例#14
0
 public override void PrettyWrite(IPrettyWriter iw)
 {
     iw.Append(HasDataMap ? "" : "*");
     iw.Append(Name);
     if (LinkedNames.Any())
     {
         iw.Append(" " + LinkedNames.SequenceToString(start: "(", end: ")"));
     }
     if (Children.Any())
     {
         EnumerablePrettyWriteHelper(Children.Values, iw);
     }
 }
示例#15
0
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.Append("player masks:");
     pw.FutureIndent++;
     for (int i = 0; i < PlayerMasks.Length; i++)
     {
         pw.AppendLine();
         pw.AppendLine($"game rules mask #{i + 1}: {PlayerMasks[i].GameRulesMask}");
         pw.Append($"ban mask #{i + 1}: {PlayerMasks[i].BanMask}");
     }
     pw.FutureIndent--;
     pw.AppendLine();
     pw.Append($"player mod enable: {PlayerModEnable}");
 }
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.AppendLine($"paint type: {PaintType.ToString()}");
     pw.AppendLine($"handle: {EHandle}");
     pw.AppendLine($"unknown floats: {UnkHf1}, {UnkHf2}");
     pw.AppendLine($"center: {Center}");
     pw.Append($"all {Positions.Length} positions: ");
     pw.FutureIndent++;
     foreach (Vector3 pos in Positions)
     {
         pw.AppendLine();
         pw.Append(pos.ToString());
     }
     pw.FutureIndent--;
 }
示例#17
0
 internal void PrettyWrite(IPrettyWriter iw, bool showClassName)
 {
     if (ParsedFields == null)
     {
         iw.Append($"parsing fields failed for entity class: {ClassMap}");
     }
     else
     {
         if (showClassName)
         {
             iw.Append($"({HeaderProxyName}) ");
         }
         ParsedFields.PrettyWrite(iw);
     }
 }
示例#18
0
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.AppendLine($"command: {Command}");
     pw.AppendLine($"amplitude: {Amplitude}");
     pw.AppendLine($"frequency: {Frequency}");
     pw.Append($"duration: {Duration}");
 }
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.AppendLine($"spectator mode: {SpecMode}");
     pw.AppendLine($"target 1: {Target1}");
     pw.AppendLine($"target 2: {Target2}");
     pw.Append($"unknown: {Unknown}");
 }
		public override void PrettyWrite(IPrettyWriter iw) {
			base.PrettyWrite(iw);
			iw.Append($"\n{EntData.Length} entities:");
#pragma warning disable 8631
			EnumerablePrettyWriteHelper(EntData, iw);
#pragma warning restore 8631
		}
 public override void PrettyWrite(IPrettyWriter iw)
 {
     iw.AppendLine($"m_Conditions: {Conditions.SequenceToString()}");
     iw.AppendLine($"m_CustomInterruptConditions: {CustomInterruptConditions.SequenceToString()}");
     iw.AppendLine($"m_ConditionsPreIgnore: {ConditionsPreIgnore.SequenceToString()}");
     iw.Append($"m_IgnoreConditions: {IgnoreConditions.SequenceToString()}");
 }
示例#22
0
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.AppendLine($"armor: {Armor}");
     pw.AppendLine($"damage taken: {DamageTaken}");
     pw.AppendLine($"bits damage: {BitsDamage}");
     pw.Append($"vec from: {VecFrom:F3}");
 }
示例#23
0
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.AppendLine($"duration: {Duration}");
     pw.AppendLine($"hold time: {HoldTime}");
     pw.AppendLine($"flags: {Flags}");
     pw.Append($"RGBA: {R:D3}, {G:D3}, {B:D3}, {A:D3}");
 }
示例#24
0
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.AppendLine($"portal: {Portal}");
     pw.AppendLine($"portalled: {Portalled}");
     pw.AppendLine($"new position: {NewPosition:F3}");
     pw.Append($"new angles: <{NewAngles.X:F3}°, {NewAngles.Y:F3}°, {NewAngles.Z:F3}°>");
 }
示例#25
0
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.AppendLine($"sign on state: {SignOnState}");
     pw.Append($"spawn count: {SpawnCount}");
     if (DemoInfo.NewDemoProtocol)
     {
         pw.Append($"\nnumber of server players: {NumServerPlayers}");
         if (PlayerNetworkIds != null)
         {
             pw.Append($"\nbyte array of length {PlayerNetworkIds.Length}");
         }
         if (MapName != null)
         {
             pw.Append($"\nmap name: {MapName}");
         }
     }
 }
 public override void PrettyWrite(IPrettyWriter pw)
 {
     pw.Append($"type: {DataType}");
     pw.FutureIndent++;
     pw.AppendLine();
     DataMessage.PrettyWrite(pw);
     pw.FutureIndent--;
 }
示例#27
0
        public override void PrettyWrite(IPrettyWriter pw)
        {
            pw.AppendLine($"position: {Pos:F4}");

            var mgr = DemoRef.StringTablesManager;

            pw.Append(mgr.TableReadable.GetValueOrDefault(TableNames.DecalPreCache)
                                ? $"decal texture: {mgr.Tables[TableNames.DecalPreCache].Entries[DecalTextureIndex]}"
                                : "decal texture index:");
            pw.AppendLine($" [{DecalTextureIndex}]");
            if (EntityIndex.HasValue)
            {
                pw.AppendLine($"entity index: {EntityIndex}");
                pw.AppendLine($"model index: {ModelIndex}");
            }
            pw.Append($"low priority: {LowPriority}");
        }
 public override void PrettyWrite(IPrettyWriter iw)
 {
     iw.Append("CActivityData:");
     iw.FutureIndent++;
     iw.AppendLine();
     iw.Append(Index.HasValue ? $"activity index: {Index.Value}" : $"name: {Name!}");
     iw.FutureIndent--;
 }
示例#29
0
        public override void PrettyWrite(IPrettyWriter pw)
        {
            string trimmed = Str.Trim();

            pw.Append("string: ");
            if (trimmed.Contains("\n"))
            {
                pw.FutureIndent++;
                pw.AppendLine();
                pw.Append(trimmed);
                pw.FutureIndent--;
            }
            else
            {
                pw.Append(trimmed);
            }
        }
示例#30
0
 public override void PrettyWrite(IPrettyWriter iw)
 {
     iw.Append("UtilMap<");
     iw.Append(KeyDesc.FieldType == EMBEDDED ? KeyDesc.EmbeddedMap !.ClassName : KeyDesc.TypeString);
     iw.Append(",");
     iw.Append(ValDesc.FieldType == EMBEDDED ? ValDesc.EmbeddedMap !.ClassName : ValDesc.TypeString);
     iw.Append($">[{Elements.Length}] {Desc.Name}" + (Elements.Length > 0 ? ":" : ""));
     if (Elements.Length > 0)
     {
         iw.FutureIndent++;
         for (int i = 0; i < Elements.Length; i++)
         {
             var(key, value) = Elements[i];
             iw.Append("\n{");
             key.PrettyWriteWithCustomPad(iw);
             iw.Append(",");
             if (ValDesc.FieldType == EMBEDDED)
             {
                 iw.AppendLine();
             }
             value.PrettyWriteWithCustomPad(iw);
             iw.Append("}");
             if (i < Elements.Length - 1)
             {
                 iw.Append(",");
             }
         }
         iw.FutureIndent--;
     }
 }