Fix RCS1246
This commit is contained in:
@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
|
||||
.Skip(1)
|
||||
.FirstOrDefault();
|
||||
|
||||
next ??= bases.First();
|
||||
next ??= bases[0];
|
||||
|
||||
selection.Combine(world, new Actor[] { next }, false, true);
|
||||
viewport.Center(selection.Actors);
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
|
||||
.Skip(1)
|
||||
.FirstOrDefault();
|
||||
|
||||
next ??= harvesters.First();
|
||||
next ??= harvesters[0];
|
||||
|
||||
selection.Combine(world, new Actor[] { next }, false, true);
|
||||
viewport.Center(selection.Actors);
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
|
||||
var facilities = world.ActorsHavingTrait<Production>()
|
||||
.Where(a => a.Owner == player && a.OccupiesSpace != null && !a.Info.HasTraitInfo<BaseBuildingInfo>()
|
||||
&& a.TraitsImplementing<Production>().Any(t => !t.IsTraitDisabled))
|
||||
.OrderBy(f => f.TraitsImplementing<Production>().First(t => !t.IsTraitDisabled).Info.Produces.First())
|
||||
.OrderBy(f => f.TraitsImplementing<Production>().First(t => !t.IsTraitDisabled).Info.Produces[0])
|
||||
.ToList();
|
||||
|
||||
if (facilities.Count == 0)
|
||||
@@ -58,7 +58,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
|
||||
.Skip(1)
|
||||
.FirstOrDefault();
|
||||
|
||||
next ??= facilities.First();
|
||||
next ??= facilities[0];
|
||||
|
||||
Game.Sound.PlayNotification(world.Map.Rules, null, "Sounds", clickSound, null);
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
missionList.ScrollToSelectedItem();
|
||||
}
|
||||
else
|
||||
SelectMap(allPreviews.First());
|
||||
SelectMap(allPreviews[0]);
|
||||
}
|
||||
|
||||
// Preload map preview to reduce jank
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
videoVolumeSlider.OnChange += x => Game.Sound.VideoVolume = x;
|
||||
|
||||
var devices = Game.Sound.AvailableDevices();
|
||||
soundDevice = Array.Find(devices, d => d.Device == ss.Device) ?? devices.First();
|
||||
soundDevice = Array.Find(devices, d => d.Device == ss.Device) ?? devices[0];
|
||||
|
||||
var audioDeviceDropdown = panel.Get<DropDownButtonWidget>("AUDIO_DEVICE");
|
||||
audioDeviceDropdown.OnMouseDown = _ => ShowAudioDeviceDropdown(audioDeviceDropdown, devices, scrollPanel);
|
||||
|
||||
Reference in New Issue
Block a user