Skip to content

Commit c2b7b3e

Browse files
committed
name Name for planet regions nullable
1 parent a56aeae commit c2b7b3e

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/Helldivers-2-Core/Mapping/V1/PlanetMapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private Region MapToV1(Models.ArrowHead.Info.PlanetRegion region, Models.ArrowHe
103103

104104
return new Region(
105105
Id: region.RegionIndex,
106-
Name: planetRegion?.Name ?? string.Empty,
106+
Name: planetRegion?.Name,
107107
Description: planetRegion?.Description,
108108
Health: status?.Health,
109109
MaxHealth: region.MaxHealth,

src/Helldivers-2-Models/V1/Planets/Region.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
/// <summary>
44
/// A region on a planet.
55
///
6+
/// The <c>Name</c> and <c>Description</c> fields may be empty when the underlying data store doesn't contain information on them.
7+
/// This is typically when ArrowHead adds new regions that aren't updated in the data store (helldivers-2/json) yet.
8+
///
69
/// Note that some properties may be unavailable when the region is inactive.
710
/// </summary>
811
/// <param name="Id">The identifier of this region.</param>
@@ -17,7 +20,7 @@
1720
/// <param name="Players">The amount of helldivers currently active in this region.</param>
1821
public record struct Region(
1922
int Id,
20-
string Name,
23+
string? Name,
2124
string? Description,
2225
long? Health,
2326
ulong MaxHealth,

0 commit comments

Comments
 (0)