Merge branch 'master' into jgrpp

# Conflicts:
#	src/autoreplace_cmd.cpp
#	src/company_base.h
#	src/company_gui.cpp
#	src/cpu.cpp
#	src/debug.h
#	src/group.h
#	src/group_cmd.cpp
#	src/house.h
#	src/industry.h
#	src/newgrf_house.cpp
#	src/news_type.h
#	src/openttd.cpp
#	src/saveload/company_sl.cpp
#	src/settings_type.h
#	src/sl/oldloader_sl.cpp
#	src/story.cpp
#	src/table/town_land.h
#	src/viewport.cpp
pull/647/head
Jonathan G Rennison 3 months ago
commit cfebbfac8c

@ -656,6 +656,21 @@ static CommandCost ReplaceFreeUnit(Vehicle **single_unit, DoCommandFlag flags, b
return cost; return cost;
} }
/** Struct for recording vehicle chain replacement information. */
struct ReplaceChainItem {
Vehicle *old_veh; ///< Old vehicle to replace.
Vehicle *new_veh; ///< Replacement vehicle, or nullptr if no replacement.
Money cost; /// Cost of buying and refitting replacement.
ReplaceChainItem(Vehicle *old_veh, Vehicle *new_veh, Money cost) : old_veh(old_veh), new_veh(new_veh), cost(cost) { }
/**
* Get vehicle to use for this position.
* @return Either the new vehicle, or the old vehicle if there is no replacement.
*/
Vehicle *GetVehicle() const { return new_veh == nullptr ? old_veh : new_veh; }
};
/** /**
* Replace a whole vehicle chain * Replace a whole vehicle chain
* @param chain vehicle chain to let autoreplace/renew operator on * @param chain vehicle chain to let autoreplace/renew operator on
@ -676,29 +691,21 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
/* Store the length of the old vehicle chain, rounded up to whole tiles */ /* Store the length of the old vehicle chain, rounded up to whole tiles */
uint16_t old_total_length = CeilDiv(Train::From(old_head)->gcache.cached_total_length, TILE_SIZE) * TILE_SIZE; uint16_t old_total_length = CeilDiv(Train::From(old_head)->gcache.cached_total_length, TILE_SIZE) * TILE_SIZE;
int num_units = 0; ///< Number of units in the chain std::vector<ReplaceChainItem> replacements;
for (Train *w = Train::From(old_head); w != nullptr; w = w->GetNextUnit()) num_units++;
Train **old_vehs = CallocT<Train *>(num_units); ///< Will store vehicles of the old chain in their order
Train **new_vehs = CallocT<Train *>(num_units); ///< New vehicles corresponding to old_vehs or nullptr if no replacement
Money *new_costs = MallocT<Money>(num_units); ///< Costs for buying and refitting the new vehicles
/* Collect vehicles and build replacements /* Collect vehicles and build replacements
* Note: The replacement vehicles can only successfully build as long as the old vehicles are still in their chain */ * Note: The replacement vehicles can only successfully build as long as the old vehicles are still in their chain */
int i; for (Train *w = Train::From(old_head); w != nullptr; w = w->GetNextUnit()) {
Train *w; ReplaceChainItem &replacement = replacements.emplace_back(w, nullptr, 0);
for (w = Train::From(old_head), i = 0; w != nullptr; w = w->GetNextUnit(), i++) {
assert(i < num_units);
old_vehs[i] = w;
CommandCost ret = BuildReplacementVehicle(old_vehs[i], (Vehicle**)&new_vehs[i], true, same_type_only); CommandCost ret = BuildReplacementVehicle(replacement.old_veh, &replacement.new_veh, true, same_type_only);
cost.AddCost(ret); cost.AddCost(ret);
if (cost.Failed()) break; if (cost.Failed()) break;
new_costs[i] = ret.GetCost(); replacement.cost = ret.GetCost();
if (new_vehs[i] != nullptr) *nothing_to_do = false; if (replacement.new_veh != nullptr) *nothing_to_do = false;
} }
Train *new_head = (new_vehs[0] != nullptr ? new_vehs[0] : old_vehs[0]); Vehicle *new_head = replacements.front().GetVehicle();
/* Note: When autoreplace has already failed here, old_vehs[] is not completely initialized. But it is also not needed. */ /* Note: When autoreplace has already failed here, old_vehs[] is not completely initialized. But it is also not needed. */
if (cost.Succeeded()) { if (cost.Succeeded()) {
@ -712,18 +719,18 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
* We do this from back to front, so that the head of the temporary vehicle chain does not change all the time. * We do this from back to front, so that the head of the temporary vehicle chain does not change all the time.
* That way we also have less trouble when exceeding the unitnumber limit. * That way we also have less trouble when exceeding the unitnumber limit.
* OTOH the vehicle attach callback is more expensive this way :s */ * OTOH the vehicle attach callback is more expensive this way :s */
Train *last_engine = nullptr; ///< Shall store the last engine unit after this step Vehicle *last_engine = nullptr; ///< Shall store the last engine unit after this step
if (cost.Succeeded()) { if (cost.Succeeded()) {
for (int i = num_units - 1; i > 0; i--) { for (auto it = std::rbegin(replacements); it != std::rend(replacements); ++it) {
Train *append = (new_vehs[i] != nullptr ? new_vehs[i] : old_vehs[i]); Vehicle *append = it->GetVehicle();
if (RailVehInfo(append->engine_type)->railveh_type == RAILVEH_WAGON) continue; if (RailVehInfo(append->engine_type)->railveh_type == RAILVEH_WAGON) continue;
if (new_vehs[i] != nullptr) { if (it->new_veh != nullptr) {
/* Move the old engine to a separate row with DC_AUTOREPLACE. Else /* Move the old engine to a separate row with DC_AUTOREPLACE. Else
* moving the wagon in front may fail later due to unitnumber limit. * moving the wagon in front may fail later due to unitnumber limit.
* (We have to attach wagons without DC_AUTOREPLACE.) */ * (We have to attach wagons without DC_AUTOREPLACE.) */
CmdMoveVehicle(old_vehs[i], nullptr, DC_EXEC | DC_AUTOREPLACE, false); CmdMoveVehicle(it->old_veh, nullptr, DC_EXEC | DC_AUTOREPLACE, false);
} }
if (last_engine == nullptr) last_engine = append; if (last_engine == nullptr) last_engine = append;
@ -734,15 +741,15 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
} }
/* When wagon removal is enabled and the new engines without any wagons are already longer than the old, we have to fail */ /* When wagon removal is enabled and the new engines without any wagons are already longer than the old, we have to fail */
if (cost.Succeeded() && wagon_removal && new_head->gcache.cached_total_length > old_total_length) cost = CommandCost(STR_ERROR_TRAIN_TOO_LONG_AFTER_REPLACEMENT); if (cost.Succeeded() && wagon_removal && Train::From(new_head)->gcache.cached_total_length > old_total_length) cost = CommandCost(STR_ERROR_TRAIN_TOO_LONG_AFTER_REPLACEMENT);
/* Append/insert wagons into the new vehicle chain /* Append/insert wagons into the new vehicle chain
* We do this from back to front, so we can stop when wagon removal or maximum train length (i.e. from mammoth-train setting) is triggered. * We do this from back to front, so we can stop when wagon removal or maximum train length (i.e. from mammoth-train setting) is triggered.
*/ */
if (cost.Succeeded()) { if (cost.Succeeded()) {
for (int i = num_units - 1; i > 0; i--) { for (auto it = std::rbegin(replacements); it != std::rend(replacements); ++it) {
assert(last_engine != nullptr); assert(last_engine != nullptr);
Vehicle *append = (new_vehs[i] != nullptr ? new_vehs[i] : old_vehs[i]); Vehicle *append = it->GetVehicle();
if (RailVehInfo(append->engine_type)->railveh_type == RAILVEH_WAGON) { if (RailVehInfo(append->engine_type)->railveh_type == RAILVEH_WAGON) {
/* Insert wagon after 'last_engine' */ /* Insert wagon after 'last_engine' */
@ -751,7 +758,7 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
/* When we allow removal of wagons, either the move failing due /* When we allow removal of wagons, either the move failing due
* to the train becoming too long, or the train becoming longer * to the train becoming too long, or the train becoming longer
* would move the vehicle to the empty vehicle chain. */ * would move the vehicle to the empty vehicle chain. */
if (wagon_removal && (res.Failed() ? res.GetErrorMessage() == STR_ERROR_TRAIN_TOO_LONG : new_head->gcache.cached_total_length > old_total_length)) { if (wagon_removal && (res.Failed() ? res.GetErrorMessage() == STR_ERROR_TRAIN_TOO_LONG : Train::From(new_head)->gcache.cached_total_length > old_total_length)) {
CmdMoveVehicle(append, nullptr, DC_EXEC | DC_AUTOREPLACE, false); CmdMoveVehicle(append, nullptr, DC_EXEC | DC_AUTOREPLACE, false);
break; break;
} }
@ -761,16 +768,16 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
} else { } else {
/* We have reached 'last_engine', continue with the next engine towards the front */ /* We have reached 'last_engine', continue with the next engine towards the front */
assert(append == last_engine); assert(append == last_engine);
last_engine = last_engine->GetPrevUnit(); last_engine = Train::From(last_engine)->GetPrevUnit();
} }
} }
} }
/* Sell superfluous new vehicles that could not be inserted. */ /* Sell superfluous new vehicles that could not be inserted. */
if (cost.Succeeded() && wagon_removal) { if (cost.Succeeded() && wagon_removal) {
assert(new_head->gcache.cached_total_length <= _settings_game.vehicle.max_train_length * TILE_SIZE); assert(Train::From(new_head)->gcache.cached_total_length <= _settings_game.vehicle.max_train_length * TILE_SIZE);
for (int i = 1; i < num_units; i++) { for (auto it = std::next(std::begin(replacements)); it != std::end(replacements); ++it) {
Vehicle *wagon = new_vehs[i]; Vehicle *wagon = it->new_veh;
if (wagon == nullptr) continue; if (wagon == nullptr) continue;
if (wagon->First() == new_head) break; if (wagon->First() == new_head) break;
@ -779,11 +786,11 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
/* Sell wagon */ /* Sell wagon */
[[maybe_unused]] CommandCost ret = DoCommand(0, wagon->index, 0, DC_EXEC, GetCmdSellVeh(wagon)); [[maybe_unused]] CommandCost ret = DoCommand(0, wagon->index, 0, DC_EXEC, GetCmdSellVeh(wagon));
assert(ret.Succeeded()); assert(ret.Succeeded());
new_vehs[i] = nullptr; it->new_veh = nullptr;
/* Revert the money subtraction when the vehicle was built. /* Revert the money subtraction when the vehicle was built.
* This value is different from the sell value, esp. because of refitting */ * This value is different from the sell value, esp. because of refitting */
cost.AddCost(-new_costs[i]); cost.AddCost(-it->cost);
} }
} }
@ -798,8 +805,8 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
} }
/* Transfer cargo of old vehicles and sell them */ /* Transfer cargo of old vehicles and sell them */
for (int i = 0; i < num_units; i++) { for (auto it = std::begin(replacements); it != std::end(replacements); ++it) {
Vehicle *w = old_vehs[i]; Vehicle *w = it->old_veh;
/* Is the vehicle again part of the new chain? /* Is the vehicle again part of the new chain?
* Note: We cannot test 'new_vehs[i] != nullptr' as wagon removal might cause to remove both */ * Note: We cannot test 'new_vehs[i] != nullptr' as wagon removal might cause to remove both */
if (w->First() == new_head) continue; if (w->First() == new_head) continue;
@ -807,8 +814,8 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
if ((flags & DC_EXEC) != 0) TransferCargo(w, new_head, true); if ((flags & DC_EXEC) != 0) TransferCargo(w, new_head, true);
if ((flags & DC_EXEC) != 0) { if ((flags & DC_EXEC) != 0) {
old_vehs[i] = nullptr; it->old_veh = nullptr;
if (i == 0) old_head = nullptr; if (it == std::begin(replacements)) old_head = nullptr;
} }
/* Sell the vehicle. /* Sell the vehicle.
* Note: This might temporarily construct new trains, so use DC_AUTOREPLACE to prevent * Note: This might temporarily construct new trains, so use DC_AUTOREPLACE to prevent
@ -829,8 +836,8 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
assert(Train::From(old_head)->GetNextUnit() == nullptr); assert(Train::From(old_head)->GetNextUnit() == nullptr);
for (int i = num_units - 1; i > 0; i--) { for (auto it = std::rbegin(replacements); it != std::rend(replacements); ++it) {
[[maybe_unused]] CommandCost ret = CmdMoveVehicle(old_vehs[i], old_head, DC_EXEC | DC_AUTOREPLACE, false); [[maybe_unused]] CommandCost ret = CmdMoveVehicle(it->old_veh, old_head, DC_EXEC | DC_AUTOREPLACE, false);
assert(ret.Succeeded()); assert(ret.Succeeded());
} }
} }
@ -838,17 +845,13 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
/* Finally undo buying of new vehicles */ /* Finally undo buying of new vehicles */
if ((flags & DC_EXEC) == 0) { if ((flags & DC_EXEC) == 0) {
for (int i = num_units - 1; i >= 0; i--) { for (auto it = std::rbegin(replacements); it != std::rend(replacements); ++it) {
if (new_vehs[i] != nullptr) { if (it->new_veh != nullptr) {
DoCommand(0, new_vehs[i]->index, 0, DC_EXEC, GetCmdSellVeh(new_vehs[i])); DoCommand(0, it->new_veh->index, 0, DC_EXEC, GetCmdSellVeh(it->new_veh));
new_vehs[i] = nullptr; it->new_veh = nullptr;
} }
} }
} }
free(old_vehs);
free(new_vehs);
free(new_costs);
} else { } else {
/* Build and refit replacement vehicle */ /* Build and refit replacement vehicle */
Vehicle *new_head = nullptr; Vehicle *new_head = nullptr;

@ -77,7 +77,7 @@ struct CompanyProperties {
byte money_fraction; ///< Fraction of money of the company, too small to represent in #money. byte money_fraction; ///< Fraction of money of the company, too small to represent in #money.
Money current_loan; ///< Amount of money borrowed from the bank. Money current_loan; ///< Amount of money borrowed from the bank.
byte colour; ///< Company colour. Colours colour; ///< Company colour.
byte block_preview; ///< Number of quarters that the company is not allowed to get new exclusive engine previews (see CompaniesGenStatistics). byte block_preview; ///< Number of quarters that the company is not allowed to get new exclusive engine previews (see CompaniesGenStatistics).
@ -120,7 +120,7 @@ struct CompanyProperties {
// TODO: Change some of these member variables to use relevant INVALID_xxx constants // TODO: Change some of these member variables to use relevant INVALID_xxx constants
CompanyProperties() CompanyProperties()
: name_2(0), name_1(0), president_name_1(0), president_name_2(0), : name_2(0), name_1(0), president_name_1(0), president_name_2(0),
face(0), money(0), money_fraction(0), current_loan(0), colour(0), block_preview(0), face(0), money(0), money_fraction(0), current_loan(0), colour(COLOUR_BEGIN), block_preview(0),
location_of_HQ(0), last_build_coordinate(0), share_owners(), inaugurated_year(0), location_of_HQ(0), last_build_coordinate(0), share_owners(), inaugurated_year(0),
months_of_bankruptcy(0), bankrupt_last_asked(INVALID_COMPANY), bankrupt_flags(CBRF_NONE), bankrupt_asked(0), bankrupt_timeout(0), bankrupt_value(0), months_of_bankruptcy(0), bankrupt_last_asked(INVALID_COMPANY), bankrupt_flags(CBRF_NONE), bankrupt_asked(0), bankrupt_timeout(0), bankrupt_value(0),
terraform_limit(0), clear_limit(0), tree_limit(0), purchase_land_limit(0), build_object_limit(0), is_ai(false), engine_renew_list(nullptr) {} terraform_limit(0), clear_limit(0), tree_limit(0), purchase_land_limit(0), build_object_limit(0), is_ai(false), engine_renew_list(nullptr) {}

@ -483,7 +483,7 @@ static Colours GenerateCompanyColour()
/* Move the colours that look similar to each company's colour to the side */ /* Move the colours that look similar to each company's colour to the side */
for (const Company *c : Company::Iterate()) { for (const Company *c : Company::Iterate()) {
Colours pcolour = (Colours)c->colour; Colours pcolour = c->colour;
for (uint i = 0; i < COLOUR_END; i++) { for (uint i = 0; i < COLOUR_END; i++) {
if (colours[i] == pcolour) { if (colours[i] == pcolour) {
@ -587,7 +587,7 @@ Company *DoStartupNewCompany(DoStartupNewCompanyFlag flags, CompanyID company)
c->colour = colour; c->colour = colour;
ResetCompanyLivery(c); ResetCompanyLivery(c);
_company_colours[c->index] = (Colours)c->colour; _company_colours[c->index] = c->colour;
/* Scale the initial loan based on the inflation rounded down to the loan interval. The maximum loan has already been inflation adjusted. */ /* Scale the initial loan based on the inflation rounded down to the loan interval. The maximum loan has already been inflation adjusted. */
c->money = c->current_loan = std::min<int64_t>((INITIAL_LOAN * _economy.inflation_prices >> 16) / LOAN_INTERVAL * LOAN_INTERVAL, _economy.max_loan); c->money = c->current_loan = std::min<int64_t>((INITIAL_LOAN * _economy.inflation_prices >> 16) / LOAN_INTERVAL * LOAN_INTERVAL, _economy.max_loan);
@ -1105,7 +1105,7 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32_t p1
if (flags & DC_EXEC) { if (flags & DC_EXEC) {
if (!second) { if (!second) {
if (scheme != LS_DEFAULT) SB(c->livery[scheme].in_use, 0, 1, colour != INVALID_COLOUR); if (scheme != LS_DEFAULT) SB(c->livery[scheme].in_use, 0, 1, colour != INVALID_COLOUR);
if (colour == INVALID_COLOUR) colour = (Colours)c->livery[LS_DEFAULT].colour1; if (colour == INVALID_COLOUR) colour = c->livery[LS_DEFAULT].colour1;
c->livery[scheme].colour1 = colour; c->livery[scheme].colour1 = colour;
/* If setting the first colour of the default scheme, adjust the /* If setting the first colour of the default scheme, adjust the
@ -1118,7 +1118,7 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32_t p1
} }
} else { } else {
if (scheme != LS_DEFAULT) SB(c->livery[scheme].in_use, 1, 1, colour != INVALID_COLOUR); if (scheme != LS_DEFAULT) SB(c->livery[scheme].in_use, 1, 1, colour != INVALID_COLOUR);
if (colour == INVALID_COLOUR) colour = (Colours)c->livery[LS_DEFAULT].colour2; if (colour == INVALID_COLOUR) colour = c->livery[LS_DEFAULT].colour2;
c->livery[scheme].colour2 = colour; c->livery[scheme].colour2 = colour;
if (scheme == LS_DEFAULT) { if (scheme == LS_DEFAULT) {

@ -625,7 +625,7 @@ static const LiveryClass _livery_class[LS_END] = {
template <SpriteID TSprite = SPR_SQUARE> template <SpriteID TSprite = SPR_SQUARE>
class DropDownListColourItem : public DropDownIcon<DropDownString<DropDownListItem>> { class DropDownListColourItem : public DropDownIcon<DropDownString<DropDownListItem>> {
public: public:
DropDownListColourItem(int colour, bool masked) : DropDownIcon<DropDownString<DropDownListItem>>(TSprite, PALETTE_RECOLOUR_START + (colour % COLOUR_END), colour < COLOUR_END ? _colour_dropdown[colour] : STR_COLOUR_DEFAULT, colour, masked) DropDownListColourItem(int colour, bool masked) : DropDownIcon<DropDownString<DropDownListItem>>(TSprite, GENERAL_SPRITE_COLOUR(colour % COLOUR_END), colour < COLOUR_END ? _colour_dropdown[colour] : STR_COLOUR_DEFAULT, colour, masked)
{ {
} }
}; };
@ -688,7 +688,12 @@ private:
list.push_back(std::make_unique<DropDownListColourItem<>>(i, HasBit(used_colours, i))); list.push_back(std::make_unique<DropDownListColourItem<>>(i, HasBit(used_colours, i)));
} }
byte sel = (default_livery == nullptr || HasBit(livery->in_use, primary ? 0 : 1)) ? (primary ? livery->colour1 : livery->colour2) : default_col; byte sel;
if (default_livery == nullptr || HasBit(livery->in_use, primary ? 0 : 1)) {
sel = primary ? livery->colour1 : livery->colour2;
} else {
sel = default_col;
}
ShowDropDownList(this, std::move(list), sel, widget); ShowDropDownList(this, std::move(list), sel, widget);
} }
@ -1055,7 +1060,8 @@ public:
bool local = (CompanyID)this->window_number == _local_company; bool local = (CompanyID)this->window_number == _local_company;
if (!local) return; if (!local) return;
if (index >= COLOUR_END) index = INVALID_COLOUR; Colours colour = static_cast<Colours>(index);
if (colour >= COLOUR_END) colour = INVALID_COLOUR;
if (this->livery_class < LC_GROUP_RAIL) { if (this->livery_class < LC_GROUP_RAIL) {
/* Set company colour livery */ /* Set company colour livery */
@ -1170,7 +1176,7 @@ void ShowCompanyLiveryWindow(CompanyID company, GroupID group)
* @param colour the (background) colour of the gradient * @param colour the (background) colour of the gradient
* @param r position to draw the face * @param r position to draw the face
*/ */
void DrawCompanyManagerFace(CompanyManagerFace cmf, int colour, const Rect &r) void DrawCompanyManagerFace(CompanyManagerFace cmf, Colours colour, const Rect &r)
{ {
GenderEthnicity ge = (GenderEthnicity)GetCompanyManagerFaceBits(cmf, CMFV_GEN_ETHN, GE_WM); GenderEthnicity ge = (GenderEthnicity)GetCompanyManagerFaceBits(cmf, CMFV_GEN_ETHN, GE_WM);

@ -236,6 +236,6 @@ inline SpriteID GetCompanyManagerFaceSprite(CompanyManagerFace cmf, CompanyManag
return _cmf_info[cmfv].first_sprite[ge] + GB(cmf, _cmf_info[cmfv].offset, _cmf_info[cmfv].length); return _cmf_info[cmfv].first_sprite[ge] + GB(cmf, _cmf_info[cmfv].offset, _cmf_info[cmfv].length);
} }
void DrawCompanyManagerFace(CompanyManagerFace face, int colour, const Rect &r); void DrawCompanyManagerFace(CompanyManagerFace face, Colours colour, const Rect &r);
#endif /* COMPANY_MANAGER_FACE_H */ #endif /* COMPANY_MANAGER_FACE_H */

@ -58,7 +58,7 @@ debug_inline constexpr static uint GB(const T x, const uint8_t s, const uint8_t
* @return The new value of \a x * @return The new value of \a x
*/ */
template <typename T, typename U> template <typename T, typename U>
inline T SB(T &x, const uint8_t s, const uint8_t n, const U d) constexpr T SB(T &x, const uint8_t s, const uint8_t n, const U d)
{ {
x &= (T)(~((((T)1U << n) - 1) << s)); x &= (T)(~((((T)1U << n) - 1) << s));
typename std::make_unsigned<T>::type td = d; typename std::make_unsigned<T>::type td = d;
@ -84,7 +84,7 @@ inline T SB(T &x, const uint8_t s, const uint8_t n, const U d)
* @return The new value of \a x * @return The new value of \a x
*/ */
template <typename T, typename U> template <typename T, typename U>
inline T AB(T &x, const uint8_t s, const uint8_t n, const U i) constexpr T AB(T &x, const uint8_t s, const uint8_t n, const U i)
{ {
const T mask = ((((T)1U << n) - 1) << s); const T mask = ((((T)1U << n) - 1) << s);
x = (T)((x & ~mask) | ((x + (i << s)) & mask)); x = (T)((x & ~mask) | ((x + (i << s)) & mask));
@ -104,7 +104,7 @@ inline T AB(T &x, const uint8_t s, const uint8_t n, const U i)
* @return True if the bit is set, false else. * @return True if the bit is set, false else.
*/ */
template <typename T> template <typename T>
debug_inline static bool HasBit(const T x, const uint8_t y) debug_inline constexpr bool HasBit(const T x, const uint8_t y)
{ {
return (x & ((T)1U << y)) != 0; return (x & ((T)1U << y)) != 0;
} }
@ -122,7 +122,7 @@ debug_inline static bool HasBit(const T x, const uint8_t y)
* @return The new value of the old value with the bit set * @return The new value of the old value with the bit set
*/ */
template <typename T> template <typename T>
inline T SetBit(T &x, const uint8_t y) constexpr T SetBit(T &x, const uint8_t y)
{ {
return x = (T)(x | ((T)1U << y)); return x = (T)(x | ((T)1U << y));
} }
@ -152,7 +152,7 @@ inline T SetBit(T &x, const uint8_t y)
* @return The new value of the old value with the bit cleared * @return The new value of the old value with the bit cleared
*/ */
template <typename T> template <typename T>
inline T ClrBit(T &x, const uint8_t y) constexpr T ClrBit(T &x, const uint8_t y)
{ {
return x = (T)(x & ~((T)1U << y)); return x = (T)(x & ~((T)1U << y));
} }
@ -182,7 +182,7 @@ inline T ClrBit(T &x, const uint8_t y)
* @return The new value of the old value with the bit toggled * @return The new value of the old value with the bit toggled
*/ */
template <typename T> template <typename T>
inline T ToggleBit(T &x, const uint8_t y) constexpr T ToggleBit(T &x, const uint8_t y)
{ {
return x = (T)(x ^ ((T)1U << y)); return x = (T)(x ^ ((T)1U << y));
} }
@ -261,7 +261,7 @@ constexpr uint8_t FindLastBit(T x)
* @return The new value with the first bit cleared * @return The new value with the first bit cleared
*/ */
template <typename T> template <typename T>
inline T KillFirstBit(T value) constexpr T KillFirstBit(T value)
{ {
return value &= (T)(value - 1); return value &= (T)(value - 1);
} }
@ -313,7 +313,7 @@ inline bool IsOddParity(T value)
* @return does \a value have exactly 1 bit set? * @return does \a value have exactly 1 bit set?
*/ */
template <typename T> template <typename T>
inline bool HasExactlyOneBit(T value) constexpr bool HasExactlyOneBit(T value)
{ {
return value != 0 && (value & (value - 1)) == 0; return value != 0 && (value & (value - 1)) == 0;
} }
@ -325,7 +325,7 @@ inline bool HasExactlyOneBit(T value)
* @return does \a value have at most 1 bit set? * @return does \a value have at most 1 bit set?
*/ */
template <typename T> template <typename T>
inline bool HasAtMostOneBit(T value) constexpr bool HasAtMostOneBit(T value)
{ {
return (value & (value - 1)) == 0; return (value & (value - 1)) == 0;
} }

@ -13,41 +13,6 @@
#include "../safeguards.h" #include "../safeguards.h"
/**
* Compute least common multiple (lcm) of arguments \a a and \a b, the smallest
* integer value that is a multiple of both \a a and \a b.
* @param a First number.
* @param b second number.
* @return Least common multiple of values \a a and \a b.
*
* @note This function only works for non-negative values of \a a and \a b.
*/
int LeastCommonMultiple(int a, int b)
{
if (a == 0 || b == 0) return 0; // By definition.
if (a == 1 || a == b) return b;
if (b == 1) return a;
return a * b / GreatestCommonDivisor(a, b);
}
/**
* Compute greatest common divisor (gcd) of \a a and \a b.
* @param a First number.
* @param b second number.
* @return Greatest common divisor of \a a and \a b.
*/
int GreatestCommonDivisor(int a, int b)
{
while (b != 0) {
int t = b;
b = a % b;
a = t;
}
return a;
}
/** /**
* Deterministic approximate division. * Deterministic approximate division.
* Cancels out division errors stemming from the integer nature of the division over multiple runs. * Cancels out division errors stemming from the integer nature of the division over multiple runs.

@ -23,7 +23,7 @@
* @return The unsigned value * @return The unsigned value
*/ */
template <typename T> template <typename T>
inline T abs(const T a) constexpr T abs(const T a)
{ {
return (a < (T)0) ? -a : a; return (a < (T)0) ? -a : a;
} }
@ -37,7 +37,7 @@ inline T abs(const T a)
* @return The smallest multiple of n equal or greater than x * @return The smallest multiple of n equal or greater than x
*/ */
template <typename T> template <typename T>
inline T Align(const T x, uint n) constexpr T Align(const T x, uint n)
{ {
assert((n & (n - 1)) == 0 && n != 0); assert((n & (n - 1)) == 0 && n != 0);
n--; n--;
@ -55,7 +55,7 @@ inline T Align(const T x, uint n)
* @see Align() * @see Align()
*/ */
template <typename T> template <typename T>
inline T *AlignPtr(T *x, uint n) constexpr T *AlignPtr(T *x, uint n)
{ {
static_assert(sizeof(size_t) == sizeof(void *)); static_assert(sizeof(size_t) == sizeof(void *));
return reinterpret_cast<T *>(Align((size_t)x, n)); return reinterpret_cast<T *>(Align((size_t)x, n));
@ -79,7 +79,7 @@ inline T *AlignPtr(T *x, uint n)
* @see Clamp(int, int, int) * @see Clamp(int, int, int)
*/ */
template <typename T> template <typename T>
inline T Clamp(const T a, const T min, const T max) constexpr T Clamp(const T a, const T min, const T max)
{ {
assert(min <= max); assert(min <= max);
if (a <= min) return min; if (a <= min) return min;
@ -102,7 +102,7 @@ inline T Clamp(const T a, const T min, const T max)
* @returns A value between min and max which is closest to a. * @returns A value between min and max which is closest to a.
*/ */
template <typename T> template <typename T>
inline T SoftClamp(const T a, const T min, const T max) constexpr T SoftClamp(const T a, const T min, const T max)
{ {
if (min > max) { if (min > max) {
using U = std::make_unsigned_t<T>; using U = std::make_unsigned_t<T>;
@ -129,7 +129,7 @@ inline T SoftClamp(const T a, const T min, const T max)
* @returns A value between min and max which is closest to a. * @returns A value between min and max which is closest to a.
* @see ClampU(uint, uint, uint) * @see ClampU(uint, uint, uint)
*/ */
inline int Clamp(const int a, const int min, const int max) constexpr int Clamp(const int a, const int min, const int max)
{ {
return Clamp<int>(a, min, max); return Clamp<int>(a, min, max);
} }
@ -150,7 +150,7 @@ inline int Clamp(const int a, const int min, const int max)
* @returns A value between min and max which is closest to a. * @returns A value between min and max which is closest to a.
* @see Clamp(int, int, int) * @see Clamp(int, int, int)
*/ */
inline uint ClampU(const uint a, const uint min, const uint max) constexpr uint ClampU(const uint a, const uint min, const uint max)
{ {
return Clamp<uint>(a, min, max); return Clamp<uint>(a, min, max);
} }
@ -234,7 +234,7 @@ constexpr To ClampTo(From value)
* @return The absolute difference between the given scalars * @return The absolute difference between the given scalars
*/ */
template <typename T> template <typename T>
inline T Delta(const T a, const T b) constexpr T Delta(const T a, const T b)
{ {
return (a < b) ? b - a : a - b; return (a < b) ? b - a : a - b;
} }
@ -252,7 +252,7 @@ inline T Delta(const T a, const T b)
* @return True if the value is in the interval, false else. * @return True if the value is in the interval, false else.
*/ */
template <typename T> template <typename T>
inline bool IsInsideBS(const T x, const size_t base, const size_t size) constexpr bool IsInsideBS(const T x, const size_t base, const size_t size)
{ {
return (size_t)(x - base) < size; return (size_t)(x - base) < size;
} }
@ -268,7 +268,7 @@ inline bool IsInsideBS(const T x, const size_t base, const size_t size)
* @see IsInsideBS() * @see IsInsideBS()
*/ */
template <typename T, std::enable_if_t<std::disjunction_v<std::is_convertible<T, size_t>, std::is_base_of<StrongTypedefBase, T>>, int> = 0> template <typename T, std::enable_if_t<std::disjunction_v<std::is_convertible<T, size_t>, std::is_base_of<StrongTypedefBase, T>>, int> = 0>
static constexpr inline bool IsInsideMM(const T x, const size_t min, const size_t max) noexcept constexpr bool IsInsideMM(const T x, const size_t min, const size_t max) noexcept
{ {
if constexpr (std::is_base_of_v<StrongTypedefBase, T>) { if constexpr (std::is_base_of_v<StrongTypedefBase, T>) {
return (size_t)(x.base() - min) < (max - min); return (size_t)(x.base() - min) < (max - min);
@ -283,7 +283,7 @@ static constexpr inline bool IsInsideMM(const T x, const size_t min, const size_
* @param b variable to swap with a * @param b variable to swap with a
*/ */
template <typename T> template <typename T>
inline void Swap(T &a, T &b) constexpr void Swap(T &a, T &b)
{ {
T t = a; T t = a;
a = b; a = b;
@ -295,7 +295,7 @@ inline void Swap(T &a, T &b)
* @param i value to convert, range 0..255 * @param i value to convert, range 0..255
* @return value in range 0..100 * @return value in range 0..100
*/ */
inline uint ToPercent8(uint i) constexpr uint ToPercent8(uint i)
{ {
assert(i < 256); assert(i < 256);
return i * 101 >> 8; return i * 101 >> 8;
@ -306,14 +306,12 @@ inline uint ToPercent8(uint i)
* @param i value to convert, range 0..65535 * @param i value to convert, range 0..65535
* @return value in range 0..100 * @return value in range 0..100
*/ */
inline uint ToPercent16(uint i) constexpr uint ToPercent16(uint i)
{ {
assert(i < 65536); assert(i < 65536);
return i * 101 >> 16; return i * 101 >> 16;
} }
int LeastCommonMultiple(int a, int b);
int GreatestCommonDivisor(int a, int b);
int DivideApprox(int a, int b); int DivideApprox(int a, int b);
/** /**
@ -322,7 +320,7 @@ int DivideApprox(int a, int b);
* @param b Denominator * @param b Denominator
* @return Quotient, rounded up * @return Quotient, rounded up
*/ */
inline uint CeilDiv(uint a, uint b) constexpr uint CeilDiv(uint a, uint b)
{ {
return (a + b - 1) / b; return (a + b - 1) / b;
} }
@ -334,7 +332,7 @@ inline uint CeilDiv(uint a, uint b)
* @return Quotient, rounded up * @return Quotient, rounded up
*/ */
template <typename T> template <typename T>
inline T CeilDivT(T a, T b) constexpr inline T CeilDivT(T a, T b)
{ {
return (a + b - 1) / b; return (a + b - 1) / b;
} }
@ -345,7 +343,7 @@ inline T CeilDivT(T a, T b)
* @param b Denominator * @param b Denominator
* @return a rounded up to the nearest multiple of b. * @return a rounded up to the nearest multiple of b.
*/ */
inline uint Ceil(uint a, uint b) constexpr uint Ceil(uint a, uint b)
{ {
return CeilDiv(a, b) * b; return CeilDiv(a, b) * b;
} }
@ -357,7 +355,7 @@ inline uint Ceil(uint a, uint b)
* @return a rounded up to the nearest multiple of b. * @return a rounded up to the nearest multiple of b.
*/ */
template <typename T> template <typename T>
inline T CeilT(T a, T b) constexpr inline T CeilT(T a, T b)
{ {
return CeilDivT<T>(a, b) * b; return CeilDivT<T>(a, b) * b;
} }
@ -368,7 +366,7 @@ inline T CeilT(T a, T b)
* @param b Denominator * @param b Denominator
* @return Quotient, rounded to nearest * @return Quotient, rounded to nearest
*/ */
inline int RoundDivSU(int a, uint b) constexpr int RoundDivSU(int a, uint b)
{ {
if (a > 0) { if (a > 0) {
/* 0.5 is rounded to 1 */ /* 0.5 is rounded to 1 */
@ -385,7 +383,7 @@ inline int RoundDivSU(int a, uint b)
* @param b Denominator * @param b Denominator
* @return Quotient, rounded away from zero * @return Quotient, rounded away from zero
*/ */
inline int DivAwayFromZero(int a, uint b) constexpr int DivAwayFromZero(int a, uint b)
{ {
const int _b = static_cast<int>(b); const int _b = static_cast<int>(b);
if (a > 0) { if (a > 0) {
@ -403,7 +401,7 @@ inline int DivAwayFromZero(int a, uint b)
* @return Quotient, rounded towards negative infinity * @return Quotient, rounded towards negative infinity
*/ */
template <typename T> template <typename T>
inline T DivTowardsNegativeInf(T a, T b) constexpr inline T DivTowardsNegativeInf(T a, T b)
{ {
return (a / b) - (a % b < 0 ? 1 : 0); return (a / b) - (a % b < 0 ? 1 : 0);
} }
@ -415,7 +413,7 @@ inline T DivTowardsNegativeInf(T a, T b)
* @return Quotient, rounded towards positive infinity * @return Quotient, rounded towards positive infinity
*/ */
template <typename T> template <typename T>
inline T DivTowardsPositiveInf(T a, T b) constexpr inline T DivTowardsPositiveInf(T a, T b)
{ {
return (a / b) + (a % b > 0 ? 1 : 0); return (a / b) + (a % b > 0 ? 1 : 0);
} }

@ -12,97 +12,6 @@
#include "safeguards.h" #include "safeguards.h"
#undef RDTSC_AVAILABLE
/* rdtsc for MSC_VER, uses simple inline assembly, or _rdtsc
* from external win64.asm because VS2005 does not support inline assembly */
#if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE)
#include <intrin.h>
#include <windows.h>
uint64_t ottd_rdtsc()
{
#if defined(_M_ARM)
return __rdpmccntr64();
#elif defined(_M_ARM64)
return _ReadStatusReg(ARM64_PMCCNTR_EL0);
#else
return __rdtsc();
#endif
}
#define RDTSC_AVAILABLE
#endif
/* rdtsc for all other *nix-en (hopefully). Use GCC syntax */
#if (defined(__i386__) || defined(__x86_64__)) && !defined(RDTSC_AVAILABLE)
uint64_t ottd_rdtsc()
{
uint32_t high, low;
__asm__ __volatile__ ("rdtsc" : "=a" (low), "=d" (high));
return ((uint64_t)high << 32) | low;
}
# define RDTSC_AVAILABLE
#endif
/* rdtsc for AARCH64. Use GCC syntax */
#if defined(__aarch64__) && !defined(RDTSC_AVAILABLE)
uint64_t ottd_rdtsc()
{
uint64_t val;
asm volatile("mrs %0, cntvct_el0" : "=r" (val));
return val;
}
# define RDTSC_AVAILABLE
#endif
/* rdtsc for PPC which has this not */
#if (defined(__POWERPC__) || defined(__powerpc__)) && !defined(RDTSC_AVAILABLE)
uint64_t ottd_rdtsc()
{
uint32_t high = 0, high2 = 0, low;
/* PPC does not have rdtsc, so we cheat by reading the two 32-bit time-counters
* it has, 'Move From Time Base (Upper)'. Since these are two reads, in the
* very unlikely event that the lower part overflows to the upper part while we
* read it; we double-check and reread the registers */
asm volatile (
"mftbu %0\n"
"mftb %1\n"
"mftbu %2\n"
"cmpw %3,%4\n"
"bne- $-16\n"
: "=r" (high), "=r" (low), "=r" (high2)
: "0" (high), "2" (high2)
);
return ((uint64_t)high << 32) | low;
}
# define RDTSC_AVAILABLE
#endif
/* rdtsc for MCST Elbrus 2000 */
#if defined(__e2k__) && !defined(RDTSC_AVAILABLE)
uint64_t ottd_rdtsc()
{
uint64_t dst;
# pragma asm_inline
asm("rrd %%clkr, %0" : "=r" (dst));
return dst;
}
# define RDTSC_AVAILABLE
#endif
#if defined(__EMSCRIPTEN__) && !defined(RDTSC_AVAILABLE)
/* On emscripten doing TIC/TOC would be ill-advised */
uint64_t ottd_rdtsc() {return 0;}
# define RDTSC_AVAILABLE
#endif
/* In all other cases we have no support for rdtsc. No major issue,
* you just won't be able to profile your code with TIC()/TOC() */
#if !defined(RDTSC_AVAILABLE)
#warning "(non-fatal) No support for rdtsc(), you won't be able to profile with TIC/TOC"
uint64_t ottd_rdtsc() {return 0;}
#endif
/** /**
* Definitions for CPU detection: * Definitions for CPU detection:
* *

@ -10,12 +10,6 @@
#ifndef CPU_H #ifndef CPU_H
#define CPU_H #define CPU_H
/**
* Get the tick counter from the CPU (high precision timing).
* @return The count.
*/
uint64_t ottd_rdtsc();
/** /**
* Get the CPUID information from the CPU. * Get the CPUID information from the CPU.
* @param info The retrieved info. All zeros on architectures without CPUID. * @param info The retrieved info. All zeros on architectures without CPUID.

@ -11,6 +11,7 @@
#include <stdarg.h> #include <stdarg.h>
#include "console_func.h" #include "console_func.h"
#include "debug.h" #include "debug.h"
#include "debug_fmt.h"
#include "string_func.h" #include "string_func.h"
#include "fileio_func.h" #include "fileio_func.h"
#include "settings_type.h" #include "settings_type.h"
@ -458,3 +459,10 @@ void DebugReconsiderSendRemoteMessages()
_debug_remote_console.store(enable); _debug_remote_console.store(enable);
} }
void TicToc::PrintAndReset()
{
Debug(misc, 0, "[{}] {} us [avg: {:.1f} us]", this->state.name, this->state.chrono_sum, this->state.chrono_sum / static_cast<double>(this->state.count));
this->state.count = 0;
this->state.chrono_sum = 0;
}

@ -74,59 +74,39 @@ std::string GetDebugString();
/* Shorter form for passing filename and linenumber */ /* Shorter form for passing filename and linenumber */
#define FILE_LINE __FILE__, __LINE__ #define FILE_LINE __FILE__, __LINE__
/* Used for profiling /** TicToc profiling.
*
* Usage: * Usage:
* TIC(); * static TicToc::State state("A name", 1);
* --Do your code-- * TicToc tt(state);
* TOC("A name", 1); * --Do your code--
* */
* When you run the TIC() / TOC() multiple times, you can increase the '1' struct TicToc {
* to only display average stats every N values. Some things to know: /** Persistent state for TicToc profiling. */
* struct State {
* for (int i = 0; i < 5; i++) { const std::string_view name;
* TIC(); const uint32_t max_count;
* --Do your code-- uint32_t count = 0;
* TOC("A name", 5); uint64_t chrono_sum = 0;
* }
* constexpr State(std::string_view name, uint32_t max_count) : name(name), max_count(max_count) { }
* Is the correct usage for multiple TIC() / TOC() calls. };
*
* TIC() / TOC() creates its own block, so make sure not the mangle State &state;
* it with another block. std::chrono::high_resolution_clock::time_point chrono_start; ///< real time count.
*
* The output is counted in CPU cycles, and not comparable across inline TicToc(State &state) : state(state), chrono_start(std::chrono::high_resolution_clock::now()) { }
* machines. Mainly useful for local optimisations.
**/ inline ~TicToc()
#define TIC() {\ {
uint64_t _xxx_ = ottd_rdtsc();\ this->state.chrono_sum += (std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - this->chrono_start)).count();
static uint64_t _sum_ = 0;\ if (++this->state.count == this->state.max_count) {
static uint32_t _i_ = 0; this->PrintAndReset();
}
#define TOC(str, count)\ }
_sum_ += ottd_rdtsc() - _xxx_;\
if (++_i_ == count) {\
DEBUG(misc, 0, "[%s] " OTTD_PRINTF64 " [avg: %.1f]", str, _sum_, _sum_/(double)_i_);\
_i_ = 0;\
_sum_ = 0;\
}\
}
/* Chrono based version. The output is in microseconds. */
#define TICC() {\
auto _start_ = std::chrono::high_resolution_clock::now();\
static uint64_t _sum_ = 0;\
static uint32_t _i_ = 0;
#define TOCC(str, _count_)\
_sum_ += (std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - _start_)).count();\
if (++_i_ == _count_) {\
DEBUG(misc, 0, "[%s] " OTTD_PRINTF64 " us [avg: %.1f us]", str, _sum_, _sum_/(double)_i_);\
_i_ = 0;\
_sum_ = 0;\
}\
}
private:
void PrintAndReset();
};
void ShowInfoI(const char *str); void ShowInfoI(const char *str);
void CDECL ShowInfoF(const char *str, ...) WARN_FORMAT(1, 2); void CDECL ShowInfoF(const char *str, ...) WARN_FORMAT(1, 2);

@ -405,110 +405,45 @@ struct GoalQuestionWindow : public Window {
} }
}; };
/** Widgets of the goal question window. */ /**
static constexpr NWidgetPart _nested_goal_question_widgets_question[] = { * Widgets of the goal question window.
NWidget(NWID_HORIZONTAL), * @tparam bg_colour Background colour.
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE), * @tparam btn_colour Button colour.
NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, WID_GQ_CAPTION), SetDataTip(STR_GOAL_QUESTION_CAPTION_QUESTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), * @tparam caption Window caption string.
EndContainer(), */
NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE), template <Colours bg_colour, Colours btn_colour, StringID caption>
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.modalpopup), struct NestedGoalWidgets {
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_GQ_QUESTION), SetMinimalSize(300, 0), SetFill(1, 0), static constexpr auto widgetparts = {
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_GQ_BUTTONS), NWidget(NWID_HORIZONTAL),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(85, WidgetDimensions::unscaled.hsep_wide, 85), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0), NWidget(WWT_CLOSEBOX, bg_colour),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0), NWidget(WWT_CAPTION, bg_colour, WID_GQ_CAPTION), SetDataTip(STR_GOAL_QUESTION_CAPTION_QUESTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(65, WidgetDimensions::unscaled.hsep_wide, 65), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(25, WidgetDimensions::unscaled.hsep_wide, 25), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_3), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(),
EndContainer(),
EndContainer(), EndContainer(),
EndContainer(), NWidget(WWT_PANEL, bg_colour),
}; NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.modalpopup), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_GQ_QUESTION), SetMinimalSize(300, 0), SetFill(1, 0),
static constexpr NWidgetPart _nested_goal_question_widgets_info[] = { NWidget(NWID_SELECTION, INVALID_COLOUR, WID_GQ_BUTTONS),
NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(85, WidgetDimensions::unscaled.hsep_wide, 85),
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE), NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, WID_GQ_CAPTION), SetDataTip(STR_GOAL_QUESTION_CAPTION_INFORMATION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(),
EndContainer(), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(65, WidgetDimensions::unscaled.hsep_wide, 65),
NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE), NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.modalpopup), NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_GQ_QUESTION), SetMinimalSize(300, 0), SetFill(1, 0), EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_GQ_BUTTONS), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(25, WidgetDimensions::unscaled.hsep_wide, 25),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(85, WidgetDimensions::unscaled.hsep_wide, 85), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0), NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0), NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(), NWidget(WWT_PUSHTXTBTN, btn_colour, WID_GQ_BUTTON_3), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(65, WidgetDimensions::unscaled.hsep_wide, 65), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0), EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(25, WidgetDimensions::unscaled.hsep_wide, 25), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_GQ_BUTTON_3), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
EndContainer(), };
}; };
static constexpr NWidgetPart _nested_goal_question_widgets_warning[] = { static constexpr auto _nested_goal_question_widgets_question = NestedGoalWidgets<COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, STR_GOAL_QUESTION_CAPTION_QUESTION>::widgetparts;
NWidget(NWID_HORIZONTAL), static constexpr auto _nested_goal_question_widgets_info = NestedGoalWidgets<COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, STR_GOAL_QUESTION_CAPTION_INFORMATION>::widgetparts;
NWidget(WWT_CLOSEBOX, COLOUR_YELLOW), static constexpr auto _nested_goal_question_widgets_warning = NestedGoalWidgets<COLOUR_YELLOW, COLOUR_YELLOW, STR_GOAL_QUESTION_CAPTION_WARNING>::widgetparts;
NWidget(WWT_CAPTION, COLOUR_YELLOW, WID_GQ_CAPTION), SetDataTip(STR_GOAL_QUESTION_CAPTION_WARNING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), static constexpr auto _nested_goal_question_widgets_error = NestedGoalWidgets<COLOUR_RED, COLOUR_YELLOW, STR_GOAL_QUESTION_CAPTION_ERROR>::widgetparts;
EndContainer(),
NWidget(WWT_PANEL, COLOUR_YELLOW),
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.modalpopup),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_GQ_QUESTION), SetMinimalSize(300, 0), SetFill(1, 0),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_GQ_BUTTONS),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(85, WidgetDimensions::unscaled.hsep_wide, 85), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(65, WidgetDimensions::unscaled.hsep_wide, 65), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(25, WidgetDimensions::unscaled.hsep_wide, 25), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_3), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(),
EndContainer(),
EndContainer(),
EndContainer(),
};
static constexpr NWidgetPart _nested_goal_question_widgets_error[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_RED),
NWidget(WWT_CAPTION, COLOUR_RED, WID_GQ_CAPTION), SetDataTip(STR_GOAL_QUESTION_CAPTION_ERROR, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_RED),
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.modalpopup),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_GQ_QUESTION), SetMinimalSize(300, 0), SetFill(1, 0),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_GQ_BUTTONS),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(85, WidgetDimensions::unscaled.hsep_wide, 85), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(65, WidgetDimensions::unscaled.hsep_wide, 65), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(25, WidgetDimensions::unscaled.hsep_wide, 25), SetPadding(WidgetDimensions::unscaled.vsep_wide, 0, 0, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_1), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_2), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GQ_BUTTON_3), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(),
EndContainer(),
EndContainer(),
EndContainer(),
};
static WindowDesc _goal_question_list_desc[] = { static WindowDesc _goal_question_list_desc[] = {
{ {

@ -898,11 +898,11 @@ CommandCost CmdSetGroupLivery(TileIndex tile, DoCommandFlag flags, uint32_t p1,
if (flags & DC_EXEC) { if (flags & DC_EXEC) {
if (primary) { if (primary) {
SB(g->livery.in_use, 0, 1, colour != INVALID_COLOUR); SB(g->livery.in_use, 0, 1, colour != INVALID_COLOUR);
if (colour == INVALID_COLOUR) colour = (Colours)GetParentLivery(g)->colour1; if (colour == INVALID_COLOUR) colour = GetParentLivery(g)->colour1;
g->livery.colour1 = colour; g->livery.colour1 = colour;
} else { } else {
SB(g->livery.in_use, 1, 1, colour != INVALID_COLOUR); SB(g->livery.in_use, 1, 1, colour != INVALID_COLOUR);
if (colour == INVALID_COLOUR) colour = (Colours)GetParentLivery(g)->colour2; if (colour == INVALID_COLOUR) colour = GetParentLivery(g)->colour2;
g->livery.colour2 = colour; g->livery.colour2 = colour;
} }

@ -120,7 +120,7 @@ struct HouseSpec {
/* NewHouses properties */ /* NewHouses properties */
GRFFileProps grf_prop; ///< Properties related the the grf file GRFFileProps grf_prop; ///< Properties related the the grf file
uint16_t callback_mask; ///< Bitmask of house callbacks that have to be called uint16_t callback_mask; ///< Bitmask of house callbacks that have to be called
byte random_colour[4]; ///< 4 "random" colours Colours random_colour[4]; ///< 4 "random" colours
byte probability; ///< Relative probability of appearing (16 is the standard value) byte probability; ///< Relative probability of appearing (16 is the standard value)
HouseExtraFlags extra_flags; ///< some more flags HouseExtraFlags extra_flags; ///< some more flags
HouseCtrlFlags ctrl_flags; ///< control flags HouseCtrlFlags ctrl_flags; ///< control flags

@ -83,7 +83,7 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> {
uint16_t counter; ///< used for animation and/or production (if available cargo) uint16_t counter; ///< used for animation and/or production (if available cargo)
byte prod_level; ///< general production level byte prod_level; ///< general production level
byte random_colour; ///< randomized colour of the industry, for display purpose Colours random_colour; ///< randomized colour of the industry, for display purpose
Year last_prod_year; ///< last year of production Year last_prod_year; ///< last year of production
byte was_cargo_delivered; ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry byte was_cargo_delivered; ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry
IndustryControlFlags ctlflags; ///< flags overriding standard behaviours IndustryControlFlags ctlflags; ///< flags overriding standard behaviours

@ -1849,7 +1849,7 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type,
i->owner = OWNER_NONE; i->owner = OWNER_NONE;
uint16_t r = Random(); uint16_t r = Random();
i->random_colour = GB(r, 0, 4); i->random_colour = static_cast<Colours>(GB(r, 0, 4));
i->counter = GB(r, 4, 12); i->counter = GB(r, 4, 12);
i->random = initial_random_bits; i->random = initial_random_bits;
i->was_cargo_delivered = false; i->was_cargo_delivered = false;
@ -1903,7 +1903,7 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type,
uint16_t res = GetIndustryCallback(CBID_INDUSTRY_DECIDE_COLOUR, 0, 0, i, type, INVALID_TILE); uint16_t res = GetIndustryCallback(CBID_INDUSTRY_DECIDE_COLOUR, 0, 0, i, type, INVALID_TILE);
if (res != CALLBACK_FAILED) { if (res != CALLBACK_FAILED) {
if (GB(res, 4, 11) != 0) ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_DECIDE_COLOUR, res); if (GB(res, 4, 11) != 0) ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_DECIDE_COLOUR, res);
i->random_colour = GB(res, 0, 4); i->random_colour = static_cast<Colours>(GB(res, 0, 4));
} }
} }

@ -772,7 +772,7 @@ STR_SMALLMAP_LEGENDA_AIRCRAFT :{TINY_FONT}{BLA
STR_SMALLMAP_LEGENDA_TRANSPORT_ROUTES :{TINY_FONT}{BLACK}Rutes de transport STR_SMALLMAP_LEGENDA_TRANSPORT_ROUTES :{TINY_FONT}{BLACK}Rutes de transport
STR_SMALLMAP_LEGENDA_FOREST :{TINY_FONT}{BLACK}Bosc STR_SMALLMAP_LEGENDA_FOREST :{TINY_FONT}{BLACK}Bosc
STR_SMALLMAP_LEGENDA_RAILROAD_STATION :{TINY_FONT}{BLACK}Estació de ferrocarril STR_SMALLMAP_LEGENDA_RAILROAD_STATION :{TINY_FONT}{BLACK}Estació de ferrocarril
STR_SMALLMAP_LEGENDA_TRUCK_LOADING_BAY :{TINY_FONT}{BLACK}Moll de càrrega de camions STR_SMALLMAP_LEGENDA_TRUCK_LOADING_BAY :{TINY_FONT}{BLACK}Estació per a camions
STR_SMALLMAP_LEGENDA_BUS_STATION :{TINY_FONT}{BLACK}Parada d'autobús STR_SMALLMAP_LEGENDA_BUS_STATION :{TINY_FONT}{BLACK}Parada d'autobús
STR_SMALLMAP_LEGENDA_AIRPORT_HELIPORT :{TINY_FONT}{BLACK}Aeroport/Heliport STR_SMALLMAP_LEGENDA_AIRPORT_HELIPORT :{TINY_FONT}{BLACK}Aeroport/Heliport
STR_SMALLMAP_LEGENDA_DOCK :{TINY_FONT}{BLACK}Moll STR_SMALLMAP_LEGENDA_DOCK :{TINY_FONT}{BLACK}Moll
@ -904,7 +904,7 @@ STR_NEWS_VEHICLE_IS_UNPROFITABLE :{WHITE}El benef
STR_NEWS_AIRCRAFT_DEST_TOO_FAR :{WHITE}{VEHICLE} no pot arribar al proper destí perquè és fora del seu abast STR_NEWS_AIRCRAFT_DEST_TOO_FAR :{WHITE}{VEHICLE} no pot arribar al proper destí perquè és fora del seu abast
STR_NEWS_ORDER_REFIT_FAILED :{WHITE}El {VEHICLE} s'ha parat perquè l'ordre de remodelació ha fallat STR_NEWS_ORDER_REFIT_FAILED :{WHITE}El {VEHICLE} s'ha parat perquè l'ordre de remodelació ha fallat
STR_NEWS_VEHICLE_AUTORENEW_FAILED :{WHITE}L'autorenovació ha fallat en el {VEHICLE}{}{STRING} STR_NEWS_VEHICLE_AUTORENEW_FAILED :{WHITE}L'autorenovació de {VEHICLE} ha fallat.{}{STRING}
STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLACK}No{G u va} {STRING} disponible! STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLACK}No{G u va} {STRING} disponible!
STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE}
@ -1003,6 +1003,7 @@ STR_GAME_OPTIONS_CURRENCY_HKD :Dòlar de Hong
STR_GAME_OPTIONS_CURRENCY_INR :Rúpia índia STR_GAME_OPTIONS_CURRENCY_INR :Rúpia índia
STR_GAME_OPTIONS_CURRENCY_IDR :Rupia indonèsia STR_GAME_OPTIONS_CURRENCY_IDR :Rupia indonèsia
STR_GAME_OPTIONS_CURRENCY_MYR :Ringgit STR_GAME_OPTIONS_CURRENCY_MYR :Ringgit
STR_GAME_OPTIONS_CURRENCY_LVL :Lats letó
STR_GAME_OPTIONS_AUTOSAVE_FRAME :{BLACK}Desa automàticament STR_GAME_OPTIONS_AUTOSAVE_FRAME :{BLACK}Desa automàticament
STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_TOOLTIP :{BLACK}Selecciona l'interval de desada automàtica de la partida STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_TOOLTIP :{BLACK}Selecciona l'interval de desada automàtica de la partida
@ -1044,6 +1045,10 @@ STR_GAME_OPTIONS_GUI_SCALE_AUTO_TOOLTIP :{BLACK}Marqueu
STR_GAME_OPTIONS_GUI_SCALE_BEVELS :{BLACK}Escala els bisells STR_GAME_OPTIONS_GUI_SCALE_BEVELS :{BLACK}Escala els bisells
STR_GAME_OPTIONS_GUI_SCALE_BEVELS_TOOLTIP :{BLACK}Marqueu aquesta opció si voleu que s'escalin els bisells segons la mida de la interfície. STR_GAME_OPTIONS_GUI_SCALE_BEVELS_TOOLTIP :{BLACK}Marqueu aquesta opció si voleu que s'escalin els bisells segons la mida de la interfície.
STR_GAME_OPTIONS_GUI_FONT_SPRITE :{BLACK}Fes servir la font tradicional
STR_GAME_OPTIONS_GUI_FONT_SPRITE_TOOLTIP :{BLACK}Marqueu aquesta casella si preferiu fer servir la font tradicional de mida fixa i pixelada.
STR_GAME_OPTIONS_GUI_FONT_AA :{BLACK}Aplica anti-àlies a les fonts
STR_GAME_OPTIONS_GUI_FONT_AA_TOOLTIP :{BLACK}Marqueu aquesta casella per a fer servir tècniques d'anti-àlies a les fonts redimensionables.
STR_GAME_OPTIONS_GUI_SCALE_1X :x1 STR_GAME_OPTIONS_GUI_SCALE_1X :x1
STR_GAME_OPTIONS_GUI_SCALE_2X :x2 STR_GAME_OPTIONS_GUI_SCALE_2X :x2
@ -1779,6 +1784,8 @@ STR_CONFIG_SETTING_SERVINT_DISABLED :Desactivat
STR_CONFIG_SETTING_NOSERVICE :Desactiva les revisions quan les avaries s'estableixen a cap: {STRING} STR_CONFIG_SETTING_NOSERVICE :Desactiva les revisions quan les avaries s'estableixen a cap: {STRING}
STR_CONFIG_SETTING_NOSERVICE_HELPTEXT :Quan està activat, els vehicles no són revisats si no es poden espatllar STR_CONFIG_SETTING_NOSERVICE_HELPTEXT :Quan està activat, els vehicles no són revisats si no es poden espatllar
STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY :Penalització de la velocitat de càrrega per a trens més llargs que l'estació: {STRING}
STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY_HELPTEXT :Quan s'activa, els trens que són massa llargs per a l'estació es carreguen més a poc a poc que un tren que sí que hi cap. Aquesta opció no afecta als encaminadors; és a dir, no afecta als algoritmes que fan servir els trens per a decidir el camí per a arribar a l'estació.
STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Activa límits de velocitat per als vagons: {STRING} STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Activa límits de velocitat per als vagons: {STRING}
STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT :Quan està activat, també utilitza els límits de velocitat dels vagons per decidir la velocitat màxima del tren STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT :Quan està activat, també utilitza els límits de velocitat dels vagons per decidir la velocitat màxima del tren
@ -2055,14 +2062,17 @@ STR_CONFIG_SETTING_ACCOUNTING :Comptabilitat
STR_CONFIG_SETTING_VEHICLES :Vehicles STR_CONFIG_SETTING_VEHICLES :Vehicles
STR_CONFIG_SETTING_VEHICLES_PHYSICS :Lleis físiques STR_CONFIG_SETTING_VEHICLES_PHYSICS :Lleis físiques
STR_CONFIG_SETTING_VEHICLES_ROUTING :Recorreguts STR_CONFIG_SETTING_VEHICLES_ROUTING :Recorreguts
STR_CONFIG_SETTING_VEHICLES_ORDERS :Ordres
STR_CONFIG_SETTING_LIMITATIONS :Limitacions STR_CONFIG_SETTING_LIMITATIONS :Limitacions
STR_CONFIG_SETTING_ACCIDENTS :Desastres / Accidents STR_CONFIG_SETTING_ACCIDENTS :Desastres / Accidents
STR_CONFIG_SETTING_GENWORLD :Generació del món STR_CONFIG_SETTING_GENWORLD :Generació del món
STR_CONFIG_SETTING_ENVIRONMENT :Interacció amb l'entorn STR_CONFIG_SETTING_ENVIRONMENT :Interacció amb l'entorn
STR_CONFIG_SETTING_ENVIRONMENT_TIME :Temps
STR_CONFIG_SETTING_ENVIRONMENT_AUTHORITIES :Autoritats STR_CONFIG_SETTING_ENVIRONMENT_AUTHORITIES :Autoritats
STR_CONFIG_SETTING_ENVIRONMENT_TOWNS :Poblacions STR_CONFIG_SETTING_ENVIRONMENT_TOWNS :Poblacions
STR_CONFIG_SETTING_ENVIRONMENT_INDUSTRIES :Indústries STR_CONFIG_SETTING_ENVIRONMENT_INDUSTRIES :Indústries
STR_CONFIG_SETTING_ENVIRONMENT_CARGODIST :Distribució de la càrrega STR_CONFIG_SETTING_ENVIRONMENT_CARGODIST :Distribució de la càrrega
STR_CONFIG_SETTING_ENVIRONMENT_TREES :Arbres
STR_CONFIG_SETTING_AI :Competidors STR_CONFIG_SETTING_AI :Competidors
STR_CONFIG_SETTING_AI_NPC :Jugadors IA STR_CONFIG_SETTING_AI_NPC :Jugadors IA
STR_CONFIG_SETTING_NETWORK :Xarxa STR_CONFIG_SETTING_NETWORK :Xarxa
@ -2720,9 +2730,9 @@ STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :Construcció de
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Construeix vies de tren. Ctrl canvia entre contrueix/treu la construcció de vies. Shift commuta construeix/mostra el cost estimat STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Construeix vies de tren. Ctrl canvia entre contrueix/treu la construcció de vies. Shift commuta construeix/mostra el cost estimat
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Construeix vies de tren utilitzant el mode Autorail. Ctrl canvia entre construeix/treu la construcció de vies de tren. Shift commuta construeix/mostra el cost estimat STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Construeix vies de tren utilitzant el mode Autorail. Ctrl canvia entre construeix/treu la construcció de vies de tren. Shift commuta construeix/mostra el cost estimat
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Construeix unes cotxeres (per construir i revisar trens). Shift commuta construeix/mostra el cost estimat STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Construeix unes cotxeres (per construir i revisar trens). Shift commuta construeix/mostra el cost estimat
STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Converteix una via en un punt de control. Ctrl permet ajuntar punts de control. Shift commuta construeix/mostra el cost estimat STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Construeix un punt de control en una via de ferrocarril. Ctrl permet ajuntar punts de control. Amb Maj. es commuta entre construir o mostrar el cost estimat.
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Construeix una estació de tren. Ctrl permet ajuntar estacions. Shift commuta construeix/mostra el cost estimat STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Construeix una estació de tren. Ctrl permet ajuntar estacions. Shift commuta construeix/mostra el cost estimat
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Construeix senyals de tren. Ctrl commuta entre semàfors mecànics i elèctrics{}Arrossegant es construeixen senyals al llarg d'un tros recte de rail. Ctrl construeix senyals fins a la propera intersecció o senyal{}Ctrl+Clic commuta l'obertura de la finestra de detecció de senyals. Shift commuta construir/mostrar el cost estimat STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Construeix senyals de tren en vies de ferrocarril. Ctrl commuta entre semàfors mecànics i elèctrics.{}Arrossegant es construeixen senyals al llarg d'un tros recte de rail. Ctrl construeix senyals fins a la propera intersecció o senyal.{}Ctrl+Clic commuta l'obertura de la finestra de detecció de senyals. Shift commuta construir/mostrar el cost estimat.
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Construeix un pont de tren. Shift commuta construeix/mostra el cost estimat STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Construeix un pont de tren. Shift commuta construeix/mostra el cost estimat
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Construeix un túnel per a trens. Shift commuta construeix/mostra el cost estimat STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Construeix un túnel per a trens. Shift commuta construeix/mostra el cost estimat
STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Commuta construeix/treu per vies de tren, senyals, punts de control i estacions. Mantingueu Ctrl per treure també les vies dels punts de control i de les estacions STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Commuta construeix/treu per vies de tren, senyals, punts de control i estacions. Mantingueu Ctrl per treure també les vies dels punts de control i de les estacions
@ -2810,7 +2820,7 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Construe
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Construeix cotxeres de tramvies (per comprar i revisar tramvies). Shift commuta construeix/mostra el cost estimat STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Construeix cotxeres de tramvies (per comprar i revisar tramvies). Shift commuta construeix/mostra el cost estimat
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Construeix estacions d'autobús. Ctrl permet ajuntar estacions. Shift commuta construeix/mostra el cost estimat STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Construeix estacions d'autobús. Ctrl permet ajuntar estacions. Shift commuta construeix/mostra el cost estimat
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Construeix una estació de tramvies. Ctrl permet ajuntar estacions. Shift commuta construeix/mostra el cost estimat STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Construeix una estació de tramvies. Ctrl permet ajuntar estacions. Shift commuta construeix/mostra el cost estimat
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Construeix un moll de càrrega. Ctrl permet ajuntar estacions. Shift commuta construeix/mostra el cost estimat STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Construeix una estació per a camions. Ctrl permet ajuntar estacions. Amb Maj. es commuta entre construir o mostrar el cost estimat.
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Construeix una estació de tramvies de mercaderies. Ctrl permet ajuntar estacions. Shift commuta construeix/mostra el cost estimat STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Construeix una estació de tramvies de mercaderies. Ctrl permet ajuntar estacions. Shift commuta construeix/mostra el cost estimat
STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}Activa/Desactiva les carreteres d'un sentit STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}Activa/Desactiva les carreteres d'un sentit
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Construeix un pont per carretera. Shift commuta construeix/mostra el cost estimat STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Construeix un pont per carretera. Shift commuta construeix/mostra el cost estimat
@ -2835,7 +2845,7 @@ STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP :{BLACK}Seleccio
STR_STATION_BUILD_BUS_ORIENTATION :{WHITE}Orientació Parada d'autobús STR_STATION_BUILD_BUS_ORIENTATION :{WHITE}Orientació Parada d'autobús
STR_STATION_BUILD_BUS_ORIENTATION_TOOLTIP :{BLACK}Selecciona l'orientació de la parada d'autobús STR_STATION_BUILD_BUS_ORIENTATION_TOOLTIP :{BLACK}Selecciona l'orientació de la parada d'autobús
STR_STATION_BUILD_TRUCK_ORIENTATION :{WHITE}Orientació Estació de Mercaderies STR_STATION_BUILD_TRUCK_ORIENTATION :{WHITE}Orientació Estació de Mercaderies
STR_STATION_BUILD_TRUCK_ORIENTATION_TOOLTIP :{BLACK}Selecciona l'orientació del moll de càrrega de camions STR_STATION_BUILD_TRUCK_ORIENTATION_TOOLTIP :{BLACK}Seleccioneu l'orientació de l'estació per a camions.
STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION :{WHITE}Orientació estació de tramvies de passatgers STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION :{WHITE}Orientació estació de tramvies de passatgers
STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION_TOOLTIP :{BLACK}Selecciona l'orientació de l'estació de tramvies de passatgers STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION_TOOLTIP :{BLACK}Selecciona l'orientació de l'estació de tramvies de passatgers
STR_STATION_BUILD_CARGO_TRAM_ORIENTATION :{WHITE}Orientació estació de tramvies de mercaderies STR_STATION_BUILD_CARGO_TRAM_ORIENTATION :{WHITE}Orientació estació de tramvies de mercaderies
@ -3013,7 +3023,7 @@ STR_LAND_AREA_INFORMATION_RAIL_OWNER :{BLACK}Propieta
STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY :{BLACK}Autoritat local: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY :{BLACK}Autoritat local: {LTBLUE}{STRING}
STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY_NONE :Cap STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY_NONE :Cap
STR_LAND_AREA_INFORMATION_LANDINFO_COORDS :{BLACK}Coordenades: {LTBLUE}{NUM} x {NUM} x {NUM} ({STRING}) STR_LAND_AREA_INFORMATION_LANDINFO_COORDS :{BLACK}Coordenades: {LTBLUE}{NUM} x {NUM} x {NUM} ({STRING})
STR_LAND_AREA_INFORMATION_BUILD_DATE :{BLACK}Construït: {LTBLUE}{DATE_LONG} STR_LAND_AREA_INFORMATION_BUILD_DATE :{BLACK}Construït/renovat: {LTBLUE}{DATE_LONG}
STR_LAND_AREA_INFORMATION_STATION_CLASS :{BLACK}Classe d'estació: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_STATION_CLASS :{BLACK}Classe d'estació: {LTBLUE}{STRING}
STR_LAND_AREA_INFORMATION_STATION_TYPE :{BLACK}Tipus d'estació: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_STATION_TYPE :{BLACK}Tipus d'estació: {LTBLUE}{STRING}
STR_LAND_AREA_INFORMATION_AIRPORT_CLASS :{BLACK}Classe de l'aeroport: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_AIRPORT_CLASS :{BLACK}Classe de l'aeroport: {LTBLUE}{STRING}
@ -3079,7 +3089,7 @@ STR_LAI_TREE_NAME_CACTUS_PLANTS :Plantes de Cact
STR_LAI_STATION_DESCRIPTION_RAILROAD_STATION :Estació de Ferrocarril STR_LAI_STATION_DESCRIPTION_RAILROAD_STATION :Estació de Ferrocarril
STR_LAI_STATION_DESCRIPTION_AIRCRAFT_HANGAR :Hangar d'Avions STR_LAI_STATION_DESCRIPTION_AIRCRAFT_HANGAR :Hangar d'Avions
STR_LAI_STATION_DESCRIPTION_AIRPORT :Aeroport STR_LAI_STATION_DESCRIPTION_AIRPORT :Aeroport
STR_LAI_STATION_DESCRIPTION_TRUCK_LOADING_AREA :Moll de càrrega de camions STR_LAI_STATION_DESCRIPTION_TRUCK_LOADING_AREA :Estació de camions
STR_LAI_STATION_DESCRIPTION_BUS_STATION :Parada d'autobús STR_LAI_STATION_DESCRIPTION_BUS_STATION :Parada d'autobús
STR_LAI_STATION_DESCRIPTION_SHIP_DOCK :Moll per vaixells STR_LAI_STATION_DESCRIPTION_SHIP_DOCK :Moll per vaixells
STR_LAI_STATION_DESCRIPTION_BUOY :Boia STR_LAI_STATION_DESCRIPTION_BUOY :Boia

@ -282,7 +282,7 @@ STR_TOOLTIP_RESIZE :{BLACK}Click an
STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Toggle large/small window size STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Toggle large/small window size
STR_TOOLTIP_VSCROLL_BAR_SCROLLS_LIST :{BLACK}Scroll bar - scrolls list up/down STR_TOOLTIP_VSCROLL_BAR_SCROLLS_LIST :{BLACK}Scroll bar - scrolls list up/down
STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST :{BLACK}Scroll bar - scrolls list left/right STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST :{BLACK}Scroll bar - scrolls list left/right
STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Demolish buildings etc. on a square of land. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Demolish buildings etc. on a square of land. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
# Show engines button # Show engines button
###length VEHICLE_TYPES ###length VEHICLE_TYPES
@ -370,32 +370,32 @@ STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Pause ga
STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Fast forward the game STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Fast forward the game
STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Options and settings STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Options and settings
STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Save, load or abandon game, exit program STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Save, load or abandon game, exit program
STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Display map, extra viewport, cargo flow or list of signs STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Open map, extra viewport, cargo flow or list of signs
STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Display town directory STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Open town directory or found town
STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Display subsidies STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Open subsidy list
STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Display list of company's stations STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Open list of company's stations
STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Display company finances information STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Open company finances information
STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Display general company information STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Open general company information
STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Display story book STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Open story book
STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Display goal list STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Open goal list
STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Display company graphs and cargo payment rates STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Open company graphs and cargo payment rates
STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Display company league table STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Open company league table
STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Examine industries or fund construction of a new industry STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Open industry directory, industry chain, or fund construction of a new industry
STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Display list of company's trains. Ctrl+Click toggles opening the group/vehicle list STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Open list of company's trains. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting
STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Display list of company's road vehicles. Ctrl+Click toggles opening the group/vehicle list STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Open list of company's road vehicles. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting
STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Display list of company's ships. Ctrl+Click toggles opening the group/vehicle list STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Open list of company's ships. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting
STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Display list of company's aircraft. Ctrl+Click toggles opening the group/vehicle list STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Open list of company's aircraft. Ctrl+Click to show or hide vehicle groups, opposite of the chosen setting
STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Zoom the view in STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Zoom in
STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Zoom the view out STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Zoom out
STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railway track STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railway infrastructure
STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Build roads STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Build road infrastructure
STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Build tramways STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Build tramway infrastructure
STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Build ship docks STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Build waterway infrastructure
STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Build airports STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Build airports
STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Open the landscaping toolbar to raise/lower land, plant trees, etc. STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Open landscaping menu, tree menu, or place a sign
STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Show sound/music window STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Open sound/music window
STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Show last message/news report, messages history or delete all messages STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Open last message/news report, messages history or delete all messages
STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Land area information, screenshot, about OpenTTD and developer tools STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Open land information, screenshot menu, OpenTTD credits, or developer tools
STR_TOOLBAR_TOOLTIP_SWITCH_TOOLBAR :{BLACK}Switch toolbars STR_TOOLBAR_TOOLTIP_SWITCH_TOOLBAR :{BLACK}Switch toolbars
# Extra tooltips for the scenario editor toolbar # Extra tooltips for the scenario editor toolbar
@ -405,15 +405,15 @@ STR_SCENEDIT_TOOLBAR_SCENARIO_EDITOR :{YELLOW}Scenari
STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD :{BLACK}Move the starting date backward 1 year STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD :{BLACK}Move the starting date backward 1 year
STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_FORWARD :{BLACK}Move the starting date forward 1 year STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_FORWARD :{BLACK}Move the starting date forward 1 year
STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Click to enter the starting year STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Click to enter the starting year
STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Display map, town directory STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Open map, extra viewport, sign list, or town or industry directory
STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Landscape generation STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Open landscaping menu or generate a new world
STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Town generation STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Build or generate towns
STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Industry generation STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Build or generate industries
STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Road construction STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Build road infrastructure
STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Tramway construction STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Build tramway infrastructure
STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plant trees. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plant trees. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Place sign STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Place sign
STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Place object. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Place object. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
# Scenario editor file menu # Scenario editor file menu
###length 7 ###length 7
@ -1037,7 +1037,7 @@ STR_GAME_OPTIONS_VIDEO_VSYNC_TOOLTIP :{BLACK}Check th
STR_GAME_OPTIONS_VIDEO_DRIVER_INFO :{BLACK}Current driver: {RAW_STRING} STR_GAME_OPTIONS_VIDEO_DRIVER_INFO :{BLACK}Current driver: {RAW_STRING}
STR_GAME_OPTIONS_GUI_SCALE_FRAME :{BLACK}Interface size STR_GAME_OPTIONS_GUI_SCALE_FRAME :{BLACK}Interface size
STR_GAME_OPTIONS_GUI_SCALE_TOOLTIP :{BLACK}Drag slider to set interface size. Hold Ctrl for continuous adjustment STR_GAME_OPTIONS_GUI_SCALE_TOOLTIP :{BLACK}Drag slider to set interface size. Ctrl+Drag for continuous adjustment
STR_GAME_OPTIONS_GUI_SCALE_AUTO :{BLACK}Auto-detect size STR_GAME_OPTIONS_GUI_SCALE_AUTO :{BLACK}Auto-detect size
STR_GAME_OPTIONS_GUI_SCALE_AUTO_TOOLTIP :{BLACK}Check this box to detect interface size automatically STR_GAME_OPTIONS_GUI_SCALE_AUTO_TOOLTIP :{BLACK}Check this box to detect interface size automatically
@ -1334,7 +1334,7 @@ STR_CONFIG_SETTING_FORBID_90_DEG :Forbid trains f
STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :90 degree turns occur when a horizontal track is directly followed by a vertical track piece on the adjacent tile, thus making the train turn by 90 degree when traversing the tile edge instead of the usual 45 degrees for other track combinations. STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :90 degree turns occur when a horizontal track is directly followed by a vertical track piece on the adjacent tile, thus making the train turn by 90 degree when traversing the tile edge instead of the usual 45 degrees for other track combinations.
STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Allow to join stations not directly adjacent: {STRING2} STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Allow to join stations not directly adjacent: {STRING2}
STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Allow adding parts to a station without directly touching the existing parts. Needs Ctrl+Click while placing the new parts STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Allow adding parts to a station without directly touching the existing parts, by Ctrl+Clicking while placing the new parts
STR_CONFIG_SETTING_INFLATION :Inflation: {STRING2} STR_CONFIG_SETTING_INFLATION :Inflation: {STRING2}
STR_CONFIG_SETTING_INFLATION_HELPTEXT :Enable inflation in the economy, where costs are slightly faster rising than payments STR_CONFIG_SETTING_INFLATION_HELPTEXT :Enable inflation in the economy, where costs are slightly faster rising than payments
@ -1874,7 +1874,7 @@ STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE :Automatically b
STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE_HELPTEXT :Set the year when electric signals will be used for tracks. Before this year, non-electric signals will be used (which have the exact same function, but different looks) STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE_HELPTEXT :Set the year when electric signals will be used for tracks. Before this year, non-electric signals will be used (which have the exact same function, but different looks)
STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES :Cycle through signal types: {STRING2} STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES :Cycle through signal types: {STRING2}
STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Select which signal types to cycle through when Ctrl+clicking on a built signal with the signal tool STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Select which signal types to cycle through when Ctrl+Clicking on a built signal with the signal tool
###length 2 ###length 2
STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :Path signals only STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :Path signals only
STR_CONFIG_SETTING_CYCLE_SIGNAL_ALL :All visible STR_CONFIG_SETTING_CYCLE_SIGNAL_ALL :All visible
@ -2147,14 +2147,14 @@ STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE :{BLACK}Select '
STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}Select 'sub-tropical' landscape style STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}Select 'sub-tropical' landscape style
STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Select 'toyland' landscape style STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Select 'toyland' landscape style
STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Display game options STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Open game options
STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Display highscore table STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Open highscore table
STR_INTRO_TOOLTIP_HELP :{BLACK}Get access to documentation and online resources STR_INTRO_TOOLTIP_HELP :{BLACK}Get access to documentation and online resources
STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Display settings STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Open settings
STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Display NewGRF settings STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Open NewGRF settings
STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}Check for new and updated content to download STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}Check for new and updated content to download
STR_INTRO_TOOLTIP_AI_SETTINGS :{BLACK}Display AI settings STR_INTRO_TOOLTIP_AI_SETTINGS :{BLACK}Open AI settings
STR_INTRO_TOOLTIP_GAMESCRIPT_SETTINGS :{BLACK}Display Game script settings STR_INTRO_TOOLTIP_GAMESCRIPT_SETTINGS :{BLACK}Open Game script settings
STR_INTRO_TOOLTIP_QUIT :{BLACK}Exit 'OpenTTD' STR_INTRO_TOOLTIP_QUIT :{BLACK}Exit 'OpenTTD'
STR_INTRO_BASESET :{BLACK}The currently selected base graphics set is missing {NUM} sprite{P "" s}. Please check for updates for the baseset. STR_INTRO_BASESET :{BLACK}The currently selected base graphics set is missing {NUM} sprite{P "" s}. Please check for updates for the baseset.
@ -2212,8 +2212,8 @@ STR_LIVERY_TRAIN_GROUP_TOOLTIP :{BLACK}Show col
STR_LIVERY_ROAD_VEHICLE_GROUP_TOOLTIP :{BLACK}Show colours of road vehicle groups STR_LIVERY_ROAD_VEHICLE_GROUP_TOOLTIP :{BLACK}Show colours of road vehicle groups
STR_LIVERY_SHIP_GROUP_TOOLTIP :{BLACK}Show colours of ship groups STR_LIVERY_SHIP_GROUP_TOOLTIP :{BLACK}Show colours of ship groups
STR_LIVERY_AIRCRAFT_GROUP_TOOLTIP :{BLACK}Show colours of aircraft groups STR_LIVERY_AIRCRAFT_GROUP_TOOLTIP :{BLACK}Show colours of aircraft groups
STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Choose the primary colour for the selected scheme. Ctrl+Click will set this colour for every scheme STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Choose the primary colour for the selected scheme. Ctrl+Click to set this colour for every scheme
STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Choose the secondary colour for the selected scheme. Ctrl+Click will set this colour for every scheme STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Choose the secondary colour for the selected scheme. Ctrl+Click to set this colour for every scheme
STR_LIVERY_PANEL_TOOLTIP :{BLACK}Select a colour scheme to change, or multiple schemes with Ctrl+Click. Click on the box to toggle use of the scheme STR_LIVERY_PANEL_TOOLTIP :{BLACK}Select a colour scheme to change, or multiple schemes with Ctrl+Click. Click on the box to toggle use of the scheme
STR_LIVERY_TRAIN_GROUP_EMPTY :No train groups are set up STR_LIVERY_TRAIN_GROUP_EMPTY :No train groups are set up
STR_LIVERY_ROAD_VEHICLE_GROUP_EMPTY :No road vehicle groups are set up STR_LIVERY_ROAD_VEHICLE_GROUP_EMPTY :No road vehicle groups are set up
@ -2726,16 +2726,16 @@ STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION :Electrified Rai
STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION :Monorail Construction STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION :Monorail Construction
STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :Maglev Construction STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :Maglev Construction
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railway track. Ctrl toggles build/remove for railway construction. Shift toggles building/showing cost estimate STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railway track. Ctrl+Click to remove railway track. Also press Shift to show cost estimate only
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Build railway track using the Autorail mode. Ctrl toggles build/remove for railway construction. Shift toggles building/showing cost estimate STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Build railway track using the Autorail mode. Ctrl+Click to remove railway track. Also press Shift to show cost estimate only
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Build train depot (for buying and servicing trains). Shift toggles building/showing cost estimate STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Build train depot (for buying and servicing trains). Also press Shift to show cost estimate only
STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Build waypoint on railway. Ctrl enables joining waypoints. Shift toggles building/showing cost estimate STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Build waypoint on railway. Ctrl+Click to select another waypoint to join. Also press Shift to show cost estimate only
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Build railway station. Ctrl enables joining stations. Shift toggles building/showing cost estimate STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Build railway station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Build signal on railway. Ctrl toggles semaphore/light signals{}Dragging builds signals along a straight stretch of rail. Ctrl builds signals up to the next junction or signal{}Ctrl+Click toggles opening the signal selection window. Shift toggles building/showing cost estimate STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Build signal on railway. Ctrl+Click to build the alternate signal style{}Click+Drag to fill the selected section of rail with signals at the chosen spacing. Ctrl+Click+Drag to fill signals up to the next junction, station, or signal. Also press Shift to show cost estimate only
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Build railway bridge. Shift toggles building/showing cost estimate STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Build railway bridge. Also press Shift to show cost estimate only
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Build railway tunnel. Shift toggles building/showing cost estimate STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Build railway tunnel. Also press Shift to show cost estimate only
STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Toggle build/remove for railway track, signals, waypoints and stations. Hold Ctrl to also remove the rail of waypoints and stations STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Toggle build/remove for railway track, signals, waypoints and stations. Ctrl+Click to also remove the rail of waypoints and stations
STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Convert/Upgrade the type of rail. Shift toggles building/showing cost estimate STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Convert/Upgrade the type of rail. Also press Shift to show cost estimate only
STR_RAIL_NAME_RAILROAD :Railway STR_RAIL_NAME_RAILROAD :Railway
STR_RAIL_NAME_ELRAIL :Electrified railway STR_RAIL_NAME_ELRAIL :Electrified railway
@ -2785,7 +2785,7 @@ STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Exit Sig
STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Combo Signal (electric){}The combo signal simply acts as both an entry and exit signal. This allows you to build large "trees" of pre-signals STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Combo Signal (electric){}The combo signal simply acts as both an entry and exit signal. This allows you to build large "trees" of pre-signals
STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. Standard path signals can be passed from the back side STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. Standard path signals can be passed from the back side
STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}One-way Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. One-way path signals can't be passed from the back side STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}One-way Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. One-way path signals can't be passed from the back side
STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Signal Convert{}When selected, clicking an existing signal will convert it to the selected signal type and variant. Ctrl+Click will toggle the existing variant. Shift+Click shows estimated conversion cost STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Signal Convert{}Click an existing signal to convert it to the selected signal type and variant. Ctrl+Click to toggle the existing variant. Shift+Click shows estimated conversion cost
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Dragging signal distance STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Dragging signal distance
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Decrease dragging signal distance STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Decrease dragging signal distance
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase dragging signal distance STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase dragging signal distance
@ -2811,25 +2811,25 @@ STR_BRIDGE_TUBULAR_SILICON :Tubular, Silico
# Road construction toolbar # Road construction toolbar
STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Road Construction STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Road Construction
STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Tramway Construction STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Tramway Construction
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Build road section. Ctrl toggles build/remove for road construction. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Build road section. Ctrl+Click to remove road section. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Build tramway section. Ctrl toggles build/remove for tramway construction. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Build tramway section. Ctrl+Click to remove tramway section. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Build road section using the Autoroad mode. Ctrl toggles build/remove for road construction. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Build road section using the Autoroad mode. Ctrl+Click to remove road section. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Build tramway section using the Autotram mode. Ctrl toggles build/remove for tramway construction. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Build tramway section using the Autotram mode. Ctrl+Click to remove tramway section. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Build road vehicle depot (for buying and servicing vehicles). Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Build road vehicle depot (for buying and servicing vehicles). Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Build tram vehicle depot (for buying and servicing vehicles). Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Build tram vehicle depot (for buying and servicing vehicles). Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Build bus station. Ctrl enables joining stations. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Build bus station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Build passenger tram station. Ctrl enables joining stations. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Build passenger tram station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Build lorry station. Ctrl enables joining stations. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Build lorry station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Build freight tram station. Ctrl enables joining stations. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Build freight tram station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}Activate/Deactivate one way roads STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}Activate/Deactivate one way roads
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Build road bridge. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Build road bridge. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Build tramway bridge. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Build tramway bridge. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Build road tunnel. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Build road tunnel. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Build tramway tunnel. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Build tramway tunnel. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Toggle build/remove for road construction STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Toggle build/remove for road construction
STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Toggle build/remove for tramway construction STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Toggle build/remove for tramway construction
STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Convert/Upgrade the type of road. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Convert/Upgrade the type of road. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Convert/Upgrade the type of tram. Shift toggles building/showing cost estimate STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Convert/Upgrade the type of tram. Also press Shift to show cost estimate only
STR_ROAD_NAME_ROAD :Road STR_ROAD_NAME_ROAD :Road
STR_ROAD_NAME_TRAM :Tramway STR_ROAD_NAME_TRAM :Tramway
@ -2853,14 +2853,14 @@ STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP :{BLACK}Select f
# Waterways toolbar (last two for SE only) # Waterways toolbar (last two for SE only)
STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Waterways Construction STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Waterways Construction
STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Waterways STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Waterways
STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Build canals. Shift toggles building/showing cost estimate STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Build canals. Also press Shift to show cost estimate only
STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Build locks. Shift toggles building/showing cost estimate STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Build locks. Also press Shift to show cost estimate only
STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Build ship depot (for buying and servicing ships). Shift toggles building/showing cost estimate STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Build ship depot (for buying and servicing ships). Also press Shift to show cost estimate only
STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Build ship dock. Ctrl enables joining stations. Shift toggles building/showing cost estimate STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Build ship dock. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only
STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Place a buoy which can be used as a waypoint. Shift toggles building/showing cost estimate STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Place a buoy which can be used as a waypoint. Also press Shift to show cost estimate only
STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Build aqueduct. Shift toggles building/showing cost estimate STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Build aqueduct. Also press Shift to show cost estimate only
STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Define water area.{}Make a canal, unless Ctrl is held down at sea level, when it will flood the surroundings instead STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Build canal. Ctrl+Click at sea level to flood with sea water instead
STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Place rivers. Ctrl selects the area diagonally STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Place rivers. Ctrl+Click to select diagonally
# Ship depot construction window # Ship depot construction window
STR_DEPOT_BUILD_SHIP_CAPTION :{WHITE}Ship Depot Orientation STR_DEPOT_BUILD_SHIP_CAPTION :{WHITE}Ship Depot Orientation
@ -2871,7 +2871,7 @@ STR_STATION_BUILD_DOCK_CAPTION :{WHITE}Dock
# Airport toolbar # Airport toolbar
STR_TOOLBAR_AIRCRAFT_CAPTION :{WHITE}Airports STR_TOOLBAR_AIRCRAFT_CAPTION :{WHITE}Airports
STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Build airport. Ctrl enables joining stations. Shift toggles building/showing cost estimate STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Build airport. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only
# Airport construction window # Airport construction window
STR_STATION_BUILD_AIRPORT_CAPTION :{WHITE}Airport Selection STR_STATION_BUILD_AIRPORT_CAPTION :{WHITE}Airport Selection
@ -2898,14 +2898,14 @@ STR_STATION_BUILD_NOISE :{BLACK}Noise ge
# Landscaping toolbar # Landscaping toolbar
STR_LANDSCAPING_TOOLBAR :{WHITE}Landscaping STR_LANDSCAPING_TOOLBAR :{WHITE}Landscaping
STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Lower a corner of land. Dragging lowers the first selected corner and levels the selected area to the new corner height. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Lower a corner of land. Click+Drag to lower the first selected corner and level the selected area to the new corner height. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Raise a corner of land. Dragging raises the first selected corner and levels the selected area to the new corner height. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Raise a corner of land. Click+Drag to raise the first selected corner and level the selected area to the new corner height. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Level an area of land to the height of the first selected corner. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Level an area of land to the height of the first selected corner. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Purchase land for future use. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Purchase land for future use. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
# Object construction window # Object construction window
STR_OBJECT_BUILD_CAPTION :{WHITE}Object Selection STR_OBJECT_BUILD_CAPTION :{WHITE}Object Selection
STR_OBJECT_BUILD_TOOLTIP :{BLACK}Select object to build. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate STR_OBJECT_BUILD_TOOLTIP :{BLACK}Select object to build. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
STR_OBJECT_BUILD_CLASS_TOOLTIP :{BLACK}Select class of the object to build STR_OBJECT_BUILD_CLASS_TOOLTIP :{BLACK}Select class of the object to build
STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}Preview of the object STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}Preview of the object
STR_OBJECT_BUILD_SIZE :{BLACK}Size: {GOLD}{NUM} x {NUM} tiles STR_OBJECT_BUILD_SIZE :{BLACK}Size: {GOLD}{NUM} x {NUM} tiles
@ -2917,7 +2917,7 @@ STR_OBJECT_CLASS_TRNS :Transmitters
STR_PLANT_TREE_CAPTION :{WHITE}Trees STR_PLANT_TREE_CAPTION :{WHITE}Trees
STR_PLANT_TREE_TOOLTIP :{BLACK}Select tree type to plant. If the tile already has a tree, this will add more trees of mixed types independent of the selected type STR_PLANT_TREE_TOOLTIP :{BLACK}Select tree type to plant. If the tile already has a tree, this will add more trees of mixed types independent of the selected type
STR_TREES_RANDOM_TYPE :{BLACK}Trees of random type STR_TREES_RANDOM_TYPE :{BLACK}Trees of random type
STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Place trees of random type. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Place trees of random type. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Random Trees STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Random Trees
STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Plant trees randomly throughout the landscape STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Plant trees randomly throughout the landscape
STR_TREES_MODE_NORMAL_BUTTON :{BLACK}Normal STR_TREES_MODE_NORMAL_BUTTON :{BLACK}Normal
@ -2930,7 +2930,7 @@ STR_TREES_MODE_FOREST_LG_TOOLTIP :{BLACK}Plant la
# Land generation window (SE) # Land generation window (SE)
STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION :{WHITE}Land Generation STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION :{WHITE}Land Generation
STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Place rocky areas on landscape STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Place rocky areas on landscape
STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Define desert area.{}Hold Ctrl to remove it STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Define desert area.{}Ctrl+Click to remove desert area
STR_TERRAFORM_TOOLTIP_INCREASE_SIZE_OF_LAND_AREA :{BLACK}Increase area of land to lower/raise STR_TERRAFORM_TOOLTIP_INCREASE_SIZE_OF_LAND_AREA :{BLACK}Increase area of land to lower/raise
STR_TERRAFORM_TOOLTIP_DECREASE_SIZE_OF_LAND_AREA :{BLACK}Decrease area of land to lower/raise STR_TERRAFORM_TOOLTIP_DECREASE_SIZE_OF_LAND_AREA :{BLACK}Decrease area of land to lower/raise
STR_TERRAFORM_TOOLTIP_GENERATE_RANDOM_LAND :{BLACK}Generate random land STR_TERRAFORM_TOOLTIP_GENERATE_RANDOM_LAND :{BLACK}Generate random land
@ -2944,7 +2944,7 @@ STR_RESET_LANDSCAPE_CONFIRMATION_TEXT :{WHITE}Are you
# Town generation window (SE) # Town generation window (SE)
STR_FOUND_TOWN_CAPTION :{WHITE}Town Generation STR_FOUND_TOWN_CAPTION :{WHITE}Town Generation
STR_FOUND_TOWN_NEW_TOWN_BUTTON :{BLACK}New Town STR_FOUND_TOWN_NEW_TOWN_BUTTON :{BLACK}New Town
STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Found new town. Shift+Click shows only estimated cost STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Found new town. Also press Shift to show cost estimate only
STR_FOUND_TOWN_RANDOM_TOWN_BUTTON :{BLACK}Random Town STR_FOUND_TOWN_RANDOM_TOWN_BUTTON :{BLACK}Random Town
STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Found town in random location STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Found town in random location
STR_FOUND_TOWN_MANY_RANDOM_TOWNS :{BLACK}Many random towns STR_FOUND_TOWN_MANY_RANDOM_TOWNS :{BLACK}Many random towns
@ -3010,7 +3010,7 @@ STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP :{BLACK}Select t
# Land area window # Land area window
STR_LAND_AREA_INFORMATION_CAPTION :{WHITE}Land Area Information STR_LAND_AREA_INFORMATION_CAPTION :{WHITE}Land Area Information
STR_LAND_AREA_INFORMATION_LOCATION_TOOLTIP :{BLACK}Centre the main view on tile location. Ctrl+Click opens a new viewport on tile location STR_LAND_AREA_INFORMATION_LOCATION_TOOLTIP :{BLACK}Centre the main view on tile location. Ctrl+Click to open a new viewport on tile location
STR_LAND_AREA_INFORMATION_COST_TO_CLEAR_N_A :{BLACK}Cost to clear: {LTBLUE}N/A STR_LAND_AREA_INFORMATION_COST_TO_CLEAR_N_A :{BLACK}Cost to clear: {LTBLUE}N/A
STR_LAND_AREA_INFORMATION_COST_TO_CLEAR :{BLACK}Cost to clear: {RED}{CURRENCY_LONG} STR_LAND_AREA_INFORMATION_COST_TO_CLEAR :{BLACK}Cost to clear: {RED}{CURRENCY_LONG}
STR_LAND_AREA_INFORMATION_REVENUE_WHEN_CLEARED :{BLACK}Revenue when cleared: {LTBLUE}{CURRENCY_LONG} STR_LAND_AREA_INFORMATION_REVENUE_WHEN_CLEARED :{BLACK}Revenue when cleared: {LTBLUE}{CURRENCY_LONG}
@ -3257,11 +3257,11 @@ STR_MAPGEN_VARIETY :{BLACK}Variety
STR_MAPGEN_GENERATE :{WHITE}Generate STR_MAPGEN_GENERATE :{WHITE}Generate
STR_MAPGEN_GENERATE_TOOLTIP :{BLACK}Create the world and play OpenTTD! STR_MAPGEN_GENERATE_TOOLTIP :{BLACK}Create the world and play OpenTTD!
STR_MAPGEN_NEWGRF_SETTINGS :{BLACK}NewGRF Settings STR_MAPGEN_NEWGRF_SETTINGS :{BLACK}NewGRF Settings
STR_MAPGEN_NEWGRF_SETTINGS_TOOLTIP :{BLACK}Display NewGRF settings STR_MAPGEN_NEWGRF_SETTINGS_TOOLTIP :{BLACK}Open NewGRF settings
STR_MAPGEN_AI_SETTINGS :{BLACK}AI Settings STR_MAPGEN_AI_SETTINGS :{BLACK}AI Settings
STR_MAPGEN_AI_SETTINGS_TOOLTIP :{BLACK}Display AI settings STR_MAPGEN_AI_SETTINGS_TOOLTIP :{BLACK}Open AI settings
STR_MAPGEN_GS_SETTINGS :{BLACK}Game Script Settings STR_MAPGEN_GS_SETTINGS :{BLACK}Game Script Settings
STR_MAPGEN_GS_SETTINGS_TOOLTIP :{BLACK}Display game script settings STR_MAPGEN_GS_SETTINGS_TOOLTIP :{BLACK}Open game script settings
###length 21 ###length 21
STR_MAPGEN_TOWN_NAME_ORIGINAL_ENGLISH :English (Original) STR_MAPGEN_TOWN_NAME_ORIGINAL_ENGLISH :English (Original)
@ -3537,7 +3537,7 @@ STR_SIGN_LIST_MATCH_CASE_TOOLTIP :{BLACK}Toggle m
# Sign window # Sign window
STR_EDIT_SIGN_CAPTION :{WHITE}Edit sign text STR_EDIT_SIGN_CAPTION :{WHITE}Edit sign text
STR_EDIT_SIGN_LOCATION_TOOLTIP :{BLACK}Centre the main view on sign location. Ctrl+Click opens a new viewport on sign location STR_EDIT_SIGN_LOCATION_TOOLTIP :{BLACK}Centre the main view on sign location. Ctrl+Click to open a new viewport on sign location
STR_EDIT_SIGN_NEXT_SIGN_TOOLTIP :{BLACK}Go to next sign STR_EDIT_SIGN_NEXT_SIGN_TOOLTIP :{BLACK}Go to next sign
STR_EDIT_SIGN_PREVIOUS_SIGN_TOOLTIP :{BLACK}Go to previous sign STR_EDIT_SIGN_PREVIOUS_SIGN_TOOLTIP :{BLACK}Go to previous sign
@ -3548,7 +3548,7 @@ STR_TOWN_DIRECTORY_CAPTION :{WHITE}Towns
STR_TOWN_DIRECTORY_NONE :{ORANGE}- None - STR_TOWN_DIRECTORY_NONE :{ORANGE}- None -
STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA})
STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (City){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (City){BLACK} ({COMMA})
STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Town names - click on name to centre main view on town. Ctrl+Click opens a new viewport on town location STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Town names - click on name to centre main view on town. Ctrl+Click to open a new viewport on town location
STR_TOWN_POPULATION :{BLACK}World population: {COMMA} STR_TOWN_POPULATION :{BLACK}World population: {COMMA}
# Town view window # Town view window
@ -3566,7 +3566,7 @@ STR_TOWN_VIEW_TOWN_GROWS_EVERY :{BLACK}Town gro
STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}Town grows every {ORANGE}{COMMA}{BLACK}{NBSP}day{P "" s} (funded) STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}Town grows every {ORANGE}{COMMA}{BLACK}{NBSP}day{P "" s} (funded)
STR_TOWN_VIEW_TOWN_GROW_STOPPED :{BLACK}Town is {RED}not{BLACK} growing STR_TOWN_VIEW_TOWN_GROW_STOPPED :{BLACK}Town is {RED}not{BLACK} growing
STR_TOWN_VIEW_NOISE_IN_TOWN :{BLACK}Noise limit in town: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA} STR_TOWN_VIEW_NOISE_IN_TOWN :{BLACK}Noise limit in town: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA}
STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Centre the main view on town location. Ctrl+Click opens a new viewport on town location STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Centre the main view on town location. Ctrl+Click to open a new viewport on town location
STR_TOWN_VIEW_LOCAL_AUTHORITY_BUTTON :{BLACK}Local Authority STR_TOWN_VIEW_LOCAL_AUTHORITY_BUTTON :{BLACK}Local Authority
STR_TOWN_VIEW_LOCAL_AUTHORITY_TOOLTIP :{BLACK}Show information on local authority STR_TOWN_VIEW_LOCAL_AUTHORITY_TOOLTIP :{BLACK}Show information on local authority
STR_TOWN_VIEW_RENAME_TOOLTIP :{BLACK}Change town name STR_TOWN_VIEW_RENAME_TOOLTIP :{BLACK}Change town name
@ -3621,7 +3621,7 @@ STR_GOALS_TEXT :{ORANGE}{RAW_ST
STR_GOALS_NONE :{ORANGE}- None - STR_GOALS_NONE :{ORANGE}- None -
STR_GOALS_PROGRESS :{ORANGE}{RAW_STRING} STR_GOALS_PROGRESS :{ORANGE}{RAW_STRING}
STR_GOALS_PROGRESS_COMPLETE :{GREEN}{RAW_STRING} STR_GOALS_PROGRESS_COMPLETE :{GREEN}{RAW_STRING}
STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on goal to centre main view on industry/town/tile. Ctrl+Click opens a new viewport on industry/town/tile location STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on goal to centre main view on industry/town/tile. Ctrl+Click to open a new viewport on industry/town/tile location
# Goal question window # Goal question window
STR_GOAL_QUESTION_CAPTION_QUESTION :{BLACK}Question STR_GOAL_QUESTION_CAPTION_QUESTION :{BLACK}Question
@ -3657,7 +3657,7 @@ STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING
STR_SUBSIDIES_NONE :{ORANGE}- None - STR_SUBSIDIES_NONE :{ORANGE}- None -
STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Services already subsidised: STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Services already subsidised:
STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} from {STRING2} to {STRING2}{YELLOW} ({COMPANY}{YELLOW}, until {DATE_SHORT}) STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} from {STRING2} to {STRING2}{YELLOW} ({COMPANY}{YELLOW}, until {DATE_SHORT})
STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on service to centre main view on industry/town. Ctrl+Click opens a new viewport on industry/town location STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on service to centre main view on industry/town. Ctrl+Click to open a new viewport on industry/town location
# Story book window # Story book window
STR_STORY_BOOK_CAPTION :{WHITE}{COMPANY} Story Book STR_STORY_BOOK_CAPTION :{WHITE}{COMPANY} Story Book
@ -3673,8 +3673,8 @@ STR_STORY_BOOK_NEXT_PAGE_TOOLTIP :{BLACK}Go to ne
STR_STORY_BOOK_INVALID_GOAL_REF :{RED}Invalid goal reference STR_STORY_BOOK_INVALID_GOAL_REF :{RED}Invalid goal reference
# Station list window # Station list window
STR_STATION_LIST_TOOLTIP :{BLACK}Station names - click on name to centre main view on station. Ctrl+Click opens a new viewport on station location STR_STATION_LIST_TOOLTIP :{BLACK}Station names - click on name to centre main view on station. Ctrl+Click to open a new viewport on station location
STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Hold Ctrl to select more than one item STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Ctrl+Click to select multiple items
STR_STATION_LIST_CAPTION :{WHITE}{COMPANY} - {COMMA} Station{P "" s} STR_STATION_LIST_CAPTION :{WHITE}{COMPANY} - {COMMA} Station{P "" s}
STR_STATION_LIST_STATION :{YELLOW}{STATION} {STATION_FEATURES} STR_STATION_LIST_STATION :{YELLOW}{STATION} {STATION_FEATURES}
STR_STATION_LIST_WAYPOINT :{YELLOW}{WAYPOINT} STR_STATION_LIST_WAYPOINT :{YELLOW}{WAYPOINT}
@ -3733,7 +3733,7 @@ STR_CARGO_RATING_VERY_GOOD :Very Good
STR_CARGO_RATING_EXCELLENT :Excellent STR_CARGO_RATING_EXCELLENT :Excellent
STR_CARGO_RATING_OUTSTANDING :Outstanding STR_CARGO_RATING_OUTSTANDING :Outstanding
STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on station location. Ctrl+Click opens a new viewport on station location STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on station location. Ctrl+Click to open a new viewport on station location
STR_STATION_VIEW_RENAME_TOOLTIP :{BLACK}Change name of station STR_STATION_VIEW_RENAME_TOOLTIP :{BLACK}Change name of station
STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP :{BLACK}Show all trains which have this station on their schedule STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP :{BLACK}Show all trains which have this station on their schedule
@ -3748,9 +3748,9 @@ STR_STATION_VIEW_CLOSE_AIRPORT_TOOLTIP :{BLACK}Prevent
# Waypoint/buoy view window # Waypoint/buoy view window
STR_WAYPOINT_VIEW_CAPTION :{WHITE}{WAYPOINT} STR_WAYPOINT_VIEW_CAPTION :{WHITE}{WAYPOINT}
STR_WAYPOINT_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on waypoint location. Ctrl+Click opens a new viewport on waypoint location STR_WAYPOINT_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on waypoint location. Ctrl+Click to open a new viewport on waypoint location
STR_WAYPOINT_VIEW_CHANGE_WAYPOINT_NAME :{BLACK}Change waypoint name STR_WAYPOINT_VIEW_CHANGE_WAYPOINT_NAME :{BLACK}Change waypoint name
STR_BUOY_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on buoy location. Ctrl+Click opens a new viewport on buoy location STR_BUOY_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on buoy location. Ctrl+Click to open a new viewport on buoy location
STR_BUOY_VIEW_CHANGE_BUOY_NAME :{BLACK}Change buoy name STR_BUOY_VIEW_CHANGE_BUOY_NAME :{BLACK}Change buoy name
STR_EDIT_WAYPOINT_NAME :{WHITE}Edit waypoint name STR_EDIT_WAYPOINT_NAME :{WHITE}Edit waypoint name
@ -3793,9 +3793,9 @@ STR_FINANCES_MAX_LOAN :{WHITE}Maximum
STR_FINANCES_TOTAL_CURRENCY :{BLACK}{CURRENCY_LONG} STR_FINANCES_TOTAL_CURRENCY :{BLACK}{CURRENCY_LONG}
STR_FINANCES_BANK_BALANCE :{WHITE}{CURRENCY_LONG} STR_FINANCES_BANK_BALANCE :{WHITE}{CURRENCY_LONG}
STR_FINANCES_BORROW_BUTTON :{BLACK}Borrow {CURRENCY_LONG} STR_FINANCES_BORROW_BUTTON :{BLACK}Borrow {CURRENCY_LONG}
STR_FINANCES_BORROW_TOOLTIP :{BLACK}Increase size of loan. Ctrl+Click borrows as much as possible STR_FINANCES_BORROW_TOOLTIP :{BLACK}Increase size of loan. Ctrl+Click to borrow as much as possible
STR_FINANCES_REPAY_BUTTON :{BLACK}Repay {CURRENCY_LONG} STR_FINANCES_REPAY_BUTTON :{BLACK}Repay {CURRENCY_LONG}
STR_FINANCES_REPAY_TOOLTIP :{BLACK}Repay part of loan. Ctrl+Click repays as much loan as possible STR_FINANCES_REPAY_TOOLTIP :{BLACK}Repay part of loan. Ctrl+Click to repay as much loan as possible
STR_FINANCES_INFRASTRUCTURE_BUTTON :{BLACK}Infrastructure STR_FINANCES_INFRASTRUCTURE_BUTTON :{BLACK}Infrastructure
# Company view # Company view
@ -3824,7 +3824,7 @@ STR_COMPANY_VIEW_BUILD_HQ_TOOLTIP :{BLACK}Build co
STR_COMPANY_VIEW_VIEW_HQ_BUTTON :{BLACK}View HQ STR_COMPANY_VIEW_VIEW_HQ_BUTTON :{BLACK}View HQ
STR_COMPANY_VIEW_VIEW_HQ_TOOLTIP :{BLACK}View company headquarters STR_COMPANY_VIEW_VIEW_HQ_TOOLTIP :{BLACK}View company headquarters
STR_COMPANY_VIEW_RELOCATE_HQ :{BLACK}Relocate HQ STR_COMPANY_VIEW_RELOCATE_HQ :{BLACK}Relocate HQ
STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Rebuild company headquarters elsewhere for 1% cost of company value. Shift+Click shows estimated cost without relocating HQ STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Rebuild company headquarters elsewhere for 1% cost of company value. Also press Shift to show cost estimate only
STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON :{BLACK}Details STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON :{BLACK}Details
STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP :{BLACK}View detailed infrastructure counts STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP :{BLACK}View detailed infrastructure counts
STR_COMPANY_VIEW_GIVE_MONEY_BUTTON :{BLACK}Give money STR_COMPANY_VIEW_GIVE_MONEY_BUTTON :{BLACK}Give money
@ -3870,7 +3870,7 @@ STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUST
STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING4}, {STRING4} STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING4}, {STRING4}
STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING4}, {STRING4}, {STRING4} STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING4}, {STRING4}, {STRING4}
STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING4}, {STRING4}, {STRING4} and {NUM} more... STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING4}, {STRING4}, {STRING4} and {NUM} more...
STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industry names - click on name to centre main view on industry. Ctrl+Click opens a new viewport on industry location STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industry names - click on name to centre main view on industry. Ctrl+Click to open a new viewport on industry location
STR_INDUSTRY_DIRECTORY_ACCEPTED_CARGO_FILTER :{BLACK}Accepted cargo: {SILVER}{STRING} STR_INDUSTRY_DIRECTORY_ACCEPTED_CARGO_FILTER :{BLACK}Accepted cargo: {SILVER}{STRING}
STR_INDUSTRY_DIRECTORY_PRODUCED_CARGO_FILTER :{BLACK}Produced cargo: {SILVER}{STRING} STR_INDUSTRY_DIRECTORY_PRODUCED_CARGO_FILTER :{BLACK}Produced cargo: {SILVER}{STRING}
STR_INDUSTRY_DIRECTORY_FILTER_ALL_TYPES :All cargo types STR_INDUSTRY_DIRECTORY_FILTER_ALL_TYPES :All cargo types
@ -3880,7 +3880,7 @@ STR_INDUSTRY_DIRECTORY_FILTER_NONE :None
STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY}
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Production last month: STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Production last month:
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{RAW_STRING}{BLACK} ({COMMA}% transported) STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{RAW_STRING}{BLACK} ({COMMA}% transported)
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centre the main view on industry location. Ctrl+Click opens a new viewport on industry location STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centre the main view on industry location. Ctrl+Click to open a new viewport on industry location
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}%
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure! STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure!
@ -4019,10 +4019,10 @@ STR_CARGO_TYPE_FILTER_FREIGHT :Freight
STR_CARGO_TYPE_FILTER_NONE :None STR_CARGO_TYPE_FILTER_NONE :None
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Train vehicle selection list. Click on vehicle for information. Ctrl+Click for toggling hiding of the vehicle type STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Train vehicle selection list. Click on vehicle for information. Ctrl+Click to show/hide this vehicle type
STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Road vehicle selection list. Click on vehicle for information. Ctrl+Click for toggling hiding of the vehicle type STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Road vehicle selection list. Click on vehicle for information. Ctrl+Click to show/hide of the vehicle type
STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Ship selection list. Click on ship for information. Ctrl+Click for toggling hiding of the ship type STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Ship selection list. Click on ship for information. Ctrl+Click to show/hide of the ship type
STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft selection list. Click on aircraft for information. Ctrl+Click for toggling hiding of the aircraft type STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft selection list. Click on aircraft for information. Ctrl+Click to show/hide of the aircraft type
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Buy Vehicle STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Buy Vehicle
@ -4037,16 +4037,16 @@ STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Buy and
STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Buy and Refit Aircraft STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Buy and Refit Aircraft
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted train vehicle. Shift+Click shows estimated cost without purchase STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted train vehicle. Also press Shift to show cost estimate only
STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted road vehicle. Shift+Click shows estimated cost without purchase STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted road vehicle. Also press Shift to show cost estimate only
STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted ship. Shift+Click shows estimated cost without purchase STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted ship. Also press Shift to show cost estimate only
STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted aircraft. Shift+Click shows estimated cost without purchase STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted aircraft. Also press Shift to show cost estimate only
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted train vehicle. Shift+Click shows estimated cost without purchase STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted train vehicle. Also press Shift to show cost estimate only
STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted road vehicle. Shift+Click shows estimated cost without purchase STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted road vehicle. Also press Shift to show cost estimate only
STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted ship. Shift+Click shows estimated cost without purchase STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted ship. Also press Shift to show cost estimate only
STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted aircraft. Shift+Click shows estimated cost without purchase STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Buy and refit the highlighted aircraft. Also press Shift to show cost estimate only
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Rename STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Rename
@ -4096,7 +4096,7 @@ STR_DEPOT_VEHICLE_TOOLTIP_CHAIN :{BLACK}{NUM} ve
STR_DEPOT_VEHICLE_TOOLTIP_CARGO :{}{CARGO_LONG} ({CARGO_SHORT}) STR_DEPOT_VEHICLE_TOOLTIP_CARGO :{}{CARGO_LONG} ({CARGO_SHORT})
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Trains - drag vehicle with left-click to add/remove from train, right-click for information. Hold Ctrl to make both functions apply to the following chain STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Trains - drag vehicle with left-click to add/remove from train, right-click for information. Ctrl+Click to apply either function to the following chain
STR_DEPOT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Vehicles - right-click on vehicle for information STR_DEPOT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Vehicles - right-click on vehicle for information
STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Ships - right-click on ship for information STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Ships - right-click on ship for information
STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft - right-click on aircraft for information STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft - right-click on aircraft for information
@ -4138,16 +4138,16 @@ STR_DEPOT_CLONE_SHIP :{BLACK}Clone Sh
STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Clone Aircraft STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Clone Aircraft
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}This will buy a copy of a train including all cars. Click this button and then on a train inside or outside the depot. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Buy a copy of a train including all cars. Click this button and then on a train inside or outside the depot. Ctrl+Click to share the orders. Also press Shift to show cost estimate only
STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}This will buy a copy of a road vehicle. Click this button and then on a road vehicle inside or outside the depot. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Buy a copy of a road vehicle. Click this button and then on a road vehicle inside or outside the depot. Ctrl+Click to share the orders. Also press Shift to show cost estimate only
STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}This will buy a copy of a ship. Click this button and then on a ship inside or outside the depot. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Buy a copy of a ship. Click this button and then on a ship inside or outside the depot. Ctrl+Click to share the orders. Also press Shift to show cost estimate only
STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}This will buy a copy of an aircraft. Click this button and then on an aircraft inside or outside the hangar. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Buy a copy of an aircraft. Click this button and then on an aircraft inside or outside the hangar. Ctrl+Click to share the orders. Also press Shift to show cost estimate only
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Centre main view on train depot location. Ctrl+Click opens a new viewport on train depot location STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Centre main view on train depot location. Ctrl+Click to open a new viewport on train depot location
STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Centre main view on road vehicle depot location. Ctrl+Click opens a new viewport on road depot location STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Centre main view on road vehicle depot location. Ctrl+Click to open a new viewport on road depot location
STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}Centre main view on ship depot location. Ctrl+Click opens a new viewport on ship depot location STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}Centre main view on ship depot location. Ctrl+Click to open a new viewport on ship depot location
STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centre main view on hangar location. Ctrl+Click opens a new viewport on hangar location STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centre main view on hangar location. Ctrl+Click to open a new viewport on hangar location
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_DEPOT_VEHICLE_ORDER_LIST_TRAIN_TOOLTIP :{BLACK}Get a list of all trains with the current depot in their orders STR_DEPOT_VEHICLE_ORDER_LIST_TRAIN_TOOLTIP :{BLACK}Get a list of all trains with the current depot in their orders
@ -4248,27 +4248,27 @@ STR_REPLACE_REMOVE_WAGON_GROUP_HELP :{STRING}. Ctrl+
STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE} STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE}
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_VEHICLE_VIEW_TRAIN_CENTER_TOOLTIP :{BLACK}Centre main view on train's location. Double click will follow train in main view. Ctrl+Click opens a new viewport on train's location STR_VEHICLE_VIEW_TRAIN_CENTER_TOOLTIP :{BLACK}Centre main view on train's location. Double click to follow train in main view. Ctrl+Click to open a new viewport on train's location
STR_VEHICLE_VIEW_ROAD_VEHICLE_CENTER_TOOLTIP :{BLACK}Centre main view on vehicle's location. Double click will follow vehicle in main view. Ctrl+Click opens a new viewport on vehicle's location STR_VEHICLE_VIEW_ROAD_VEHICLE_CENTER_TOOLTIP :{BLACK}Centre main view on vehicle's location. Double click to follow vehicle in main view. Ctrl+Click to open a new viewport on vehicle's location
STR_VEHICLE_VIEW_SHIP_CENTER_TOOLTIP :{BLACK}Centre main view on ship's location. Double click will follow ship in main view. Ctrl+Click opens a new viewport on ship's location STR_VEHICLE_VIEW_SHIP_CENTER_TOOLTIP :{BLACK}Centre main view on ship's location. Double click to follow ship in main view. Ctrl+Click to open a new viewport on ship's location
STR_VEHICLE_VIEW_AIRCRAFT_CENTER_TOOLTIP :{BLACK}Centre main view on aircraft's location. Double click will follow aircraft in main view. Ctrl+Click opens a new viewport on aircraft's location STR_VEHICLE_VIEW_AIRCRAFT_CENTER_TOOLTIP :{BLACK}Centre main view on aircraft's location. Double click to follow aircraft in main view. Ctrl+Click to open a new viewport on aircraft's location
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send train to depot. Ctrl+Click will only service STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send train to depot. Ctrl+Click to only service
STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send vehicle to depot. Ctrl+Click will only service STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send vehicle to depot. Ctrl+Click to only service
STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send ship to depot. Ctrl+Click will only service STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send ship to depot. Ctrl+Click to only service
STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send aircraft to hangar. Ctrl+Click will only service STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send aircraft to hangar. Ctrl+Click to only service
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}This will buy a copy of the train including all cars. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Buy a copy of the train including all cars. Ctrl+Click to share orders. Also press Shift to show cost estimate only
STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}This will buy a copy of the road vehicle. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Buy a copy of the road vehicle. Ctrl+Click to share orders. Also press Shift to show cost estimate only
STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}This will buy a copy of the ship. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Buy a copy of the ship. Ctrl+Click to share orders. Also press Shift to show cost estimate only
STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}This will buy a copy of the aircraft. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Buy a copy of the aircraft. Ctrl+Click to share orders. Also press Shift to show cost estimate only
STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP :{BLACK}Force train to proceed without waiting for signal to clear it STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP :{BLACK}Force train to proceed without waiting for signal to clear it
STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP :{BLACK}Reverse direction of train STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP :{BLACK}Reverse direction of train
STR_VEHICLE_VIEW_ROAD_VEHICLE_REVERSE_TOOLTIP :{BLACK}Force vehicle to turn around STR_VEHICLE_VIEW_ROAD_VEHICLE_REVERSE_TOOLTIP :{BLACK}Force vehicle to turn around
STR_VEHICLE_VIEW_ORDER_LOCATION_TOOLTIP :{BLACK}Centre main view on order destination. Ctrl+Click opens a new viewport on the order destination's location STR_VEHICLE_VIEW_ORDER_LOCATION_TOOLTIP :{BLACK}Centre main view on order destination. Ctrl+Click to open a new viewport on the order destination's location
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP :{BLACK}Refit train to carry a different cargo type STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP :{BLACK}Refit train to carry a different cargo type
@ -4358,8 +4358,8 @@ STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transfer
STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Servicing interval: {LTBLUE}{COMMA}{NBSP}days{BLACK} Last service: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Servicing interval: {LTBLUE}{COMMA}{NBSP}days{BLACK} Last service: {LTBLUE}{DATE_LONG}
STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Servicing interval: {LTBLUE}{COMMA}%{BLACK} Last service: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Servicing interval: {LTBLUE}{COMMA}%{BLACK} Last service: {LTBLUE}{DATE_LONG}
STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase servicing interval by 10. Ctrl+Click increases servicing interval by 5 STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase servicing interval by 10. Ctrl+Click to increase servicing interval by 5
STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease servicing interval by 10. Ctrl+Click decreases servicing interval by 5 STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease servicing interval by 10. Ctrl+Click to decrease servicing interval by 5
STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Change servicing interval type STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Change servicing interval type
STR_VEHICLE_DETAILS_DEFAULT :Default STR_VEHICLE_DETAILS_DEFAULT :Default
@ -4402,7 +4402,7 @@ STR_REFIT_NEW_CAPACITY_COST_OF_REFIT :{BLACK}New capa
STR_REFIT_NEW_CAPACITY_INCOME_FROM_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG} STR_REFIT_NEW_CAPACITY_INCOME_FROM_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG}
STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Cost of refit: {RED}{CURRENCY_LONG} STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Cost of refit: {RED}{CURRENCY_LONG}
STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG} STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG}
STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Select the vehicles to refit. Dragging with the mouse allows to select multiple vehicles. Clicking on an empty space will select the whole vehicle. Ctrl+Click will select a vehicle and the following chain STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Select the vehicles to refit. Click+Drag to select multiple vehicles. Click on an empty space to select the whole vehicle. Ctrl+Click to select a vehicle and the following chain
###length VEHICLE_TYPES ###length VEHICLE_TYPES
STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Select type of cargo for train to carry STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Select type of cargo for train to carry
@ -4427,7 +4427,7 @@ STR_ORDERS_CAPTION :{WHITE}{VEHICLE
STR_ORDERS_TIMETABLE_VIEW :{BLACK}Timetable STR_ORDERS_TIMETABLE_VIEW :{BLACK}Timetable
STR_ORDERS_TIMETABLE_VIEW_TOOLTIP :{BLACK}Switch to the timetable view STR_ORDERS_TIMETABLE_VIEW_TOOLTIP :{BLACK}Switch to the timetable view
STR_ORDERS_LIST_TOOLTIP :{BLACK}Order list - click on an order to highlight it. Ctrl+Click scrolls to the order's destination STR_ORDERS_LIST_TOOLTIP :{BLACK}Order list - click on an order to highlight it. Ctrl+Click to scroll to the order's destination
STR_ORDER_INDEX :{COMMA}:{NBSP} STR_ORDER_INDEX :{COMMA}:{NBSP}
STR_ORDER_TEXT :{STRING4} {STRING2} {STRING} STR_ORDER_TEXT :{STRING4} {STRING2} {STRING}
@ -4497,20 +4497,20 @@ STR_ORDER_CONDITIONAL_VALUE_TOOLTIP :{BLACK}The valu
STR_ORDER_CONDITIONAL_VALUE_CAPT :{WHITE}Enter value to compare against STR_ORDER_CONDITIONAL_VALUE_CAPT :{WHITE}Enter value to compare against
STR_ORDERS_SKIP_BUTTON :{BLACK}Skip STR_ORDERS_SKIP_BUTTON :{BLACK}Skip
STR_ORDERS_SKIP_TOOLTIP :{BLACK}Skip the current order, and start the next. Ctrl+Click skips to the selected order STR_ORDERS_SKIP_TOOLTIP :{BLACK}Skip the current order, and start the next. Ctrl+Click to skip to the selected order
STR_ORDERS_DELETE_BUTTON :{BLACK}Delete STR_ORDERS_DELETE_BUTTON :{BLACK}Delete
STR_ORDERS_DELETE_TOOLTIP :{BLACK}Delete the highlighted order STR_ORDERS_DELETE_TOOLTIP :{BLACK}Delete the highlighted order
STR_ORDERS_DELETE_ALL_TOOLTIP :{BLACK}Delete all orders STR_ORDERS_DELETE_ALL_TOOLTIP :{BLACK}Delete all orders
STR_ORDERS_STOP_SHARING_BUTTON :{BLACK}Stop sharing STR_ORDERS_STOP_SHARING_BUTTON :{BLACK}Stop sharing
STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Stop sharing the order list. Ctrl+Click additionally deletes all orders for this vehicle STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Stop sharing the order list. Ctrl+Click to additionally delete all orders for this vehicle
STR_ORDERS_GO_TO_BUTTON :{BLACK}Go To STR_ORDERS_GO_TO_BUTTON :{BLACK}Go To
STR_ORDER_GO_TO_NEAREST_DEPOT :Go to nearest depot STR_ORDER_GO_TO_NEAREST_DEPOT :Go to nearest depot
STR_ORDER_GO_TO_NEAREST_HANGAR :Go to nearest hangar STR_ORDER_GO_TO_NEAREST_HANGAR :Go to nearest hangar
STR_ORDER_CONDITIONAL :Conditional order jump STR_ORDER_CONDITIONAL :Conditional order jump
STR_ORDER_SHARE :Share orders STR_ORDER_SHARE :Share orders
STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Insert a new order before the highlighted order, or add to end of list. Ctrl makes station orders 'full load any cargo', waypoint orders 'non-stop' and depot orders 'service'. 'Share orders' or Ctrl lets this vehicle share orders with the selected vehicle. Clicking a vehicle copies the orders from that vehicle. A depot order disables automatic servicing of the vehicle STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Insert a new order before the highlighted order, or add to end of list. Ctrl+Click on a station for 'full load any cargo', on a waypoint for 'non-stop', or on a depot for 'service'. Click on another vehicle to copy its orders or Ctrl+Click to share orders. A depot order disables automatic servicing of the vehicle
STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP :{BLACK}Show all vehicles that share this schedule STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP :{BLACK}Show all vehicles that share this schedule
@ -4616,24 +4616,24 @@ STR_TIMETABLE_STATUS_START_AT_DATE :{BLACK}This tim
STR_TIMETABLE_STATUS_START_IN_SECONDS :{BLACK}This timetable will start in {COMMA} seconds STR_TIMETABLE_STATUS_START_IN_SECONDS :{BLACK}This timetable will start in {COMMA} seconds
STR_TIMETABLE_START :{BLACK}Start Timetable STR_TIMETABLE_START :{BLACK}Start Timetable
STR_TIMETABLE_START_TOOLTIP :{BLACK}Select when this timetable starts. Ctrl+Click evenly distributes the start of all vehicles sharing this order based on their relative order, if the order is completely timetabled STR_TIMETABLE_START_TOOLTIP :{BLACK}Select when this timetable starts. Ctrl+Click to evenly distribute the start of all vehicles sharing this order based on their relative order, if the order is completely timetabled
STR_TIMETABLE_START_SECONDS_QUERY :Seconds until timetable starts STR_TIMETABLE_START_SECONDS_QUERY :Seconds until timetable starts
STR_TIMETABLE_CHANGE_TIME :{BLACK}Change Time STR_TIMETABLE_CHANGE_TIME :{BLACK}Change Time
STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Change the amount of time that the highlighted order should take. Ctrl+Click sets the time for all orders STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Change the amount of time that the highlighted order should take. Ctrl+Click to set the time for all orders
STR_TIMETABLE_CLEAR_TIME :{BLACK}Clear Time STR_TIMETABLE_CLEAR_TIME :{BLACK}Clear Time
STR_TIMETABLE_CLEAR_TIME_TOOLTIP :{BLACK}Clear the amount of time for the highlighted order. Ctrl+Click clears the time for all orders STR_TIMETABLE_CLEAR_TIME_TOOLTIP :{BLACK}Clear the amount of time for the highlighted order. Ctrl+Click to clear the time for all orders
STR_TIMETABLE_CHANGE_SPEED :{BLACK}Change Speed Limit STR_TIMETABLE_CHANGE_SPEED :{BLACK}Change Speed Limit
STR_TIMETABLE_CHANGE_SPEED_TOOLTIP :{BLACK}Change the maximum travel speed of the highlighted order. Ctrl+Click sets the speed for all orders STR_TIMETABLE_CHANGE_SPEED_TOOLTIP :{BLACK}Change the maximum travel speed of the highlighted order. Ctrl+Click to set the speed for all orders
STR_TIMETABLE_CLEAR_SPEED :{BLACK}Clear Speed Limit STR_TIMETABLE_CLEAR_SPEED :{BLACK}Clear Speed Limit
STR_TIMETABLE_CLEAR_SPEED_TOOLTIP :{BLACK}Clear the maximum travel speed of the highlighted order. Ctrl+Click clears the speed for all orders STR_TIMETABLE_CLEAR_SPEED_TOOLTIP :{BLACK}Clear the maximum travel speed of the highlighted order. Ctrl+Click to clear the speed for all orders
STR_TIMETABLE_RESET_LATENESS :{BLACK}Reset Late Counter STR_TIMETABLE_RESET_LATENESS :{BLACK}Reset Late Counter
STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Reset the lateness counter, so the vehicle will be on time. Ctrl+Click will reset the entire group so the latest vehicle will be on time and all others will be early STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Reset the lateness counter, so the vehicle will be on time. Ctrl+Click to reset the entire group so the latest vehicle will be on time and all others will be early
STR_TIMETABLE_AUTOFILL :{BLACK}Autofill STR_TIMETABLE_AUTOFILL :{BLACK}Autofill
STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}Fill the timetable automatically with the values from the next journey. Ctrl+Click to try to keep waiting times STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}Fill the timetable automatically with the values from the next journey. Ctrl+Click to try to keep waiting times

@ -531,7 +531,7 @@ void LinkGraphOverlay::DrawStationDots(Blitter *blitter, const DrawPixelInfo *dp
LinkGraphOverlay::DrawVertex(blitter, dpi, pt.x, pt.y, r, LinkGraphOverlay::DrawVertex(blitter, dpi, pt.x, pt.y, r,
_colour_gradient[st->owner != OWNER_NONE ? _colour_gradient[st->owner != OWNER_NONE ?
(Colours)Company::Get(st->owner)->colour : COLOUR_GREY][5], Company::Get(st->owner)->colour : COLOUR_GREY][5],
_colour_gradient[COLOUR_GREY][1]); _colour_gradient[COLOUR_GREY][1]);
} }
} }

@ -11,6 +11,7 @@
#define LIVERY_H #define LIVERY_H
#include "company_type.h" #include "company_type.h"
#include "gfx_type.h"
static const byte LIT_NONE = 0; ///< Don't show the liveries at all static const byte LIT_NONE = 0; ///< Don't show the liveries at all
static const byte LIT_COMPANY = 1; ///< Show the liveries of your own company static const byte LIT_COMPANY = 1; ///< Show the liveries of your own company
@ -78,8 +79,8 @@ DECLARE_ENUM_AS_ADDABLE(LiveryClass)
/** Information about a particular livery. */ /** Information about a particular livery. */
struct Livery { struct Livery {
byte in_use; ///< Bit 0 set if this livery should override the default livery first colour, Bit 1 for the second colour. byte in_use; ///< Bit 0 set if this livery should override the default livery first colour, Bit 1 for the second colour.
byte colour1; ///< First colour, for all vehicles. Colours colour1; ///< First colour, for all vehicles.
byte colour2; ///< Second colour, for vehicles with 2CC support. Colours colour2; ///< Second colour, for vehicles with 2CC support.
}; };
void ResetCompanyLivery(Company *c); void ResetCompanyLivery(Company *c);

@ -641,7 +641,7 @@ void ShowSelectGameWindow();
void SetupColoursAndInitialWindow() void SetupColoursAndInitialWindow()
{ {
for (uint i = 0; i != 16; i++) { for (uint i = 0; i != 16; i++) {
const byte *b = GetNonSprite(PALETTE_RECOLOUR_START + i, SpriteType::Recolour); const byte *b = GetNonSprite(GENERAL_SPRITE_COLOUR(i), SpriteType::Recolour);
assert(b); assert(b);
memcpy(_colour_gradient[i], b + 0xC6, sizeof(_colour_gradient[i])); memcpy(_colour_gradient[i], b + 0xC6, sizeof(_colour_gradient[i]));

@ -113,6 +113,8 @@ private:
NetworkAddress bind_address; ///< Address we're binding to, if any. NetworkAddress bind_address; ///< Address we're binding to, if any.
int family = AF_UNSPEC; ///< Family we are using to connect with. int family = AF_UNSPEC; ///< Family we are using to connect with.
static std::vector<std::shared_ptr<TCPConnecter>> connecters; ///< List of connections that are currently being created.
void Resolve(); void Resolve();
void OnResolved(addrinfo *ai); void OnResolved(addrinfo *ai);
bool TryNextAddress(); bool TryNextAddress();
@ -145,6 +147,18 @@ public:
static void CheckCallbacks(); static void CheckCallbacks();
static void KillAll(); static void KillAll();
/**
* Create the connecter, and initiate connecting by putting it in the collection of TCP connections to make.
* @tparam T The type of connecter to create.
* @param args The arguments to the constructor of T.
* @return Shared pointer to the connecter.
*/
template <class T, typename... Args>
static std::shared_ptr<TCPConnecter> Create(Args&& ... args)
{
return TCPConnecter::connecters.emplace_back(std::make_shared<T>(std::forward<Args>(args)...));
}
}; };
class TCPServerConnecter : public TCPConnecter { class TCPServerConnecter : public TCPConnecter {

@ -19,8 +19,7 @@
#include "../../safeguards.h" #include "../../safeguards.h"
/** List of connections that are currently being created */ /* static */ std::vector<std::shared_ptr<TCPConnecter>> TCPConnecter::connecters;
static std::vector<TCPConnecter *> _tcp_connecters;
/** /**
* Create a new connecter for the given address. * Create a new connecter for the given address.
@ -33,8 +32,6 @@ TCPConnecter::TCPConnecter(const std::string &connection_string, uint16_t defaul
family(family) family(family)
{ {
this->connection_string = NormalizeConnectionString(connection_string, default_port); this->connection_string = NormalizeConnectionString(connection_string, default_port);
_tcp_connecters.push_back(this);
} }
/** /**
@ -58,8 +55,6 @@ TCPServerConnecter::TCPServerConnecter(const std::string &connection_string, uin
default: default:
NOT_REACHED(); NOT_REACHED();
} }
_tcp_connecters.push_back(this);
} }
TCPConnecter::~TCPConnecter() TCPConnecter::~TCPConnecter()
@ -469,24 +464,14 @@ void TCPServerConnecter::SetFailure()
*/ */
/* static */ void TCPConnecter::CheckCallbacks() /* static */ void TCPConnecter::CheckCallbacks()
{ {
for (auto iter = _tcp_connecters.begin(); iter < _tcp_connecters.end(); /* nothing */) { TCPConnecter::connecters.erase(
TCPConnecter *cur = *iter; std::remove_if(TCPConnecter::connecters.begin(), TCPConnecter::connecters.end(),
[](auto &connecter) { return connecter->CheckActivity(); }),
if (cur->CheckActivity()) { TCPConnecter::connecters.end());
iter = _tcp_connecters.erase(iter);
delete cur;
} else {
iter++;
}
}
} }
/** Kill all connection attempts. */ /** Kill all connection attempts. */
/* static */ void TCPConnecter::KillAll() /* static */ void TCPConnecter::KillAll()
{ {
for (auto iter = _tcp_connecters.begin(); iter < _tcp_connecters.end(); /* nothing */) { TCPConnecter::connecters.clear();
TCPConnecter *cur = *iter;
iter = _tcp_connecters.erase(iter);
delete cur;
}
} }

@ -700,7 +700,7 @@ static void NetworkInitialize(bool close_admins = true)
} }
/** Non blocking connection to query servers for their game info. */ /** Non blocking connection to query servers for their game info. */
class TCPQueryConnecter : TCPServerConnecter { class TCPQueryConnecter : public TCPServerConnecter {
private: private:
std::string connection_string; std::string connection_string;
@ -734,7 +734,7 @@ void NetworkQueryServer(const std::string &connection_string)
NetworkGameList *item = NetworkGameListAddItem(connection_string); NetworkGameList *item = NetworkGameListAddItem(connection_string);
item->refreshing = true; item->refreshing = true;
new TCPQueryConnecter(connection_string); TCPConnecter::Create<TCPQueryConnecter>(connection_string);
} }
/** /**
@ -797,7 +797,7 @@ void NetworkRebuildHostList()
} }
/** Non blocking connection create to actually connect to servers */ /** Non blocking connection create to actually connect to servers */
class TCPClientConnecter : TCPServerConnecter { class TCPClientConnecter : public TCPServerConnecter {
private: private:
std::string connection_string; std::string connection_string;
@ -876,7 +876,7 @@ void NetworkClientJoinGame()
_network_join_status = NETWORK_JOIN_STATUS_CONNECTING; _network_join_status = NETWORK_JOIN_STATUS_CONNECTING;
ShowJoinStatusWindow(); ShowJoinStatusWindow();
new TCPClientConnecter(_network_join.connection_string); TCPConnecter::Create<TCPClientConnecter>(_network_join.connection_string);
} }
static void NetworkInitGameInfo() static void NetworkInitGameInfo()

@ -764,7 +764,7 @@ ClientNetworkContentSocketHandler::~ClientNetworkContentSocketHandler()
} }
/** Connect to the content server. */ /** Connect to the content server. */
class NetworkContentConnecter : TCPConnecter { class NetworkContentConnecter : public TCPConnecter {
public: public:
/** /**
* Initiate the connecting. * Initiate the connecting.
@ -799,7 +799,7 @@ void ClientNetworkContentSocketHandler::Connect()
this->isCancelled = false; this->isCancelled = false;
this->isConnecting = true; this->isConnecting = true;
new NetworkContentConnecter(NetworkContentServerConnectionString()); TCPConnecter::Create<NetworkContentConnecter>(NetworkContentServerConnectionString());
} }
/** /**

@ -100,7 +100,7 @@ public:
}; };
/** Connect to the Game Coordinator server. */ /** Connect to the Game Coordinator server. */
class NetworkCoordinatorConnecter : TCPConnecter { class NetworkCoordinatorConnecter : public TCPConnecter {
public: public:
/** /**
* Initiate the connecting. * Initiate the connecting.
@ -306,7 +306,7 @@ bool ClientNetworkCoordinatorSocketHandler::Receive_GC_DIRECT_CONNECT(Packet *p)
this->game_connecter = nullptr; this->game_connecter = nullptr;
} }
this->game_connecter = new NetworkDirectConnecter(hostname, port, token, tracking_number); this->game_connecter = TCPConnecter::Create<NetworkDirectConnecter>(hostname, port, token, tracking_number);
return true; return true;
} }
@ -349,7 +349,7 @@ bool ClientNetworkCoordinatorSocketHandler::Receive_GC_STUN_CONNECT(Packet *p)
* STUN server. This means that if there is any NAT in the local network, * STUN server. This means that if there is any NAT in the local network,
* the public ip:port is still pointing to the local address, and as such * the public ip:port is still pointing to the local address, and as such
* a connection can be established. */ * a connection can be established. */
this->game_connecter = new NetworkReuseStunConnecter(host, port, family_it->second->local_addr, token, tracking_number, family); this->game_connecter = TCPConnecter::Create<NetworkReuseStunConnecter>(host, port, family_it->second->local_addr, token, tracking_number, family);
return true; return true;
} }
@ -426,7 +426,7 @@ void ClientNetworkCoordinatorSocketHandler::Connect()
this->connecting = true; this->connecting = true;
this->last_activity = std::chrono::steady_clock::now(); this->last_activity = std::chrono::steady_clock::now();
new NetworkCoordinatorConnecter(NetworkCoordinatorConnectionString()); TCPConnecter::Create<NetworkCoordinatorConnecter>(NetworkCoordinatorConnectionString());
} }
NetworkRecvStatus ClientNetworkCoordinatorSocketHandler::CloseConnection(bool error) NetworkRecvStatus ClientNetworkCoordinatorSocketHandler::CloseConnection(bool error)

@ -58,7 +58,7 @@ private:
std::map<std::string, TCPServerConnecter *> connecter_pre; ///< Based on invite codes, the current connecters that are pending. std::map<std::string, TCPServerConnecter *> connecter_pre; ///< Based on invite codes, the current connecters that are pending.
std::map<std::string, std::map<int, std::unique_ptr<ClientNetworkStunSocketHandler>>> stun_handlers; ///< All pending STUN handlers, stored by token:family. std::map<std::string, std::map<int, std::unique_ptr<ClientNetworkStunSocketHandler>>> stun_handlers; ///< All pending STUN handlers, stored by token:family.
std::map<std::string, std::unique_ptr<ClientNetworkTurnSocketHandler>> turn_handlers; ///< Pending TURN handler (if any), stored by token. std::map<std::string, std::unique_ptr<ClientNetworkTurnSocketHandler>> turn_handlers; ///< Pending TURN handler (if any), stored by token.
TCPConnecter *game_connecter = nullptr; ///< Pending connecter to the game server. std::shared_ptr<TCPConnecter> game_connecter{}; ///< Pending connecter to the game server.
uint32_t newgrf_lookup_table_cursor = 0; ///< Last received cursor for the #GameInfoNewGRFLookupTable updates. uint32_t newgrf_lookup_table_cursor = 0; ///< Last received cursor for the #GameInfoNewGRFLookupTable updates.
GameInfoNewGRFLookupTable newgrf_lookup_table; ///< Table to look up NewGRFs in the GC_LISTING packets. GameInfoNewGRFLookupTable newgrf_lookup_table; ///< Table to look up NewGRFs in the GC_LISTING packets.

@ -71,7 +71,7 @@ void ClientNetworkStunSocketHandler::Connect(const std::string &token, uint8_t f
this->token = token; this->token = token;
this->family = family; this->family = family;
this->connecter = new NetworkStunConnecter(this, NetworkStunConnectionString(), token, family); this->connecter = TCPConnecter::Create<NetworkStunConnecter>(this, NetworkStunConnectionString(), token, family);
} }
/** /**

@ -20,7 +20,7 @@ private:
bool sent_result = false; ///< Did we sent the result of the STUN connection? bool sent_result = false; ///< Did we sent the result of the STUN connection?
public: public:
TCPConnecter *connecter = nullptr; ///< Connecter instance. std::shared_ptr<TCPConnecter> connecter{}; ///< Connecter instance.
NetworkAddress local_addr; ///< Local addresses of the socket. NetworkAddress local_addr; ///< Local addresses of the socket.
NetworkRecvStatus CloseConnection(bool error = true) override; NetworkRecvStatus CloseConnection(bool error = true) override;

@ -73,7 +73,7 @@ bool ClientNetworkTurnSocketHandler::Receive_TURN_CONNECTED(Packet *p)
void ClientNetworkTurnSocketHandler::Connect() void ClientNetworkTurnSocketHandler::Connect()
{ {
this->connect_started = true; this->connect_started = true;
this->connecter = new NetworkTurnConnecter(this, this->connection_string); this->connecter = TCPConnecter::Create<NetworkTurnConnecter>(this, this->connection_string);
} }
/** /**

@ -24,7 +24,7 @@ protected:
bool Receive_TURN_CONNECTED(Packet *p) override; bool Receive_TURN_CONNECTED(Packet *p) override;
public: public:
TCPConnecter *connecter = nullptr; ///< Connecter instance. std::shared_ptr<TCPConnecter> connecter{}; ///< Connecter instance.
bool connect_started = false; ///< Whether we started the connection. bool connect_started = false; ///< Whether we started the connection.
ClientNetworkTurnSocketHandler(const std::string &token, uint8_t tracking_number, const std::string &connection_string) : token(token), tracking_number(tracking_number), connection_string(connection_string) {} ClientNetworkTurnSocketHandler(const std::string &token, uint8_t tracking_number, const std::string &connection_string) : token(token), tracking_number(tracking_number), connection_string(connection_string) {}

@ -2400,10 +2400,11 @@ static ChangeInfoResult TownHouseChangeInfo(uint hid, int numinfo, int prop, con
housespec->grf_prop.local_id = hid + i; housespec->grf_prop.local_id = hid + i;
housespec->grf_prop.subst_id = subs_id; housespec->grf_prop.subst_id = subs_id;
housespec->grf_prop.grffile = _cur.grffile; housespec->grf_prop.grffile = _cur.grffile;
housespec->random_colour[0] = 0x04; // those 4 random colours are the base colour /* Set default colours for randomization, used if not overridden. */
housespec->random_colour[1] = 0x08; // for all new houses housespec->random_colour[0] = COLOUR_RED;
housespec->random_colour[2] = 0x0C; // they stand for red, blue, orange and green housespec->random_colour[1] = COLOUR_BLUE;
housespec->random_colour[3] = 0x06; housespec->random_colour[2] = COLOUR_ORANGE;
housespec->random_colour[3] = COLOUR_GREEN;
/* House flags 40 and 80 are exceptions; these flags are never set automatically. */ /* House flags 40 and 80 are exceptions; these flags are never set automatically. */
housespec->building_flags &= ~(BUILDING_IS_CHURCH | BUILDING_IS_STADIUM); housespec->building_flags &= ~(BUILDING_IS_CHURCH | BUILDING_IS_STADIUM);
@ -2497,7 +2498,7 @@ static ChangeInfoResult TownHouseChangeInfo(uint hid, int numinfo, int prop, con
break; break;
case 0x17: // Four random colours to use case 0x17: // Four random colours to use
for (uint j = 0; j < 4; j++) housespec->random_colour[j] = buf->ReadByte(); for (uint j = 0; j < 4; j++) housespec->random_colour[j] = static_cast<Colours>(GB(buf->ReadByte(), 0, 4));
break; break;
case 0x18: // Relative probability of appearing case 0x18: // Relative probability of appearing

@ -38,6 +38,7 @@
#include "table/sprites.h" #include "table/sprites.h"
#include <map> #include <map>
#include <numeric>
#include "safeguards.h" #include "safeguards.h"
/** /**
@ -1666,20 +1667,20 @@ public:
this->smallest_y = std::max(min_inf_height, min_acs_height + WidgetDimensions::scaled.vsep_wide + min_avs_height); this->smallest_y = std::max(min_inf_height, min_acs_height + WidgetDimensions::scaled.vsep_wide + min_avs_height);
/* Filling. */ /* Filling. */
this->fill_x = LeastCommonMultiple(this->avs->fill_x, this->acs->fill_x); this->fill_x = std::lcm(this->avs->fill_x, this->acs->fill_x);
if (this->inf->fill_x > 0 && (this->fill_x == 0 || this->fill_x > this->inf->fill_x)) this->fill_x = this->inf->fill_x; if (this->inf->fill_x > 0 && (this->fill_x == 0 || this->fill_x > this->inf->fill_x)) this->fill_x = this->inf->fill_x;
this->fill_y = this->avs->fill_y; this->fill_y = this->avs->fill_y;
if (this->acs->fill_y > 0 && (this->fill_y == 0 || this->fill_y > this->acs->fill_y)) this->fill_y = this->acs->fill_y; if (this->acs->fill_y > 0 && (this->fill_y == 0 || this->fill_y > this->acs->fill_y)) this->fill_y = this->acs->fill_y;
this->fill_y = LeastCommonMultiple(this->fill_y, this->inf->fill_y); this->fill_y = std::lcm(this->fill_y, this->inf->fill_y);
/* Resizing. */ /* Resizing. */
this->resize_x = LeastCommonMultiple(this->avs->resize_x, this->acs->resize_x); this->resize_x = std::lcm(this->avs->resize_x, this->acs->resize_x);
if (this->inf->resize_x > 0 && (this->resize_x == 0 || this->resize_x > this->inf->resize_x)) this->resize_x = this->inf->resize_x; if (this->inf->resize_x > 0 && (this->resize_x == 0 || this->resize_x > this->inf->resize_x)) this->resize_x = this->inf->resize_x;
this->resize_y = this->avs->resize_y; this->resize_y = this->avs->resize_y;
if (this->acs->resize_y > 0 && (this->resize_y == 0 || this->resize_y > this->acs->resize_y)) this->resize_y = this->acs->resize_y; if (this->acs->resize_y > 0 && (this->resize_y == 0 || this->resize_y > this->acs->resize_y)) this->resize_y = this->acs->resize_y;
this->resize_y = LeastCommonMultiple(this->resize_y, this->inf->resize_y); this->resize_y = std::lcm(this->resize_y, this->inf->resize_y);
/* Make sure the height suits the 3 column (resp. not-editable) format; the 2 column format can easily fill space between the lists */ /* Make sure the height suits the 3 column (resp. not-editable) format; the 2 column format can easily fill space between the lists */
this->smallest_y = ComputeMaxSize(min_acs_height, this->smallest_y + this->resize_y - 1, this->resize_y); this->smallest_y = ComputeMaxSize(min_acs_height, this->smallest_y + this->resize_y - 1, this->resize_y);

@ -558,7 +558,7 @@ static inline PaletteID GetHouseColour(HouseID house_id, TileIndex tile = INVALI
return HasBit(callback, 14) ? GB(callback, 0, 8) + SPR_2CCMAP_BASE : callback; return HasBit(callback, 14) ? GB(callback, 0, 8) + SPR_2CCMAP_BASE : callback;
} }
} }
return hs->random_colour[TileHash2Bit(TileX(tile), TileY(tile))] + PALETTE_RECOLOUR_START; return GENERAL_SPRITE_COLOUR(hs->random_colour[TileHash2Bit(TileX(tile), TileY(tile))]);
} }
static void DrawTileLayout(const TileInfo *ti, const TileLayoutSpriteGroup *group, byte stage, HouseID house_id) static void DrawTileLayout(const TileInfo *ti, const TileLayoutSpriteGroup *group, byte stage, HouseID house_id)

@ -12,6 +12,7 @@
#include "core/enum_type.hpp" #include "core/enum_type.hpp"
#include "date_type.h" #include "date_type.h"
#include "gfx_type.h"
#include "strings_type.h" #include "strings_type.h"
#include "sound_type.h" #include "sound_type.h"
#include <vector> #include <vector>
@ -161,8 +162,8 @@ struct CompanyNewsInformation : NewsAllocatedData {
std::string president_name; ///< The name of the president std::string president_name; ///< The name of the president
std::string other_company_name; ///< The name of the company taking over this one std::string other_company_name; ///< The name of the company taking over this one
uint32_t face; ///< The face of the president uint32_t face; ///< The face of the president
byte colour; ///< The colour related to the company Colours colour; ///< The colour related to the company
CompanyNewsInformation(const struct Company *c, const struct Company *other = nullptr); CompanyNewsInformation(const struct Company *c, const struct Company *other = nullptr);
}; };

@ -1177,7 +1177,7 @@ static void MakeNewGameDone()
if (_settings_client.gui.starting_colour != COLOUR_END) { if (_settings_client.gui.starting_colour != COLOUR_END) {
c->colour = _settings_client.gui.starting_colour; c->colour = _settings_client.gui.starting_colour;
ResetCompanyLivery(c); ResetCompanyLivery(c);
_company_colours[c->index] = (Colours)c->colour; _company_colours[c->index] = c->colour;
BuildOwnerLegend(); BuildOwnerLegend();
} }

@ -516,6 +516,7 @@ struct BuildRailToolbarWindow : Window {
this->FinishInitNested(TRANSPORT_RAIL); this->FinishInitNested(TRANSPORT_RAIL);
this->SetupRailToolbar(railtype); this->SetupRailToolbar(railtype);
this->DisableWidget(WID_RAT_REMOVE); this->DisableWidget(WID_RAT_REMOVE);
this->OnInvalidateData();
this->last_user_action = INVALID_WID_RAT; this->last_user_action = INVALID_WID_RAT;
if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this); if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
@ -530,6 +531,53 @@ struct BuildRailToolbarWindow : Window {
this->Window::Close(); this->Window::Close();
} }
/** List of widgets to be disabled if infrastructure limit prevents building. */
static inline const std::initializer_list<WidgetID> can_build_widgets = {
WID_RAT_BUILD_NS, WID_RAT_BUILD_X, WID_RAT_BUILD_EW, WID_RAT_BUILD_Y, WID_RAT_AUTORAIL,
WID_RAT_BUILD_DEPOT, WID_RAT_BUILD_WAYPOINT, WID_RAT_BUILD_STATION, WID_RAT_BUILD_SIGNALS,
WID_RAT_BUILD_BRIDGE, WID_RAT_BUILD_TUNNEL, WID_RAT_CONVERT_RAIL,
};
void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
{
if (!gui_scope) return;
if (this->GetWidget<NWidgetStacked>(WID_RAT_POLYRAIL_SEL)->SetDisplayedPlane(_settings_client.gui.show_rail_polyline_tool ? 0 : SZSP_NONE)) {
if (this->IsWidgetLowered(WID_RAT_POLYRAIL)) {
ResetObjectToPlace();
}
this->ReInit();
}
bool can_build = CanBuildVehicleInfrastructure(VEH_TRAIN);
for (const WidgetID widget : can_build_widgets) this->SetWidgetDisabledState(widget, !can_build);
if (!can_build) {
CloseWindowById(WC_BUILD_SIGNAL, TRANSPORT_RAIL);
CloseWindowById(WC_BUILD_STATION, TRANSPORT_RAIL);
CloseWindowById(WC_BUILD_DEPOT, TRANSPORT_RAIL);
CloseWindowById(WC_BUILD_WAYPOINT, TRANSPORT_RAIL);
CloseWindowById(WC_SELECT_STATION, 0);
}
}
bool OnTooltip([[maybe_unused]] Point pt, WidgetID widget, TooltipCloseCondition close_cond) override
{
bool can_build = CanBuildVehicleInfrastructure(VEH_TRAIN);
if (can_build) {
if (widget == WID_RAT_CONVERT_RAIL) {
SetDParam(0, STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL);
GuiShowTooltips(this, STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_EXTRA, close_cond, 1);
return true;
}
return false;
}
if (std::find(std::begin(can_build_widgets), std::end(can_build_widgets), widget) == std::end(can_build_widgets)) return false;
GuiShowTooltips(this, STR_TOOLBAR_DISABLED_NO_VEHICLE_AVAILABLE, close_cond);
return true;
}
/** /**
* Configures the rail toolbar for railtype given * Configures the rail toolbar for railtype given
* @param railtype the railtype to display * @param railtype the railtype to display
@ -747,16 +795,6 @@ struct BuildRailToolbarWindow : Window {
if (_ctrl_pressed) RailToolbar_CtrlChanged(this); if (_ctrl_pressed) RailToolbar_CtrlChanged(this);
} }
virtual bool OnTooltip(Point pt, WidgetID widget, TooltipCloseCondition close_cond) override
{
if (widget == WID_RAT_CONVERT_RAIL) {
SetDParam(0, STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL);
GuiShowTooltips(this, STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_EXTRA, close_cond, 1);
return true;
}
return false;
}
EventState OnHotkey(int hotkey) override EventState OnHotkey(int hotkey) override
{ {
MarkTileDirtyByTile(TileVirtXY(_thd.pos.x, _thd.pos.y)); // redraw tile selection MarkTileDirtyByTile(TileVirtXY(_thd.pos.x, _thd.pos.y)); // redraw tile selection
@ -965,18 +1003,6 @@ struct BuildRailToolbarWindow : Window {
if (this->IsWidgetLowered(WID_RAT_BUILD_WAYPOINT)) CheckRedrawWaypointCoverage(this, false); if (this->IsWidgetLowered(WID_RAT_BUILD_WAYPOINT)) CheckRedrawWaypointCoverage(this, false);
} }
void OnInvalidateData(int data = 0, bool gui_scope = true) override
{
if (!gui_scope) return;
if (this->GetWidget<NWidgetStacked>(WID_RAT_POLYRAIL_SEL)->SetDisplayedPlane(_settings_client.gui.show_rail_polyline_tool ? 0 : SZSP_NONE)) {
if (this->IsWidgetLowered(WID_RAT_POLYRAIL)) {
ResetObjectToPlace();
}
this->ReInit();
}
}
static HotkeyList hotkeys; static HotkeyList hotkeys;
}; };

@ -2897,7 +2897,7 @@ bool AfterLoadGame()
if (IsSavegameVersionBefore(SLV_148)) { if (IsSavegameVersionBefore(SLV_148)) {
for (Object *o : Object::Iterate()) { for (Object *o : Object::Iterate()) {
Owner owner = GetTileOwner(o->location.tile); Owner owner = GetTileOwner(o->location.tile);
o->colour = (owner == OWNER_NONE) ? Random() & 0xF : Company::Get(owner)->livery->colour1; o->colour = (owner == OWNER_NONE) ? static_cast<Colours>(GB(Random(), 0, 4)) : Company::Get(owner)->livery->colour1;
} }
} }

@ -310,7 +310,7 @@ struct PLYRChunkHandler : ChunkHandler {
Company *c = new (index) Company(); Company *c = new (index) Company();
SetDefaultCompanySettings(c->index); SetDefaultCompanySettings(c->index);
SlObject((CompanyProperties *)c, slt); SlObject((CompanyProperties *)c, slt);
_company_colours[index] = (Colours)c->colour; _company_colours[index] = c->colour;
} }
} }

@ -10,38 +10,26 @@
#include "../stdafx.h" #include "../stdafx.h"
#include "saveload.h" #include "saveload.h"
#include "../pathfinder/water_regions.h"
#include "../safeguards.h" #include "../safeguards.h"
namespace upstream_sl { namespace upstream_sl {
static const SaveLoad _water_region_desc[] = { extern void SlSkipArray();
SLE_VAR(WaterRegionSaveLoadInfo, initialized, SLE_BOOL),
};
struct WRGNChunkHandler : ChunkHandler {
WRGNChunkHandler() : ChunkHandler('WRGN', CH_TABLE) {}
void Save() const override /* Water Region savegame data is no longer used, but still needed for old savegames to load without errors. */
{ struct WaterRegionChunkHandler : ChunkHandler {
SlTableHeader(_water_region_desc); WaterRegionChunkHandler() : ChunkHandler('WRGN', CH_READONLY)
} {}
void Load() const override void Load() const override
{ {
const std::vector<SaveLoad> slt = SlTableHeader(_water_region_desc); SlTableHeader({});
SlSkipArray();
int index; };
while ((index = SlIterateArray()) != -1) {
WaterRegionSaveLoadInfo region_info;
SlObject(&region_info, slt);
}
}
}; };
static const WRGNChunkHandler WRGN; static const WaterRegionChunkHandler WRGN;
static const ChunkHandlerRef water_region_chunk_handlers[] = { WRGN }; static const ChunkHandlerRef water_region_chunk_handlers[] = { WRGN };
extern const ChunkHandlerTable _water_region_chunk_handlers(water_region_chunk_handlers); extern const ChunkHandlerTable _water_region_chunk_handlers(water_region_chunk_handlers);

@ -275,8 +275,8 @@ struct GUISettings : public TimeSettings {
bool show_progsig_ui; ///< Show programmable pre-signals feature in UI bool show_progsig_ui; ///< Show programmable pre-signals feature in UI
bool show_noentrysig_ui; ///< Show no-entry signals feature in UI bool show_noentrysig_ui; ///< Show no-entry signals feature in UI
uint8_t osk_activation; ///< Mouse gesture to trigger the OSK. uint8_t osk_activation; ///< Mouse gesture to trigger the OSK.
byte starting_colour; ///< default color scheme for the company to start a new game with Colours starting_colour; ///< default color scheme for the company to start a new game with
byte starting_colour_secondary; ///< default secondary color scheme for the company to start a new game with Colours starting_colour_secondary; ///< default secondary color scheme for the company to start a new game with
bool show_newgrf_name; ///< Show the name of the NewGRF in the build vehicle window bool show_newgrf_name; ///< Show the name of the NewGRF in the build vehicle window
bool show_cargo_in_vehicle_lists; ///< Show the cargoes the vehicles can carry in the list windows bool show_cargo_in_vehicle_lists; ///< Show the cargoes the vehicles can carry in the list windows
bool show_wagon_intro_year; ///< Show the introduction year for wagons in the build vehicle window bool show_wagon_intro_year; ///< Show the introduction year for wagons in the build vehicle window

@ -455,10 +455,10 @@ static void FixTTOCompanies()
} }
} }
static inline byte RemapTTOColour(byte tto) static inline Colours RemapTTOColour(Colours tto)
{ {
/** Lossy remapping of TTO colours to TTD colours. SVXConverter uses the same conversion. */ /** Lossy remapping of TTO colours to TTD colours. SVXConverter uses the same conversion. */
static const byte tto_colour_remap[] = { static const Colours tto_colour_remap[] = {
COLOUR_DARK_BLUE, COLOUR_GREY, COLOUR_YELLOW, COLOUR_RED, COLOUR_DARK_BLUE, COLOUR_GREY, COLOUR_YELLOW, COLOUR_RED,
COLOUR_PURPLE, COLOUR_DARK_GREEN, COLOUR_ORANGE, COLOUR_PALE_GREEN, COLOUR_PURPLE, COLOUR_DARK_GREEN, COLOUR_ORANGE, COLOUR_PALE_GREEN,
COLOUR_BLUE, COLOUR_GREEN, COLOUR_CREAM, COLOUR_BROWN, COLOUR_BLUE, COLOUR_GREEN, COLOUR_CREAM, COLOUR_BROWN,
@ -1032,7 +1032,7 @@ static bool LoadOldCompany(LoadgameState *ls, int num)
if (c->money == 893288) c->money = c->current_loan = 100000; if (c->money == 893288) c->money = c->current_loan = 100000;
} }
_company_colours[num] = (Colours)c->colour; _company_colours[num] = c->colour;
c->inaugurated_year -= ORIGINAL_BASE_YEAR; c->inaugurated_year -= ORIGINAL_BASE_YEAR;
return true; return true;

@ -379,6 +379,8 @@ enum SaveLoadVersion : uint16_t {
SLV_TIMETABLE_TICKS_TYPE, ///< 323 PR#11435 Convert timetable current order time to ticks. SLV_TIMETABLE_TICKS_TYPE, ///< 323 PR#11435 Convert timetable current order time to ticks.
SLV_WATER_REGIONS, ///< 324 PR#10543 Water Regions for ship pathfinder. SLV_WATER_REGIONS, ///< 324 PR#10543 Water Regions for ship pathfinder.
SLV_WATER_REGION_EVAL_SIMPLIFIED, ///< 325 PR#11750 Simplified Water Region evaluation.
SL_MAX_VERSION, ///< Highest possible saveload version SL_MAX_VERSION, ///< Highest possible saveload version
SL_SPRING_2013_v2_0_102 = 220, SL_SPRING_2013_v2_0_102 = 220,

@ -22,6 +22,7 @@
#include "window_func.h" #include "window_func.h"
#include "gui.h" #include "gui.h"
#include "vehicle_base.h" #include "vehicle_base.h"
#include "palette_func.h"
#include "game/game.hpp" #include "game/game.hpp"
#include "script/api/script_story_page.hpp" #include "script/api/script_story_page.hpp"
#include "script/api/script_event_types.hpp" #include "script/api/script_event_types.hpp"
@ -145,7 +146,9 @@ void StoryPageButtonData::SetVehicleType(VehicleType vehtype)
/** Get the button background colour. */ /** Get the button background colour. */
Colours StoryPageButtonData::GetColour() const Colours StoryPageButtonData::GetColour() const
{ {
return Extract<Colours, 0, 8>(this->referenced_id); Colours colour = Extract<Colours, 0, 8>(this->referenced_id);
if (!IsValidColours(colour)) return INVALID_COLOUR;
return colour;
} }
StoryPageButtonFlags StoryPageButtonData::GetFlags() const StoryPageButtonFlags StoryPageButtonData::GetFlags() const

@ -413,7 +413,7 @@ var = vehicle.smoke_amount
type = SLE_UINT8 type = SLE_UINT8
from = SLV_145 from = SLV_145
flags = SF_GUI_DROPDOWN flags = SF_GUI_DROPDOWN
def = 1 def = 2
min = 0 min = 0
max = 2 max = 2
str = STR_CONFIG_SETTING_SMOKE_AMOUNT str = STR_CONFIG_SETTING_SMOKE_AMOUNT

@ -1813,7 +1813,7 @@ static_assert(lengthof(_town_draw_tile_data) == (NEW_HOUSE_OFFSET) * 4 * 4);
{mnd, mxd, p, rc, bn, rr, mg, \ {mnd, mxd, p, rc, bn, rr, mg, \
{ca1, ca2, ca3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, \ {ca1, ca2, ca3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, \
{cg1, cg2, cg3, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, \ {cg1, cg2, cg3, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, \
bf, ba, true, GRFFileProps(INVALID_HOUSE_ID), 0, {0, 0, 0, 0}, \ bf, ba, true, GRFFileProps(INVALID_HOUSE_ID), 0, {COLOUR_BEGIN, COLOUR_BEGIN, COLOUR_BEGIN, COLOUR_BEGIN}, \
16, NO_EXTRA_FLAG, HCF_NONE, HOUSE_NO_CLASS, {0, 2, 0, 0}, 0, 0, 0} 16, NO_EXTRA_FLAG, HCF_NONE, HOUSE_NO_CLASS, {0, 2, 0, 0}, 0, 0, 0}
/** House specifications from original data */ /** House specifications from original data */
static const HouseSpec _original_house_specs[] = { static const HouseSpec _original_house_specs[] = {

@ -13,41 +13,6 @@
#include "../core/math_func.hpp" #include "../core/math_func.hpp"
TEST_CASE("LeastCommonMultipleTest - Zero")
{
CHECK(0 == LeastCommonMultiple(0, 0));
CHECK(0 == LeastCommonMultiple(0, 600));
CHECK(0 == LeastCommonMultiple(600, 0));
}
TEST_CASE("LeastCommonMultipleTest - FindLCM")
{
CHECK(25 == LeastCommonMultiple(5, 25));
CHECK(25 == LeastCommonMultiple(25, 5));
CHECK(130 == LeastCommonMultiple(5, 26));
CHECK(130 == LeastCommonMultiple(26, 5));
}
TEST_CASE("GreatestCommonDivisorTest - Negative")
{
CHECK(4 == GreatestCommonDivisor(4, -52));
// CHECK(3 == GreatestCommonDivisor(-27, 6)); // error - returns -3
}
TEST_CASE("GreatestCommonDivisorTest - Zero")
{
CHECK(27 == GreatestCommonDivisor(0, 27));
CHECK(27 == GreatestCommonDivisor(27, 0));
}
TEST_CASE("GreatestCommonDivisorTest - FindGCD")
{
CHECK(5 == GreatestCommonDivisor(5, 25));
CHECK(5 == GreatestCommonDivisor(25, 5));
CHECK(1 == GreatestCommonDivisor(7, 27));
CHECK(1 == GreatestCommonDivisor(27, 7));
}
TEST_CASE("DivideApproxTest - Negative") TEST_CASE("DivideApproxTest - Negative")
{ {
CHECK(-2 == DivideApprox(-5, 2)); CHECK(-2 == DivideApprox(-5, 2));

@ -4315,9 +4315,20 @@ void UpdateNextViewportPosition(Window *w)
if (delta_x != 0 || delta_y != 0) { if (delta_x != 0 || delta_y != 0) {
if (_settings_client.gui.smooth_scroll) { if (_settings_client.gui.smooth_scroll) {
int max_scroll = ScaleByMapSize1D(512 * ZOOM_LVL_BASE); int max_scroll = ScaleByMapSize1D(512 * ZOOM_LVL_BASE);
/* Not at our desired position yet... */
w->viewport->next_scrollpos_x += Clamp(DivAwayFromZero(delta_x, 4), -max_scroll, max_scroll); int delta_x_clamped;
w->viewport->next_scrollpos_y += Clamp(DivAwayFromZero(delta_y, 4), -max_scroll, max_scroll); int delta_y_clamped;
if (abs(delta_x) > abs(delta_y)) {
delta_x_clamped = Clamp(DivAwayFromZero(delta_x, 4), -max_scroll, max_scroll);
delta_y_clamped = delta_y * delta_x_clamped / delta_x;
} else {
delta_y_clamped = Clamp(DivAwayFromZero(delta_y, 4), -max_scroll, max_scroll);
delta_x_clamped = delta_x * delta_y_clamped / delta_y;
}
w->viewport->next_scrollpos_x += delta_x_clamped;
w->viewport->next_scrollpos_y += delta_y_clamped;
} else { } else {
w->viewport->next_scrollpos_x = w->viewport->dest_scrollpos_x; w->viewport->next_scrollpos_x = w->viewport->dest_scrollpos_x;
w->viewport->next_scrollpos_y = w->viewport->dest_scrollpos_y; w->viewport->next_scrollpos_y = w->viewport->dest_scrollpos_y;

@ -23,6 +23,8 @@
#include "table/strings.h" #include "table/strings.h"
#include "table/string_colours.h" #include "table/string_colours.h"
#include <numeric>
#include "safeguards.h" #include "safeguards.h"
WidgetDimensions WidgetDimensions::scaled = {}; WidgetDimensions WidgetDimensions::scaled = {};
@ -1258,10 +1260,10 @@ void NWidgetStacked::SetupSmallestSize(Window *w)
this->smallest_x = std::max(this->smallest_x, child_wid->smallest_x + child_wid->padding.Horizontal()); this->smallest_x = std::max(this->smallest_x, child_wid->smallest_x + child_wid->padding.Horizontal());
this->smallest_y = std::max(this->smallest_y, child_wid->smallest_y + child_wid->padding.Vertical()); this->smallest_y = std::max(this->smallest_y, child_wid->smallest_y + child_wid->padding.Vertical());
this->fill_x = LeastCommonMultiple(this->fill_x, child_wid->fill_x); this->fill_x = std::lcm(this->fill_x, child_wid->fill_x);
this->fill_y = LeastCommonMultiple(this->fill_y, child_wid->fill_y); this->fill_y = std::lcm(this->fill_y, child_wid->fill_y);
this->resize_x = LeastCommonMultiple(this->resize_x, child_wid->resize_x); this->resize_x = std::lcm(this->resize_x, child_wid->resize_x);
this->resize_y = LeastCommonMultiple(this->resize_y, child_wid->resize_y); this->resize_y = std::lcm(this->resize_y, child_wid->resize_y);
} }
} }
@ -1449,12 +1451,12 @@ void NWidgetHorizontal::SetupSmallestSize(Window *w)
if (child_wid->fill_x > 0) { if (child_wid->fill_x > 0) {
if (this->fill_x == 0 || this->fill_x > child_wid->fill_x) this->fill_x = child_wid->fill_x; if (this->fill_x == 0 || this->fill_x > child_wid->fill_x) this->fill_x = child_wid->fill_x;
} }
this->fill_y = LeastCommonMultiple(this->fill_y, child_wid->fill_y); this->fill_y = std::lcm(this->fill_y, child_wid->fill_y);
if (child_wid->resize_x > 0) { if (child_wid->resize_x > 0) {
if (this->resize_x == 0 || this->resize_x > child_wid->resize_x) this->resize_x = child_wid->resize_x; if (this->resize_x == 0 || this->resize_x > child_wid->resize_x) this->resize_x = child_wid->resize_x;
} }
this->resize_y = LeastCommonMultiple(this->resize_y, child_wid->resize_y); this->resize_y = std::lcm(this->resize_y, child_wid->resize_y);
} }
if (this->fill_x == 0 && this->pip_ratio_pre + this->pip_ratio_inter + this->pip_ratio_post > 0) this->fill_x = 1; if (this->fill_x == 0 && this->pip_ratio_pre + this->pip_ratio_inter + this->pip_ratio_post > 0) this->fill_x = 1;
/* 4. Increase by required PIP space. */ /* 4. Increase by required PIP space. */
@ -1638,12 +1640,12 @@ void NWidgetVertical::SetupSmallestSize(Window *w)
if (child_wid->fill_y > 0) { if (child_wid->fill_y > 0) {
if (this->fill_y == 0 || this->fill_y > child_wid->fill_y) this->fill_y = child_wid->fill_y; if (this->fill_y == 0 || this->fill_y > child_wid->fill_y) this->fill_y = child_wid->fill_y;
} }
this->fill_x = LeastCommonMultiple(this->fill_x, child_wid->fill_x); this->fill_x = std::lcm(this->fill_x, child_wid->fill_x);
if (child_wid->resize_y > 0) { if (child_wid->resize_y > 0) {
if (this->resize_y == 0 || this->resize_y > child_wid->resize_y) this->resize_y = child_wid->resize_y; if (this->resize_y == 0 || this->resize_y > child_wid->resize_y) this->resize_y = child_wid->resize_y;
} }
this->resize_x = LeastCommonMultiple(this->resize_x, child_wid->resize_x); this->resize_x = std::lcm(this->resize_x, child_wid->resize_x);
} }
if (this->fill_y == 0 && this->pip_ratio_pre + this->pip_ratio_inter + this->pip_ratio_post > 0) this->fill_y = 1; if (this->fill_y == 0 && this->pip_ratio_pre + this->pip_ratio_inter + this->pip_ratio_post > 0) this->fill_y = 1;
/* 4. Increase by required PIP space. */ /* 4. Increase by required PIP space. */

@ -37,27 +37,27 @@ DECLARE_ENUM_AS_BIT_SET(FrameFlags)
class WidgetDimensions { class WidgetDimensions {
public: public:
RectPadding imgbtn; RectPadding imgbtn; ///< Padding around image button image.
RectPadding inset; RectPadding inset; ///< Padding inside inset container.
RectPadding vscrollbar; RectPadding vscrollbar; ///< Padding inside vertical scrollbar buttons.
RectPadding hscrollbar; RectPadding hscrollbar; ///< Padding inside horizontal scrollbar buttons.
RectPadding bevel; ///< Widths of bevel border. RectPadding bevel; ///< Bevel thickness, affected by "scaled bevels" game option.
RectPadding fullbevel; ///< Always-scaled bevel border. RectPadding fullbevel; ///< Always-scaled bevel thickness.
RectPadding framerect; ///< Offsets within frame area. RectPadding framerect; ///< Standard padding inside many panels.
RectPadding frametext; ///< Offsets within a text frame area. RectPadding frametext; ///< Padding inside frame with text.
RectPadding matrix; ///< Offsets within a matrix cell. RectPadding matrix; ///< Padding of WWT_MATRIX items.
RectPadding shadebox; RectPadding shadebox; ///< Padding around image in shadebox widget.
RectPadding stickybox; RectPadding stickybox; ///< Padding around image in stickybox widget.
RectPadding debugbox; RectPadding debugbox; ///< Padding around image in debugbox widget.
RectPadding defsizebox; RectPadding defsizebox; ///< Padding around image in defsizebox widget.
RectPadding resizebox; RectPadding resizebox; ///< Padding around image in resizebox widget.
RectPadding closebox; RectPadding closebox; ///< Padding around image in closebox widget.
RectPadding captiontext; ///< Offsets of text within a caption. RectPadding captiontext; ///< Padding for text within caption widget.
RectPadding dropdowntext; ///< Offsets of text within a dropdown widget. RectPadding dropdowntext; ///< Padding of drop down list item.
RectPadding dropdownlist; ///< Offsets used by a dropdown list itself. RectPadding dropdownlist; ///< Padding of complete drop down list.
RectPadding modalpopup; ///< Padding for a modal popup. RectPadding modalpopup; ///< Spacing for popup warning/information windows.
RectPadding picker; ///< Padding for a picker (dock, station, etc) window. RectPadding picker; ///< Padding for a picker (dock, station, etc) window.
RectPadding sparse; ///< Padding used for 'sparse' widget window, usually containing multiple frames. RectPadding sparse; ///< Padding used for 'sparse' widget window, usually containing multiple frames.
RectPadding sparse_resize; ///< Padding used for a resizeable 'sparse' widget window, usually containing multiple frames. RectPadding sparse_resize; ///< Padding used for a resizeable 'sparse' widget window, usually containing multiple frames.
int vsep_picker; ///< Vertical spacing of picker-window widgets. int vsep_picker; ///< Vertical spacing of picker-window widgets.
@ -77,144 +77,50 @@ private:
* These constants should not be used elsewhere, use scaled/unscaled WidgetDimensions instead. * These constants should not be used elsewhere, use scaled/unscaled WidgetDimensions instead.
*/ */
enum WidgetDrawDistances { enum WidgetDrawDistances {
/* WWT_IMGBTN(_2) */ WD_SHADEBOX_WIDTH = 12, ///< Minimum width of a standard shade box widget.
WD_IMGBTN_LEFT = 1, ///< Left offset of the image in the button. WD_STICKYBOX_WIDTH = 12, ///< Minimum width of a standard sticky box widget.
WD_IMGBTN_RIGHT = 2, ///< Right offset of the image in the button. WD_DEBUGBOX_WIDTH = 12, ///< Minimum width of a standard debug box widget.
WD_IMGBTN_TOP = 1, ///< Top offset of image in the button. WD_DEFSIZEBOX_WIDTH = 12, ///< Minimum width of a standard defsize box widget.
WD_IMGBTN_BOTTOM = 2, ///< Bottom offset of image in the button. WD_RESIZEBOX_WIDTH = 12, ///< Minimum width of a resize box widget.
WD_CLOSEBOX_WIDTH = 11, ///< Minimum width of a close box widget.
/* WWT_INSET */
WD_INSET_LEFT = 2, ///< Left offset of string. WD_CAPTION_HEIGHT = 14, ///< Minimum height of a title bar.
WD_INSET_RIGHT = 2, ///< Right offset of string. WD_DROPDOWN_HEIGHT = 12, ///< Minimum height of a drop down widget.
WD_INSET_TOP = 1, ///< Top offset of string.
WD_VSCROLLBAR_LEFT = 2, ///< Left offset of vertical scrollbar.
WD_VSCROLLBAR_RIGHT = 2, ///< Right offset of vertical scrollbar.
WD_VSCROLLBAR_TOP = 3, ///< Top offset of vertical scrollbar.
WD_VSCROLLBAR_BOTTOM = 3, ///< Bottom offset of vertical scrollbar.
WD_HSCROLLBAR_LEFT = 3, ///< Left offset of horizontal scrollbar.
WD_HSCROLLBAR_RIGHT = 3, ///< Right offset of horizontal scrollbar.
WD_HSCROLLBAR_TOP = 2, ///< Top offset of horizontal scrollbar.
WD_HSCROLLBAR_BOTTOM = 2, ///< Bottom offset of horizontal scrollbar.
/* Size of the pure frame bevel without any padding. */
WD_BEVEL_LEFT = 1, ///< Width of left bevel border.
WD_BEVEL_RIGHT = 1, ///< Width of right bevel border.
WD_BEVEL_TOP = 1, ///< Height of top bevel border.
WD_BEVEL_BOTTOM = 1, ///< Height of bottom bevel border.
/* FrameRect widgets, all text buttons, panel, editbox */
WD_FRAMERECT_LEFT = 2, ///< Offset at left to draw the frame rectangular area
WD_FRAMERECT_RIGHT = 2, ///< Offset at right to draw the frame rectangular area
WD_FRAMERECT_TOP = 1, ///< Offset at top to draw the frame rectangular area
WD_FRAMERECT_BOTTOM = 1, ///< Offset at bottom to draw the frame rectangular area
/* WWT_FRAME */
WD_FRAMETEXT_LEFT = 6, ///< Left offset of the text of the frame.
WD_FRAMETEXT_RIGHT = 6, ///< Right offset of the text of the frame.
WD_FRAMETEXT_TOP = 6, ///< Top offset of the text of the frame
WD_FRAMETEXT_BOTTOM = 6, ///< Bottom offset of the text of the frame
/* WWT_MATRIX */
WD_MATRIX_LEFT = 2, ///< Offset at left of a matrix cell.
WD_MATRIX_RIGHT = 2, ///< Offset at right of a matrix cell.
WD_MATRIX_TOP = 3, ///< Offset at top of a matrix cell.
WD_MATRIX_BOTTOM = 1, ///< Offset at bottom of a matrix cell.
/* WWT_SHADEBOX */
WD_SHADEBOX_WIDTH = 12, ///< Width of a standard shade box widget.
WD_SHADEBOX_LEFT = 2, ///< Left offset of shade sprite.
WD_SHADEBOX_RIGHT = 2, ///< Right offset of shade sprite.
WD_SHADEBOX_TOP = 3, ///< Top offset of shade sprite.
WD_SHADEBOX_BOTTOM = 3, ///< Bottom offset of shade sprite.
/* WWT_STICKYBOX */
WD_STICKYBOX_WIDTH = 12, ///< Width of a standard sticky box widget.
WD_STICKYBOX_LEFT = 2, ///< Left offset of sticky sprite.
WD_STICKYBOX_RIGHT = 2, ///< Right offset of sticky sprite.
WD_STICKYBOX_TOP = 3, ///< Top offset of sticky sprite.
WD_STICKYBOX_BOTTOM = 3, ///< Bottom offset of sticky sprite.
/* WWT_DEBUGBOX */
WD_DEBUGBOX_WIDTH = 12, ///< Width of a standard debug box widget.
WD_DEBUGBOX_LEFT = 2, ///< Left offset of debug sprite.
WD_DEBUGBOX_RIGHT = 2, ///< Right offset of debug sprite.
WD_DEBUGBOX_TOP = 3, ///< Top offset of debug sprite.
WD_DEBUGBOX_BOTTOM = 3, ///< Bottom offset of debug sprite.
/* WWT_DEFSIZEBOX */
WD_DEFSIZEBOX_WIDTH = 12, ///< Width of a standard defsize box widget.
WD_DEFSIZEBOX_LEFT = 2, ///< Left offset of defsize sprite.
WD_DEFSIZEBOX_RIGHT = 2, ///< Right offset of defsize sprite.
WD_DEFSIZEBOX_TOP = 3, ///< Top offset of defsize sprite.
WD_DEFSIZEBOX_BOTTOM = 3, ///< Bottom offset of defsize sprite.
/* WWT_RESIZEBOX */
WD_RESIZEBOX_WIDTH = 12, ///< Width of a resize box widget.
WD_RESIZEBOX_LEFT = 2, ///< Left offset of resize sprite.
WD_RESIZEBOX_RIGHT = 2, ///< Right offset of resize sprite.
WD_RESIZEBOX_TOP = 2, ///< Top offset of resize sprite.
WD_RESIZEBOX_BOTTOM = 2, ///< Bottom offset of resize sprite.
/* WWT_CLOSEBOX */
WD_CLOSEBOX_WIDTH = 11, ///< Width of a close box widget.
WD_CLOSEBOX_LEFT = 2, ///< Left offset of closebox string.
WD_CLOSEBOX_RIGHT = 1, ///< Right offset of closebox string.
WD_CLOSEBOX_TOP = 2, ///< Top offset of closebox string.
WD_CLOSEBOX_BOTTOM = 2, ///< Bottom offset of closebox string.
/* WWT_CAPTION */
WD_CAPTION_HEIGHT = 14, ///< Height of a title bar.
WD_CAPTIONTEXT_LEFT = 2, ///< Offset of the caption text at the left.
WD_CAPTIONTEXT_RIGHT = 2, ///< Offset of the caption text at the right.
WD_CAPTIONTEXT_TOP = 2, ///< Offset of the caption text at the top.
WD_CAPTIONTEXT_BOTTOM = 2, ///< Offset of the caption text at the bottom.
/* Dropdown widget. */
WD_DROPDOWN_HEIGHT = 12, ///< Height of a drop down widget.
WD_DROPDOWNTEXT_LEFT = 2, ///< Left offset of the dropdown widget string.
WD_DROPDOWNTEXT_RIGHT = 2, ///< Right offset of the dropdown widget string.
WD_DROPDOWNTEXT_TOP = 1, ///< Top offset of the dropdown widget string.
WD_DROPDOWNTEXT_BOTTOM = 1, ///< Bottom offset of the dropdown widget string.
WD_PAR_VSEP_NORMAL = 2, ///< Normal amount of vertical space between two paragraphs of text.
WD_PAR_VSEP_WIDE = 8, ///< Large amount of vertical space between two paragraphs of text.
}; };
friend NWidgetLeaf; friend NWidgetLeaf;
}; };
inline constexpr WidgetDimensions WidgetDimensions::unscaled = { inline constexpr WidgetDimensions WidgetDimensions::unscaled = {
{WD_IMGBTN_LEFT, WD_IMGBTN_TOP, WD_IMGBTN_RIGHT, WD_IMGBTN_BOTTOM}, ///< imgbtn .imgbtn = { .left = 1, .top = 1, .right = 1, .bottom = 1},
{WD_INSET_LEFT, WD_INSET_TOP, WD_INSET_RIGHT, WD_BEVEL_BOTTOM}, ///< inset .inset = { .left = 2, .top = 1, .right = 2, .bottom = 1},
{WD_VSCROLLBAR_LEFT, WD_VSCROLLBAR_TOP, WD_VSCROLLBAR_RIGHT, WD_VSCROLLBAR_BOTTOM}, ///< vscrollbar .vscrollbar = { .left = 2, .top = 3, .right = 2, .bottom = 3},
{WD_HSCROLLBAR_LEFT, WD_HSCROLLBAR_TOP, WD_HSCROLLBAR_RIGHT, WD_HSCROLLBAR_BOTTOM}, ///< hscrollbar .hscrollbar = { .left = 3, .top = 2, .right = 3, .bottom = 2},
{WD_BEVEL_LEFT, WD_BEVEL_TOP, WD_BEVEL_RIGHT, WD_BEVEL_BOTTOM}, ///< bevel .bevel = { .left = 1, .top = 1, .right = 1, .bottom = 1},
{WD_BEVEL_LEFT, WD_BEVEL_TOP, WD_BEVEL_RIGHT, WD_BEVEL_BOTTOM}, ///< fullbevel .fullbevel = { .left = 1, .top = 1, .right = 1, .bottom = 1},
{WD_FRAMERECT_LEFT, WD_FRAMERECT_TOP, WD_FRAMERECT_RIGHT, WD_FRAMERECT_BOTTOM}, ///< framerect .framerect = { .left = 2, .top = 1, .right = 2, .bottom = 1},
{WD_FRAMETEXT_LEFT, WD_FRAMETEXT_TOP, WD_FRAMETEXT_RIGHT, WD_FRAMETEXT_BOTTOM}, ///< frametext .frametext = { .left = 6, .top = 6, .right = 6, .bottom = 6},
{WD_MATRIX_LEFT, WD_MATRIX_TOP, WD_MATRIX_RIGHT, WD_MATRIX_BOTTOM}, ///< matrix .matrix = { .left = 2, .top = 3, .right = 2, .bottom = 1},
{WD_SHADEBOX_LEFT, WD_SHADEBOX_TOP, WD_SHADEBOX_RIGHT, WD_SHADEBOX_BOTTOM}, ///< shadebox .shadebox = { .left = 2, .top = 3, .right = 2, .bottom = 3},
{WD_STICKYBOX_LEFT, WD_STICKYBOX_TOP, WD_STICKYBOX_RIGHT, WD_STICKYBOX_BOTTOM}, ///< stickybox .stickybox = { .left = 2, .top = 3, .right = 2, .bottom = 3},
{WD_DEBUGBOX_LEFT, WD_DEBUGBOX_TOP, WD_DEBUGBOX_RIGHT, WD_DEBUGBOX_BOTTOM}, ///< debugbox .debugbox = { .left = 2, .top = 3, .right = 2, .bottom = 3},
{WD_DEFSIZEBOX_LEFT, WD_DEFSIZEBOX_TOP, WD_DEFSIZEBOX_RIGHT, WD_DEFSIZEBOX_BOTTOM}, ///< defsizebox .defsizebox = { .left = 2, .top = 3, .right = 2, .bottom = 3},
{WD_RESIZEBOX_LEFT, WD_RESIZEBOX_TOP, WD_RESIZEBOX_RIGHT, WD_RESIZEBOX_BOTTOM}, ///< resizebox .resizebox = { .left = 2, .top = 2, .right = 2, .bottom = 2},
{WD_CLOSEBOX_LEFT, WD_CLOSEBOX_TOP, WD_CLOSEBOX_RIGHT, WD_CLOSEBOX_BOTTOM}, ///< closebox .closebox = { .left = 2, .top = 2, .right = 1, .bottom = 2},
{WD_CAPTIONTEXT_LEFT, WD_CAPTIONTEXT_TOP, WD_CAPTIONTEXT_RIGHT, WD_CAPTIONTEXT_BOTTOM}, ///< captiontext .captiontext = { .left = 2, .top = 2, .right = 2, .bottom = 2},
{WD_DROPDOWNTEXT_LEFT, WD_DROPDOWNTEXT_TOP, WD_DROPDOWNTEXT_RIGHT, WD_DROPDOWNTEXT_BOTTOM}, ///< dropdowntext .dropdowntext = { .left = 2, .top = 1, .right = 2, .bottom = 1},
{WD_BEVEL_LEFT, WD_BEVEL_TOP * 2, WD_BEVEL_RIGHT, WD_BEVEL_BOTTOM * 2}, ///< dropdownmenu .dropdownlist = { .left = 1, .top = 2, .right = 1, .bottom = 2},
{20, 10, 20, 10}, ///< modalpopup .modalpopup = { .left = 20, .top = 10, .right = 20, .bottom = 10},
{3, 3, 3, 3}, ///< picker .picker = { .left = 3, .top = 3, .right = 3, .bottom = 3},
{10, 8, 10, 8}, ///< sparse window padding .sparse = { .left = 10, .top = 8, .right = 10, .bottom = 8},
{10, 8, 10, 1}, ///< resizable sparse window padding .sparse_resize = { .left = 10, .top = 8, .right = 10, .bottom = 0},
1, ///< vsep_picker .vsep_picker = 1,
WD_PAR_VSEP_NORMAL, ///< vsep_normal .vsep_normal = 2,
4, ///< vsep_sparse .vsep_sparse = 4,
WD_PAR_VSEP_WIDE, ///< vsep_wide .vsep_wide = 8,
2, ///< hsep_normal .hsep_normal = 2,
6, ///< hsep_wide .hsep_wide = 6,
10, ///< hsep_indent .hsep_indent = 10,
}; };
/* widget.cpp */ /* widget.cpp */

Loading…
Cancel
Save