23using Owner = CompanyID;
32static const uint8_t MAX_COMPANIES = CompanyID::End().base();
41typedef Owner CompanyID;
43class CompanyMask :
public BaseBitSet<CompanyMask, CompanyID, uint16_t> {
46 static constexpr size_t DecayValueType(CompanyID value) {
return value.base(); }
48 constexpr auto operator <=>(
const CompanyMask &)
const noexcept =
default;
Base for bitset types that accept strong types, ones that need some casting like StrongType and enum ...
static const uint MAX_LENGTH_PRESIDENT_NAME_CHARS
The maximum length of a president name in characters including '\0'.
static constexpr Owner OWNER_DEITY
The object is owned by a superuser / goal script.
static const uint MAX_LENGTH_COMPANY_NAME_CHARS
The maximum length of a company name in characters including '\0'.
CompanyCtrlAction
The action to do with Commands::CompanyControl.
@ New
Create a new company.
@ NewAI
Create a new AI company.
@ Delete
Delete a company.
static constexpr CompanyID COMPANY_SPECTATOR
The client is spectating.
static constexpr Owner OWNER_END
Last + 1 owner.
CompanyAllowListCtrlAction
The action to do with Commands::CompanyAllowListControl.
@ RemoveKey
Remove a public key.
@ AllowListed
Allow only listed keys to join the company.
@ AllowAny
Allow joining the company without a key.
static constexpr CompanyID COMPANY_NEW_COMPANY
The client wants a new company.
static const uint MAX_HISTORY_QUARTERS
The maximum number of quarters kept as performance's history.
static constexpr Owner OWNER_TOWN
A town owns the tile, or a town is expanding.
static constexpr Owner OWNER_BEGIN
First owner.
static constexpr CompanyID COMPANY_INACTIVE_CLIENT
The client is joining.
static constexpr Owner OWNER_NONE
The tile has no ownership.
static constexpr Owner INVALID_OWNER
An invalid owner.
static constexpr Owner OWNER_WATER
The tile/execution is done by "water".
static const uint MIN_COMPETITORS_INTERVAL
The minimum interval (in minutes) between competitors.
CompanyRemoveReason
The reason why the company was removed.
@ Autoclean
The company is removed due to autoclean.
@ Bankrupt
The company went belly-up.
@ None
Dummy reason for actions that don't need one.
@ Manual
The company is manually removed.
static const uint MAX_COMPETITORS_INTERVAL
The maximum interval (in minutes) between competitors.
static void AddKey(std::unique_ptr< NWidgetHorizontal > &hor, int pad_y, int num_half, WidgetType widtype, WidgetID widnum, const WidgetData &widdata)
Add a key widget to a row of the keyboard.
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
uint32_t bits
Company manager face bits, meaning is dependent on style.
uint style
Company manager face style.
std::string style_label
Face style label.
Templated helper to make a PoolID a single POD value.