Change all instances of ToLower() to ToLowerInvariant()
This commit is contained in:
committed by
atlimit8
parent
0a9eb1ff83
commit
5b34af0f12
@@ -92,7 +92,7 @@ namespace OpenRA.Mods.Common.Lint
|
|||||||
if (value == null)
|
if (value == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!dict.ContainsKey(value.ToLower()))
|
if (!dict.ContainsKey(value.ToLowerInvariant()))
|
||||||
emitError("{0}.{1}.{2}: Missing weapon `{3}`."
|
emitError("{0}.{1}.{2}: Missing weapon `{3}`."
|
||||||
.F(actorInfo.Name, traitInfo.GetType().Name, fieldInfo.Name, value));
|
.F(actorInfo.Name, traitInfo.GetType().Name, fieldInfo.Name, value));
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ namespace OpenRA.Mods.Common.Lint
|
|||||||
if (value == null)
|
if (value == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!dict.ContainsKey(value.ToLower()))
|
if (!dict.ContainsKey(value.ToLowerInvariant()))
|
||||||
emitError("{0}.{1}.{2}: Missing voice `{3}`."
|
emitError("{0}.{1}.{2}: Missing voice `{3}`."
|
||||||
.F(actorInfo.Name, traitInfo.GetType().Name, fieldInfo.Name, value));
|
.F(actorInfo.Name, traitInfo.GetType().Name, fieldInfo.Name, value));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
var initialFacing = self.World.Map.FacingBetween(location, self.Location, 0);
|
var initialFacing = self.World.Map.FacingBetween(location, self.Location, 0);
|
||||||
|
|
||||||
// If aircraft, spawn at cruise altitude
|
// If aircraft, spawn at cruise altitude
|
||||||
var aircraftInfo = self.World.Map.Rules.Actors[deliveringActorName.ToLower()].TraitInfoOrDefault<AircraftInfo>();
|
var aircraftInfo = self.World.Map.Rules.Actors[deliveringActorName.ToLowerInvariant()].TraitInfoOrDefault<AircraftInfo>();
|
||||||
if (aircraftInfo != null)
|
if (aircraftInfo != null)
|
||||||
spawn += new WVec(0, 0, aircraftInfo.CruiseAltitude.Length);
|
spawn += new WVec(0, 0, aircraftInfo.CruiseAltitude.Length);
|
||||||
|
|
||||||
|
|||||||
@@ -182,19 +182,19 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
switch (s.Key)
|
switch (s.Key)
|
||||||
{
|
{
|
||||||
case "Intro":
|
case "Intro":
|
||||||
videos.Add(new MiniYamlNode("BackgroundVideo", s.Value.ToLower() + ".vqa"));
|
videos.Add(new MiniYamlNode("BackgroundVideo", s.Value.ToLowerInvariant() + ".vqa"));
|
||||||
break;
|
break;
|
||||||
case "Brief":
|
case "Brief":
|
||||||
videos.Add(new MiniYamlNode("BriefingVideo", s.Value.ToLower() + ".vqa"));
|
videos.Add(new MiniYamlNode("BriefingVideo", s.Value.ToLowerInvariant() + ".vqa"));
|
||||||
break;
|
break;
|
||||||
case "Action":
|
case "Action":
|
||||||
videos.Add(new MiniYamlNode("StartVideo", s.Value.ToLower() + ".vqa"));
|
videos.Add(new MiniYamlNode("StartVideo", s.Value.ToLowerInvariant() + ".vqa"));
|
||||||
break;
|
break;
|
||||||
case "Win":
|
case "Win":
|
||||||
videos.Add(new MiniYamlNode("WinVideo", s.Value.ToLower() + ".vqa"));
|
videos.Add(new MiniYamlNode("WinVideo", s.Value.ToLowerInvariant() + ".vqa"));
|
||||||
break;
|
break;
|
||||||
case "Lose":
|
case "Lose":
|
||||||
videos.Add(new MiniYamlNode("LossVideo", s.Value.ToLower() + ".vqa"));
|
videos.Add(new MiniYamlNode("LossVideo", s.Value.ToLowerInvariant() + ".vqa"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ namespace OpenRA.Mods.D2k.UtilityCommands
|
|||||||
// Get all templates from the tileset YAML file that have at least one frame and an Image property corresponding to the requested tileset
|
// Get all templates from the tileset YAML file that have at least one frame and an Image property corresponding to the requested tileset
|
||||||
// Each frame is a tile from the Dune 2000 tileset files, with the Frame ID being the index of the tile in the original file
|
// Each frame is a tile from the Dune 2000 tileset files, with the Frame ID being the index of the tile in the original file
|
||||||
tileSetsFromYaml = tileSet.Templates.Where(t => t.Value.Frames != null
|
tileSetsFromYaml = tileSet.Templates.Where(t => t.Value.Frames != null
|
||||||
&& t.Value.Images[0].ToLower() == tilesetName.ToLower()).Select(ts => ts.Value).ToList();
|
&& t.Value.Images[0].ToLowerInvariant() == tilesetName.ToLowerInvariant()).Select(ts => ts.Value).ToList();
|
||||||
|
|
||||||
var players = new MapPlayers(map.Rules, playerCount);
|
var players = new MapPlayers(map.Rules, playerCount);
|
||||||
map.PlayerDefinitions = players.ToMiniYaml();
|
map.PlayerDefinitions = players.ToMiniYaml();
|
||||||
@@ -350,7 +350,7 @@ namespace OpenRA.Mods.D2k.UtilityCommands
|
|||||||
if (ActorDataByActorCode.ContainsKey(tileSpecialInfo))
|
if (ActorDataByActorCode.ContainsKey(tileSpecialInfo))
|
||||||
{
|
{
|
||||||
var kvp = ActorDataByActorCode[tileSpecialInfo];
|
var kvp = ActorDataByActorCode[tileSpecialInfo];
|
||||||
if (!rules.Actors.ContainsKey(kvp.First.ToLower()))
|
if (!rules.Actors.ContainsKey(kvp.First.ToLowerInvariant()))
|
||||||
throw new InvalidOperationException("Actor with name {0} could not be found in the rules YAML file!".F(kvp.First));
|
throw new InvalidOperationException("Actor with name {0} could not be found in the rules YAML file!".F(kvp.First));
|
||||||
|
|
||||||
var a = new ActorReference(kvp.First)
|
var a = new ActorReference(kvp.First)
|
||||||
@@ -380,7 +380,7 @@ namespace OpenRA.Mods.D2k.UtilityCommands
|
|||||||
TerrainTile GetTile(int tileIndex)
|
TerrainTile GetTile(int tileIndex)
|
||||||
{
|
{
|
||||||
// Some tiles are duplicates of other tiles, just on a different tileset
|
// Some tiles are duplicates of other tiles, just on a different tileset
|
||||||
if (tilesetName.ToLower() == "bloxbgbs.r8")
|
if (tilesetName.ToLowerInvariant() == "bloxbgbs.r8")
|
||||||
{
|
{
|
||||||
if (tileIndex == 355)
|
if (tileIndex == 355)
|
||||||
return new TerrainTile(441, 0);
|
return new TerrainTile(441, 0);
|
||||||
@@ -389,7 +389,7 @@ namespace OpenRA.Mods.D2k.UtilityCommands
|
|||||||
return new TerrainTile(442, 0);
|
return new TerrainTile(442, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tilesetName.ToLower() == "bloxtree.r8")
|
if (tilesetName.ToLowerInvariant() == "bloxtree.r8")
|
||||||
{
|
{
|
||||||
var indices = new[] { 683, 684, 685, 706, 703, 704, 705, 726, 723, 724, 725, 746, 743, 744, 745, 747 };
|
var indices = new[] { 683, 684, 685, 706, 703, 704, 705, 726, 723, 724, 725, 746, 743, 744, 745, 747 };
|
||||||
for (var i = 0; i < 16; i++)
|
for (var i = 0; i < 16; i++)
|
||||||
@@ -410,7 +410,7 @@ namespace OpenRA.Mods.D2k.UtilityCommands
|
|||||||
return new TerrainTile(215, 0);
|
return new TerrainTile(215, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tilesetName.ToLower() == "bloxwast.r8")
|
if (tilesetName.ToLowerInvariant() == "bloxwast.r8")
|
||||||
{
|
{
|
||||||
if (tileIndex == 342)
|
if (tileIndex == 342)
|
||||||
return new TerrainTile(250, 0);
|
return new TerrainTile(250, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user