Skip to content

Commit 1a91c90

Browse files
committed
Fix for debug log spam
1 parent f568dfb commit 1a91c90

File tree

8 files changed

+36
-2
lines changed

8 files changed

+36
-2
lines changed
27.2 KB
Binary file not shown.
1023 Bytes
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014 Xaiier
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
342 Bytes
Loading
395 Bytes
Loading

TimeControl/TC.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class TC
1313

1414
private static string logPrefix = MOD + "(" + VERSION + "): ";
1515

16-
internal static bool logDebugMessages = true;
16+
internal static bool logDebugMessages = false;
1717

1818
internal static void LogDebug(string _string)
1919
{

TimeControl/TimeControl.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ private void Update()
260260

261261
setWarpLevels(Settings.warpLevels);
262262

263+
// Why is this updated every frame?
263264
for (int i = 0; i < Settings.warpLevels; i++)
264265
{
265266
timeWarp.warpRates[i] = parseSTOI(Settings.customWarpRates[i]);

TimeControl/TimeControlSettings.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ internal class Settings : MonoBehaviour
4040
internal static Boolean useStockToolbar = true;
4141
internal static Boolean useBlizzyToolbar = true;
4242

43+
internal static bool logDebugMessages = false;
44+
4345
//Options
4446
internal static int mode = 0;
4547
internal static Boolean camFix = true;
@@ -160,6 +162,9 @@ private void buildConfig(bool rebuildRails)
160162
internalData.AddValue("fpsMinSlider", fpsMinSlider);
161163

162164
internalData.AddValue("showFPS", showFPS);
165+
166+
internalData.AddValue("logDebugMessages", logDebugMessages);
167+
163168
ConfigNode fpsPositionNode = internalData.AddNode("fpsPosition");
164169
fpsPositionNode.AddValue("x", fpsPosition.xMin);
165170
fpsPositionNode.AddValue("y", fpsPosition.yMin);
@@ -247,8 +252,12 @@ private void loadConfig()
247252
camFix = bool.Parse(internalData.GetValue("camFix"));
248253
fpsKeeperActive = bool.Parse(internalData.GetValue("fpsKeeperActive"));
249254
fpsMinSlider = int.Parse(internalData.GetValue("fpsMinSlider"));
250-
255+
251256
showFPS = bool.Parse(internalData.GetValue("showFPS"));
257+
258+
logDebugMessages = bool.Parse(internalData.GetValue("logDebugMessages"));
259+
TC.logDebugMessages = logDebugMessages;
260+
252261
ConfigNode fpsPositionNode = internalData.GetNode("fpsPosition");
253262
fpsPosition.xMin = float.Parse(fpsPositionNode.GetValue("x"));
254263
fpsPosition.yMin = float.Parse(fpsPositionNode.GetValue("y"));
@@ -340,6 +349,9 @@ private void saveConfig()
340349
internalData.SetValue("fpsMinSlider", fpsMinSlider.ToString());
341350

342351
internalData.SetValue("showFPS", showFPS.ToString());
352+
353+
internalData.SetValue("logDebugMessages", logDebugMessages.ToString());
354+
343355
ConfigNode fpsPositionNode = internalData.GetNode("fpsPosition");
344356
fpsPositionNode.SetValue("x", fpsPosition.xMin.ToString());
345357
fpsPositionNode.SetValue("y", fpsPosition.yMin.ToString());

0 commit comments

Comments
 (0)