• Sets the amount of available gold of a gold mine. The amount can be negative, which is practically the same as 0.

    Parameters

    • whichUnit: Unit<UnitEventMap>

      Change amount of this gold mine unit.

    • amount: number

      The new gold amount.

    Returns void

    Bug

    If the final value, after adding a negative amount, will be less than zero, then it will display the correct negative amount, but mining won't yield any gold. If peasant enters a mine with 0 gold, it's destroyed and he stops next to mine. If peasant enters a mine with <0 gold, it's destroyed and he runs back to the castle.

    Note

    See: AddResourceAmount, GetResourceAmount.

Generated using TypeDoc