Fix RCS1246

This commit is contained in:
RoosterDragon
2023-03-18 13:25:59 +00:00
committed by Gustas
parent 330ca92045
commit acca837142
21 changed files with 32 additions and 32 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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

View File

@@ -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);