-
Notifications
You must be signed in to change notification settings - Fork 5
ChangeGoodDistribution
Change the good distribution percentages of the products of a building type in a specific eco sector. This is usually the event that is issued by the player when changing the distribution percentages in the goods side menu panel.
BOOL ISettlers4Api::ChangeGoodDistribution(
S4_GOOD_ENUM good,
S4_BUILDING_ENUM building,
INT percent,
DWORD ecosector
DWORD player
);
good
The good type you want to change the distribution percentage. See S4_GOOD_ENUM for a list of possible good types.
building
The building type you want to receive the goods. See S4_BUILDING_ENUM for a list of possible building types. The building should be able to consume the good specified in the good parameter.
percent
The percent of the goods that shall be delivered to the specified building type.
ecosector
The eco sector identifier to change the distribution for.
player
The player who issues the command. Use 0 (zero) to issue this event as the local player.
If this method could append the event successfully it will return TRUE. If an error occurred it will return FALSE.
The corresponding network event id of the command is ID 5028.
The game usually outputs multiple events at the same tick to make sure that the percentages for a good sums up to 100.
Minimum API Level | 1 |
Target Edition | Any |
Header | S4ModApi.h |
Library | S4ModApi.lib |
DLL | S4ModApi.dll |