Feature: Allow GameScripts to add additional text to Industry view window

This commit is contained in:
dP
2021-01-15 17:38:14 +03:00
committed by Charles Pigott
parent 4b42ecb0f6
commit bab7de6cf2
9 changed files with 60 additions and 11 deletions

View File

@@ -33,6 +33,13 @@ enum ProductionLevels {
PRODLEVEL_MAXIMUM = 0x80, ///< the industry is running at full speed
};
enum class IndustryAction : byte {
SetControlFlags = 0, ///< Set IndustryControlFlags
SetExclusiveSupplier = 1, ///< Set exclusive supplier
SetExclusiveConsumer = 2, ///< Set exclusive consumer
SetText = 3, ///< Set additional text
};
/**
* Flags to control/override the behaviour of an industry.
* These flags are controlled by game scripts.
@@ -91,6 +98,7 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> {
byte selected_layout; ///< Which tile layout was used when creating the industry
Owner exclusive_supplier; ///< Which company has exclusive rights to deliver cargo (INVALID_OWNER = anyone)
Owner exclusive_consumer; ///< Which company has exclusive rights to take cargo (INVALID_OWNER = anyone)
std::string text; ///< General text with additional information.
uint16 random; ///< Random value used for randomisation of all kinds of things