From b74333fc469cd5f9584ca3f71147ab4f7d6b4f32 Mon Sep 17 00:00:00 2001 From: fliqqs Date: Wed, 23 Jul 2025 19:12:45 +1000 Subject: [PATCH] fix logic bug on crop _harvestMethod previous result was taken from asserting current method == grab resulting in 0 if method was Scythe fixes #95 --- Farmtronics/M1/TileInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Farmtronics/M1/TileInfo.cs b/Farmtronics/M1/TileInfo.cs index e52a3e1..904dc56 100644 --- a/Farmtronics/M1/TileInfo.cs +++ b/Farmtronics/M1/TileInfo.cs @@ -117,7 +117,7 @@ static ValMap ToMap(TerrainFeature feature, ValMap result, bool passableOnly) { cropInfo.map[_maxPhase] = new ValNumber(crop.phaseDays.Count - 1); cropInfo.map[_mature] = ValNumber.Truth(crop.fullyGrown.Value); cropInfo.map[_dead] = ValNumber.Truth(crop.dead.Value); - cropInfo.map[_harvestMethod] = ValNumber.Truth(crop.GetHarvestMethod() == HarvestMethod.Grab); + cropInfo.map[_harvestMethod] = new ValNumber((int)crop.GetData().HarvestMethod); bool harvestable = (int)crop.currentPhase.Value >= crop.phaseDays.Count - 1 && (!crop.fullyGrown.Value || (int)crop.dayOfCurrentPhase.Value <= 0); cropInfo.map[_harvestable] = ValNumber.Truth(harvestable);