Skip to content

Commit

Permalink
Better stats
Browse files Browse the repository at this point in the history
  • Loading branch information
AffectedArc07 committed Apr 11, 2024
1 parent 776e31d commit da69f81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions SS13WebMap/CodebaseData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,16 +1015,16 @@ public class CodebaseData {
/// <summary>
/// Sum of total normal layers. This is done here as a static to not cause runtime load.
/// </summary>
private static int TotalNormalLayers = Codebases.Where(x => !x.Value.FancySupport).Sum(x => x.Value.GameMaps.Sum(x => x.Layers.Count));
public static int TotalNormalLayers = Codebases.Sum(x => x.Value.GameMaps.Sum(x => x.Layers.Count));

/// <summary>
/// Sum of total fancy layers, which is the above but counting fancy, then multiplying by 2. This is done here as a static to not cause runtime load.
/// Sum of total pipe layers, which is the above but counting fancy codebases. This is done here as a static to not cause runtime load.
/// </summary>
private static int TotalFancyLayers = Codebases.Where(x => x.Value.FancySupport).Sum(x => x.Value.GameMaps.Sum(x => x.Layers.Count)) * 2;
private static int TotalPipeLayers = Codebases.Where(x => x.Value.FancySupport).Sum(x => x.Value.GameMaps.Sum(x => x.Layers.Count));

/// <summary>
/// Sum of total layers. This is done here as a static to not cause runtime load.
/// </summary>
public static int TotalLayers = TotalNormalLayers + TotalFancyLayers;
public static int TotalLayers = TotalNormalLayers + TotalPipeLayers;
}
}
2 changes: 1 addition & 1 deletion SS13WebMap/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h1 class="display-1 text-white">SS13 WebMap</h1>
<p class="text-white"><b>Created by AffectedArc07</b></p>
<p class="text-white">Special thanks to <b>Letter_N</b> for HTML theming and JS support.</p>
<p class="text-white">Currently holding <b>@CodebaseData.TotalCodebases</b> codebases with <b>@CodebaseData.TotalMaps</b> maps, and a total of <b>@CodebaseData.TotalLayers</b> layers.</p>
<p class="text-white">Currently holding <b>@CodebaseData.TotalCodebases</b> codebases with <b>@CodebaseData.TotalMaps</b> maps, and a total of <b>@CodebaseData.TotalNormalLayers</b> layers (<b>@CodebaseData.TotalLayers</b> if you include pipe layers).</p>
<a class="btn btn-primary" target="_blank" href="https://github.com/AffectedArc07/SS13WebMap"><i class="fab fa-github"></i>&nbsp;&nbsp;GitHub</a>
<a class="btn btn-primary" target="_blank" href="https://github.com/AffectedArc07/SS13WebMap/tree/master/MAP_REQUESTING.MD"><i class="fas fa-folder-plus"></i>&nbsp;&nbsp;How to get your map on here</a>
<a class="btn btn-primary" target="_blank" href="https://onlyfaans.net/"><i class="fas fa-pound-sign"></i>&nbsp;&nbsp;Donate</a>
Expand Down

0 comments on commit da69f81

Please sign in to comment.