Skip to content

Commit

Permalink
Fix minor inconsistencies in my code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Toastbrot236 committed Dec 6, 2024
1 parent ed76e9e commit 6cf526c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Refresh.GameServer/Endpoints/Game/UserEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ public SerializedFriendsList GetFriends(RequestContext context, GameDatabaseCont
}
}

if(data.Levels != null)
if (data.Levels != null)
{
int failedLevelUpdates = 0;

// Since you can only update level's locations through this endpoint, update their locations
foreach(GameLevelRequest LevelRequest in data.Levels)
foreach (GameLevelRequest LevelRequest in data.Levels)
{
// Incase there is no location data provided for this level for some reason
if(LevelRequest.Location == null)
if (LevelRequest.Location == null)
{
failedLevelUpdates++;
continue;
Expand All @@ -157,7 +157,7 @@ public SerializedFriendsList GetFriends(RequestContext context, GameDatabaseCont
database.UpdateLevelLocation(Level, LevelRequest.Location);
}

if(failedLevelUpdates > 0) database.AddErrorNotification("Level update failed", $"Failed to update {failedLevelUpdates} out of {data.Levels.Count} level locations.", user);
if (failedLevelUpdates > 0) database.AddErrorNotification("Level update failed", $"Failed to update {failedLevelUpdates} out of {data.Levels.Count} level locations.", user);
}

if (data.PlanetsHash != null && !dataStore.ExistsInStore(data.PlanetsHash))
Expand Down

0 comments on commit 6cf526c

Please sign in to comment.