Skip to content

Commit

Permalink
reuse new fertilizer null check
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathoschild committed Oct 28, 2024
1 parent 95e2111 commit 995a9ae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions DataLayers/Layers/Crops/CropFertilizerLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,13 @@ select tile.Value
{
if (this.Mods.MultiFertilizer.IsLoaded)
applied = [.. this.Mods.MultiFertilizer.GetAppliedFertilizers(dirt)];
else if (this.HasUltimateFertilizer)
if (dirt.fertilizer.Value != null)
else if (dirt.fertilizer.Value != null)
{
if (this.HasUltimateFertilizer)
applied = [.. dirt.fertilizer.Value.Split('|', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries)]; // Ultimate Fertilizer allows multiple fertilizers
else if (CommonHelper.IsItemId(dirt.fertilizer.Value, allowZero: false))
applied = [dirt.fertilizer.Value];
else if (CommonHelper.IsItemId(dirt.fertilizer.Value, allowZero: false))
applied = [dirt.fertilizer.Value];
}
}

// get fertilizer info
Expand Down

0 comments on commit 995a9ae

Please sign in to comment.