In that function, there is a hardcoded set of actions for GRASS and OILSEEDRADISH. We have replaced that with comparisons of their properties instead, so it is more flexible. Without changes to the ingame fruits, the code works the exact same way.
Original code:
Code: Select all
...
elseif desc.cutState < desc.minHarvestingGrowthState then
-- grass
setDensityCompareParams(entry.id, "between", desc.minHarvestingGrowthState+1, desc.maxHarvestingGrowthState+1);
setDensityParallelogram(entry.id, x,z, widthX,widthZ, heightX,heightZ, 0, g_currentMission.numFruitStateChannels, desc.cutState+2);
setDensityCompareParams(entry.id, "greater", -1);
elseif desc.minHarvestingGrowthState == desc.maxHarvestingGrowthState then
-- oilseed, no destruction
else
...
New code, where the actual intent is used, by comparing the actual fruit type:
Code: Select all
...
elseif index == FruitUtil.FRUITTYPE_GRASS then
-- grass
setDensityCompareParams(entry.id, "between", desc.minHarvestingGrowthState + 1, desc.maxHarvestingGrowthState + 1)
setDensityParallelogram(entry.id, x, z, widthX, widthZ, heightX, heightZ, 0, g_currentMission.numFruitStateChannels, desc.cutState + 2)
setDensityCompareParams(entry.id, "greater", -1)
elseif index == FruitUtil.FRUITTYPE_OILSEEDRADISH then
-- oilseed, no destruction
else
...
We 'fixed' this by patching the mod when Seasons loads, but it is nasty and we would prefer the crop destruction mod to be updated.
- PC/Mac/PS4/XB1: Moddable platforms
- Vehicle/Tool/Model/Object: Giants Mod
- Issue: Implementation of CC is a bit silly
- Single- or Multiplayer: Both
- Steps to reproduce: Play seasons without the patch included, or write any other mod that does changes on harvest states of fruits.