public void ToWorkshop(WorkshopBuilder builder, List <LobbySetting> allSettings) { builder.AppendKeywordLine("heroes"); builder.AppendLine("{"); builder.Indent(); if (General != null) { builder.AppendKeywordLine("General"); builder.AppendLine("{"); builder.Indent(); General.ToWorkshop(builder, allSettings); builder.Outdent(); builder.AppendLine("}"); } if (Team1 != null) { builder.AppendKeywordLine("Team 1"); builder.AppendLine("{"); builder.Indent(); Team1.ToWorkshop(builder, allSettings); builder.Outdent(); builder.AppendLine("}"); } if (Team2 != null) { builder.AppendKeywordLine("Team 2"); builder.AppendLine("{"); builder.Indent(); Team2.ToWorkshop(builder, allSettings); builder.Outdent(); builder.AppendLine("}"); } builder.Outdent(); builder.AppendLine("}"); }