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:
@@ -44,7 +44,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
foreach (XElement subElement in element.Elements())
|
||||
{
|
||||
if (subElement.Name.ToString().ToLower() != "attack") continue;
|
||||
if (subElement.Name.ToString().ToLowerInvariant() != "attack") continue;
|
||||
attack = new Attack(subElement);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Barotrauma.Items.Components
|
||||
InvSlotType allowedSlot = InvSlotType.None;
|
||||
foreach (string slot in slots)
|
||||
{
|
||||
if (slot.ToLower()=="bothhands")
|
||||
if (slot.ToLowerInvariant() == "bothhands")
|
||||
{
|
||||
allowedSlot = InvSlotType.LeftHand | InvSlotType.RightHand;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Barotrauma.Items.Components
|
||||
public Propulsion(Item item, XElement element)
|
||||
: base(item,element)
|
||||
{
|
||||
switch (ToolBox.GetAttributeString(element, "usablein", "air").ToLower())
|
||||
switch (ToolBox.GetAttributeString(element, "usablein", "air").ToLowerInvariant())
|
||||
{
|
||||
case "air":
|
||||
usableIn = ParticlePrefab.DrawTargetType.Air;
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Barotrauma.Items.Components
|
||||
fixableEntities = new List<string>();
|
||||
foreach (XElement subElement in element.Elements())
|
||||
{
|
||||
switch (subElement.Name.ToString().ToLower())
|
||||
switch (subElement.Name.ToString().ToLowerInvariant())
|
||||
{
|
||||
case "fixable":
|
||||
fixableEntities.Add(subElement.Attribute("name").Value);
|
||||
|
||||
Reference in New Issue
Block a user