Skip to content

Commit 38e54cd

Browse files
committed
rewrite AdminWindow, includes a fix for AscensionGameDev#2536
wip admin window fixes AscensionGameDev#2536 finish redoing AdminWindow, fixes AscensionGameDev#2536
1 parent e18f2f0 commit 38e54cd

File tree

19 files changed

+806
-437
lines changed

19 files changed

+806
-437
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ resharper_csharp_wrap_before_invocation_rpar = true
144144
resharper_csharp_wrap_parameters_style = chop_if_long
145145
resharper_keep_existing_invocation_parens_arrangement = false
146146
resharper_keep_existing_property_patterns_arrangement = false
147+
resharper_max_initializer_elements_on_line = 2
147148
resharper_max_invocation_arguments_on_line = 5
148149
resharper_place_expr_property_on_single_line = true
149150
resharper_place_simple_initializer_on_single_line = false

Framework/Intersect.Framework.Core/GameObjects/Maps/MapList/MapList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ public Guid FindFirstMap()
353353

354354
if (OrderedMaps.Count > 0)
355355
{
356-
lowestMap = OrderedMaps.OrderBy(m => m.TimeCreated).FirstOrDefault().MapId;
356+
lowestMap = OrderedMaps.OrderBy(m => m.TimeCreated).FirstOrDefault()?.MapId ?? default;
357357
}
358358

359359
return lowestMap;

Framework/Intersect.Framework.Core/GameObjects/Maps/MapList/MapListMap.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ public partial class MapListMap : MapListItem, IComparable<MapListMap>
88

99
public long TimeCreated;
1010

11-
public MapListMap() : base()
11+
public MapListMap()
1212
{
1313
Name = "New Map";
1414
Type = 1;
1515
}
1616

17-
public int CompareTo(MapListMap obj)
18-
{
19-
return Name.CompareTo(obj.Name);
20-
}
17+
public int CompareTo(MapListMap other) =>
18+
string.Compare(Name, other.Name, StringComparison.CurrentCultureIgnoreCase);
2119

2220
public void PostLoad(DatabaseObjectLookup gameMaps, bool isServer = true)
2321
{

0 commit comments

Comments
 (0)