Change strings to instanced;

Move the changelog to bottom;
This commit is contained in:
yuyu 2022-10-19 23:20:41 +08:00
parent 69e5e202de
commit 9e4028fb9d
No known key found for this signature in database
2 changed files with 15 additions and 15 deletions

View file

@ -33,12 +33,12 @@ public class ReduceConsoleSpam : Module
/// </summary> /// </summary>
private string _lastStatusText = null; private string _lastStatusText = null;
private static readonly string ResettingObjectText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.47"); private readonly string _resettingObjectText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.47");
private static readonly string LoadingText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.51"); private readonly string _loadingText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.51");
private static readonly string SettlingText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.27"); private readonly string _settlingText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.27");
private static readonly string SavingText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.49"); private readonly string _savingText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.49");
private static readonly string ValidatingText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.73"); private readonly string _validatingText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.73");
private static readonly string FinalizingText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.87"); private readonly string _finalizingText = LanguageManager.Instance.GetTextValue("LegacyWorldGen.87");
/// <summary> /// <summary>
/// Aims to reduce the amount of console spam by filtering out load/save progress /// Aims to reduce the amount of console spam by filtering out load/save progress
@ -67,11 +67,11 @@ public class ReduceConsoleSpam : Module
return false; return false;
} }
if (replace(ResettingObjectText) if (replace(_resettingObjectText)
|| replace(SettlingText) || replace(_settlingText)
|| replace(LoadingText) || replace(_loadingText)
|| replace(SavingText) || replace(_savingText)
|| replace(ValidatingText)) || replace(_validatingText))
return; return;
// try parsing % - [text] - % // try parsing % - [text] - %
@ -92,10 +92,10 @@ public class ReduceConsoleSpam : Module
if (text.Length > 0 && !( if (text.Length > 0 && !(
// relogic has made a mess of this // relogic has made a mess of this
( (
_lastStatusText != ValidatingText _lastStatusText != _validatingText
|| _lastStatusText != SavingText || _lastStatusText != _savingText
) )
&& text == FinalizingText && text == _finalizingText
)) ))
WriteIfChange(text); WriteIfChange(text);

View file

@ -15,7 +15,6 @@ Use past tense when adding new entries; sign your name off when you add or chang
* If there is no section called "Upcoming changes" below this line, please add one with `## Upcoming changes` as the first line, and then a bulleted item directly after with the first change. --> * If there is no section called "Upcoming changes" below this line, please add one with `## Upcoming changes` as the first line, and then a bulleted item directly after with the first change. -->
## Upcoming changes ## Upcoming changes
* Added localization support for console spam reduction. (@KawaiiYuyu)
* Reduced load/save console spam. (@SignatureBeef, @YehnBeep) * Reduced load/save console spam. (@SignatureBeef, @YehnBeep)
* Replaced SQLite library with Microsoft.Data.Sqlite for arm64 support. (@SignatureBeef) * Replaced SQLite library with Microsoft.Data.Sqlite for arm64 support. (@SignatureBeef)
* Initial support for MonoMod hooks on Raspberry Pi (arm64). (@kevzhao2) * Initial support for MonoMod hooks on Raspberry Pi (arm64). (@kevzhao2)
@ -61,6 +60,7 @@ Use past tense when adding new entries; sign your name off when you add or chang
* Added new tile provider. Use `-constileation` or `-c` to use it. Constileation is an alternative tile provider to Tiled and HeapTile. (@SignatureBeef) * Added new tile provider. Use `-constileation` or `-c` to use it. Constileation is an alternative tile provider to Tiled and HeapTile. (@SignatureBeef)
* Fixed an exploit with grass mowing not removing hanging vines. (@punchready) * Fixed an exploit with grass mowing not removing hanging vines. (@punchready)
* Added `-additionalplugins` command line argument to load additional plugins. (@pontaoski) * Added `-additionalplugins` command line argument to load additional plugins. (@pontaoski)
* Added localization support for console spam reduction. (@KawaiiYuyu)
## TShock 4.5.18 ## TShock 4.5.18
* Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@PotatoCider) * Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@PotatoCider)