Using ToLowerInvariant instead of ToLower (the game works for Turkish players now!)

http://www.moserware.com/2008/02/does-your-code-pass-turkey-test.html
This commit is contained in:
Regalis
2016-04-27 17:14:09 +03:00
parent 81ca1a409b
commit d3ab7946a8
52 changed files with 96 additions and 94 deletions
+1 -2
View File
@@ -179,7 +179,7 @@ namespace Barotrauma
GameMain.LightManager.ObstructVision = Character.Controlled != null && Character.Controlled.ObstructVision;
GameMain.LightManager.UpdateLightMap(graphics, spriteBatch, cam);
if (Character.Controlled!=null)
if (Character.Controlled != null)
{
GameMain.LightManager.UpdateObstructVision(graphics, spriteBatch, cam, Character.Controlled.CursorWorldPosition);
}
@@ -194,7 +194,6 @@ namespace Barotrauma
if (Level.Loaded == null)
{
graphics.Clear(new Color(11, 18, 26, 255));
}
else
{
+1 -1
View File
@@ -385,7 +385,7 @@ namespace Barotrauma
XElement modeElement = null;
foreach (XElement element in doc.Root.Elements())
{
if (element.Name.ToString().ToLower() != "gamemode") continue;
if (element.Name.ToString().ToLowerInvariant() != "gamemode") continue;
modeElement = element;
break;
@@ -142,7 +142,7 @@ namespace Barotrauma
return;
}
if (masterServerData.Substring(0,5).ToLower()=="error")
if (masterServerData.Substring(0, 5).ToLowerInvariant() == "error")
{
DebugConsole.ThrowError("Error while connecting to master server ("+masterServerData+")!");