Fix IDE0030
This commit is contained in:
committed by
Pavel Penev
parent
8223161959
commit
99c1a4448b
@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Scripting.Global
|
||||
var luaLabel = Ui.Root.Get("INGAME_ROOT").Get<LabelWidget>("MISSION_TEXT");
|
||||
luaLabel.GetText = () => text;
|
||||
|
||||
var c = color.HasValue ? color.Value : Color.White;
|
||||
var c = color ?? Color.White;
|
||||
luaLabel.GetColor = () => c;
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace OpenRA.Mods.Common.Terrain
|
||||
if (r.Index >= template.Stride)
|
||||
return missingTile;
|
||||
|
||||
var start = template.Variants > 1 ? variant.HasValue ? variant.Value : random.Next(template.Variants) : 0;
|
||||
var start = template.Variants > 1 ? variant ?? random.Next(template.Variants) : 0;
|
||||
return template.Sprites[start * template.Stride + r.Index];
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
if (unitGroup.BaseActor != null)
|
||||
{
|
||||
var facing = unitGroup.BaseActorFacing.HasValue ? unitGroup.BaseActorFacing.Value : new WAngle(w.SharedRandom.Next(1024));
|
||||
var facing = unitGroup.BaseActorFacing ?? new WAngle(w.SharedRandom.Next(1024));
|
||||
w.CreateActor(unitGroup.BaseActor.ToLowerInvariant(), new TypeDictionary
|
||||
{
|
||||
new LocationInit(p.HomeLocation + unitGroup.BaseActorOffset),
|
||||
@@ -115,7 +115,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
|
||||
var subCell = ip.SharesCell ? w.ActorMap.FreeSubCell(validCell) : 0;
|
||||
var facing = unitGroup.SupportActorsFacing.HasValue ? unitGroup.SupportActorsFacing.Value : new WAngle(w.SharedRandom.Next(1024));
|
||||
var facing = unitGroup.SupportActorsFacing ?? new WAngle(w.SharedRandom.Next(1024));
|
||||
|
||||
w.CreateActor(s.ToLowerInvariant(), new TypeDictionary
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user