Deconstruct Return Fix

If you liked this item, please rate it up on Steam Workshop page.

Author: dninemfive

Last revision: 30 Sep, 2018 at 17:42 UTC

File size: 83.97 KB

On Steam Workshop

Description:

The base game has a bug where the maximum number of drops for a given resource cost when deconstructing a building is one less than the actual cost, which is all well and good except when you have buildings which need one of a resource – in which case they can never drop. This mod fixes that.

Technical Details

This mod consists of a Harmony prefix which overrides GenLeaving.DoLeavingsFor() in the case that the specified DestroyMode is DestroyMode.Deconstruct. It acts nearly the same, but the calculated drop rate has maximum be Count, not Count-1. Mod conflicts are not expected, since DestroyMode is an enum and to my knowledge cannot be modified without recompiling the base game, but this is a moderately hacky fix.