SetResourceAmount
- Parameters
whichUnit unitChange amount of this gold mine unit.
amount integerThe new gold amount.
- comment
Sets the amount of available gold of a gold mine. The amount can be negative, which is practically the same as 0.
- 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.- patch
1.00
- Source
- common.j (suggest an edit or discuss on Github)
- return type
nothing- Source code
native SetResourceAmount takes unit whichUnit, integer amount returns nothing