TerrainDesignationsManager.DesignationFulfilledChanged does not fire correctly

Modding Terrain & Mining
piggywhiskey [discord] · 4 months ago

DesignationFulfilledChanged does not fire on Mining OR Dumping Fulfilled, only if the entire Designation is Fulfilled has changed.

Using a Level Designation with both Mine/Dump portions, the expected behaviour would be to fire the event when the Mining Portion or the Dumping Portion is complete.

From the source files (I might be mis-reading it through)
TerrainDesignationManager.onTileChanged()

bool isFulfilled1 = designation.IsFulfilled;
designation.TileChanged(tileAndIndex);
bool isFulfilled2 = designation.IsFulfilled;
if (isFulfilled1 == isFulfilled2)
    return;
if (isFulfilled2)
    this.m_notFulfilledAreas.Remove(designation.OriginTileCoord);
else
    this.m_notFulfilledAreas[designation.OriginTileCoord] = designation;
this.onDesignationFulfilledChanged(designation);

This only checks the IsFulfilled property and should be amended to check IsMiningFulfilled/IsDumpingFulfilled to properly fire the event

7 Showing 1–1 of 1