Skip to content

Commit 9c8149d

Browse files
committed
update packages
1 parent 40a88e0 commit 9c8149d

File tree

9 files changed

+12
-22
lines changed

9 files changed

+12
-22
lines changed

Core/Objects/InterfaceSkinObject.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,5 @@ public bool TryGetImageName(int id, out string? value)
509509
{ 468, "toolbar_menu_map_south" },
510510
{ 469, "toolbar_menu_map_east" },
511511
};
512-
513512
}
514513
}

Core/Objects/RoadObject.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public record RoadObject(
6262
[property: LocoStructOffset(0x2F)] uint8_t pad_2F
6363
) : ILocoStruct, ILocoStructVariableData
6464
{
65-
6665
public List<S5Header> Compatible { get; set; } = [];
6766
public List<S5Header> Mods { get; set; } = [];
6867
public S5Header Tunnel { get; set; }

Core/Objects/ScaffoldingObject.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,4 @@ public bool TryGetImageName(int id, out string? value)
6161
{ 35, "type22x2RoofNW" },
6262
};
6363
}
64-
6564
}

Core/Objects/TrackObject.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,6 @@ public bool Validate()
577577
{ 411, "rightCurveVerySmall0RailNW" },
578578
};
579579

580-
581580
// ai generated - nice idea, maybe implement?
582581
//public static TrackObject FromDatFile(DatFile datFile, int index)
583582
//{

Core/Objects/Vehicle/VehicleObject.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ public void PostLoad()
452452
var numSteepFrames = bogieSprite.NumRollSprites * 64;
453453
offset += numSteepFrames / (bogieSprite.Flags.HasFlag(BogieSpriteFlags.RotationalSymmetry) ? 2 : 1);
454454
bogieSprite.ImageIds[BogieSpriteSlopeType.Steep] = Enumerable.Range(curr, offset - curr).ToList();
455-
456455
}
457456
}
458457

Core/Types/LocoObject.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace OpenLoco.ObjectEditor.Types
66
{
7-
87
[TypeConverter(typeof(ExpandableObjectConverter))]
98
public class LocoObject : ILocoObject
109
{

Gui/Gui.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
<ItemGroup>
4444
<PackageReference Include="NAudio" Version="2.2.1" />
45-
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.2" />
45+
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.3" />
4646
</ItemGroup>
4747

4848
<ItemGroup>

Gui/MainForm.cs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ int CurrentUIImagePageNumber
8282
const string ApplicationName = "OpenLoco Object Editor";
8383

8484
const string GithubApplicationName = "ObjectEditor";
85-
const string GithubLatestReleaseDownloadPage = @"https://github.com/OpenLoco/ObjectEditor/releases";
86-
const string GithubLatestReleaseAPI = @"https://api.github.com/repos/OpenLoco/ObjectEditor/releases/latest";
85+
const string GithubLatestReleaseDownloadPage = "https://github.com/OpenLoco/ObjectEditor/releases";
86+
const string GithubLatestReleaseAPI = "https://api.github.com/repos/OpenLoco/ObjectEditor/releases/latest";
8787

8888
string SettingsPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), ApplicationName);
8989
string SettingsFile => Path.Combine(SettingsPath, "settings.json");
@@ -535,7 +535,6 @@ void LoadDataDump(string path, bool isG1 = false)
535535

536536
void LoadDataDumpCore(string path, bool isG1 = false)
537537
{
538-
539538
if (File.Exists(path))
540539
{
541540
var byteList = File.ReadAllBytes(path);
@@ -612,7 +611,7 @@ void LoadAndPlaySound(byte[] data, string soundName)
612611
if (!header.Validate())
613612
{
614613
// invalid file
615-
logger?.Warning($"Invalid music track");
614+
logger?.Warning("Invalid music track");
616615
return;
617616
}
618617
}
@@ -714,7 +713,6 @@ public void ImportImages()
714713
currentUIObjectImages = CreateImages(uiObjHasGraphics.G1Elements, model.PaletteMap).ToList();
715714
RefreshImageControls();
716715
}
717-
718716
}
719717
}
720718
}
@@ -749,7 +747,7 @@ public string GetImageName(IUiObject? uiObj, int counter)
749747
ILocoImageTableNames? its = null;
750748
var objectName = string.Empty;
751749

752-
if (uiObj is UiLocoObject uiLocoObj && uiLocoObj.LocoObject != null && uiLocoObj.LocoObject.Object is ILocoImageTableNames itss)
750+
if (uiObj is UiLocoObject uiLocoObj && uiLocoObj?.LocoObject != null && uiLocoObj.LocoObject.Object is ILocoImageTableNames itss)
753751
{
754752
its = itss;
755753
objectName = uiLocoObj.DatFileInfo.S5Header.Name;
@@ -769,7 +767,6 @@ public string GetImageName(IUiObject? uiObj, int counter)
769767
}
770768

771769
return $"{counter}-{value}";
772-
773770
}
774771

775772
return $"{counter}-image";
@@ -793,7 +790,6 @@ public void ExportMusic(UiSoundObject uiSoundObj)
793790
{
794791
SawyerStreamWriter.ExportMusicAsWave(sfDialog.FileName, uiSoundObj.Header, uiSoundObj.Data);
795792
logger.Info($"Saved music to {sfDialog.FileName}");
796-
797793
}
798794
}
799795
}
@@ -1053,7 +1049,7 @@ IEnumerable<Control> CreateImageControls(IEnumerable<Bitmap> images)
10531049

10541050
var uiObjHasGraphics = CurrentUIObject as IUiObjectWithGraphics;
10551051

1056-
int counter = 0;
1052+
var counter = 0;
10571053
foreach (var img in images)
10581054
{
10591055
var ele = uiObjHasGraphics.G1Elements[counter++];
@@ -1330,7 +1326,7 @@ void btnPageNext_Click(object sender, EventArgs e)
13301326
}
13311327

13321328
void btnPageLast_Click(object sender, EventArgs e)
1333-
=> CurrentUIImagePageNumber = (CurrentUIImages.Count / ImagesPerPage);
1329+
=> CurrentUIImagePageNumber = CurrentUIImages.Count / ImagesPerPage;
13341330

13351331
void dataDumpAnnotations_AfterSelect(object sender, TreeViewEventArgs e)
13361332
{
@@ -1441,7 +1437,7 @@ void btnSave_Click(object sender, EventArgs e)
14411437
var validation = obji.LocoObject.Object.Validate();
14421438
if (!validation)
14431439
{
1444-
logger.Error($"Object failed validation checks; cannot save");
1440+
logger.Error("Object failed validation checks; cannot save");
14451441
return;
14461442
}
14471443
}
@@ -1465,7 +1461,7 @@ void btnSave_Click(object sender, EventArgs e)
14651461
{
14661462
if (tvObjType.SelectedNode.Name == "css1.dat")
14671463
{
1468-
var rawBytes = SawyerStreamWriter.SaveSoundEffectsToCSS(uiSoundObjList.Audio.Select(uis => (uis.Header, uis.Data)).ToList());
1464+
var rawBytes = SawyerStreamWriter.SaveSoundEffectsToCSS(uiSoundObjList.Audio.ConvertAll(uis => (uis.Header, uis.Data)));
14691465
File.WriteAllBytes(filename, rawBytes);
14701466
}
14711467
else

Tests/Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
14-
<PackageReference Include="NUnit" Version="4.0.1" />
14+
<PackageReference Include="NUnit" Version="4.1.0" />
1515
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
16-
<PackageReference Include="NUnit.Analyzers" Version="4.0.1">
16+
<PackageReference Include="NUnit.Analyzers" Version="4.1.0">
1717
<PrivateAssets>all</PrivateAssets>
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
</PackageReference>
20-
<PackageReference Include="coverlet.collector" Version="6.0.0">
20+
<PackageReference Include="coverlet.collector" Version="6.0.2">
2121
<PrivateAssets>all</PrivateAssets>
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2323
</PackageReference>

0 commit comments

Comments
 (0)