Skip to content

Commit

Permalink
Remove ZDO logging spamming player logs with warnings (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
zolantris committed May 19, 2024
1 parent 76f99b0 commit 6fba8b5
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1185,17 +1185,15 @@ public static void InitZdo(ZDO zdo)
var id = GetParentID(zdo);
if (id != 0)
{
// Logger.LogInfo($"InitZDO for id: {id}");
if (!m_allPieces.TryGetValue(id, out var list))
{
list = [];
m_allPieces.Add(id, list);
}

// important for preventing a list error if the zdo has already been added
if (list.Contains(zdo))
{
Logger.LogWarning(
$"ValheimVehicles.BaseVehicleController: The zdo {zdo.m_uid}, tried to be added when it already exists within the list. Please submit a bug if this issue shows up frequently.");
return;
}

Expand Down

0 comments on commit 6fba8b5

Please sign in to comment.