aw5820: fix prod: fill object even if C_input_CropRes is 0
All checks were successful
FarmMaps/CarbonLib/pipeline/head This commit looks good
All checks were successful
FarmMaps/CarbonLib/pipeline/head This commit looks good
This commit is contained in:
@@ -642,12 +642,8 @@ namespace FarmMapsAPI.Carbon
|
||||
foreach (var crop in cropArea.Value)
|
||||
{
|
||||
var cInputCropRes = cropPropertyConfig.SingleOrDefault(s => s.Name.ToLower() == crop.Key.ToLower())?.C_input_CropRes ?? 0.0;
|
||||
if (cInputCropRes > 0)
|
||||
{
|
||||
carbonInputs.AddValue((cropArea.Key.Item1, cropArea.Key.Item2, crop.Key), "CarbonResidues", cInputCropRes);
|
||||
|
||||
}
|
||||
|
||||
if (cropSet.StrawCrops.Any(x => x.StrawCrop.ToLower() == crop.Key.ToLower()))
|
||||
{
|
||||
var belowGroundCarbon = belowGroundCarbonInput[cropArea.Key].SingleOrDefault(x => x.Key.ToLower() == crop.Key.ToLower());
|
||||
|
||||
Reference in New Issue
Block a user