From 156ce5284518b8b4dceda0eb0a973930a1625b29 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 20 Jul 2017 18:10:16 -0600 Subject: [PATCH] Closes #1478 This addresses code feedback in the previously deleted pull request --- CHANGELOG.md | 1 + TShockAPI/StatTracker.cs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91b371a2..d7ab5308 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * Fixed saving when one player is one the server and another one joins (@MarioE) * Fixed /spawnmob not spawning negative IDs (@MarioE) * Validated tile placement on PlaceObject; clients can no longer place frames, paintings etc with dirt blocks (@bartico6, @ProfessorXZ) +* Updated to new stat tracking system with more data so we can actually make informed software decisions (Jordan Coulam) ## TShock 4.3.24 * API: Changed `PlayerHooks` permission hook mechanisms to allow negation from hooks (@deadsurgeon42) diff --git a/TShockAPI/StatTracker.cs b/TShockAPI/StatTracker.cs index d1c01c1c..47e5d2cc 100644 --- a/TShockAPI/StatTracker.cs +++ b/TShockAPI/StatTracker.cs @@ -160,10 +160,10 @@ namespace TShockAPI { if (plugins != null) { - return plugins;//Return early + return plugins; //Return early } - plugins = new PluginItem[ServerApi.Plugins.Count];//Initialize with enough room to store the ammount of plugins loaded. + plugins = new PluginItem[ServerApi.Plugins.Count]; //Initialize with enough room to store the ammount of plugins loaded. for (var i = 0; i < ServerApi.Plugins.Count; i++) { var pluginItem = new PluginItem(); @@ -181,10 +181,10 @@ namespace TShockAPI { if (totalMem != 0) { - return totalMem;//Return early + return totalMem; //Return early } - if (isMono)//Set totalMem so it can be returned later + if (isMono) //Set totalMem so it can be returned later { var pc = new PerformanceCounter("Mono Memory", "Total Physical Memory"); totalMem = (pc.RawValue / 1024 / 1024 / 1024);