mirror of https://github.com/OpenTTD/OpenTTD
Compare commits
10 Commits
0165432e5d
...
7565aa99b0
Author | SHA1 | Date |
---|---|---|
|
7565aa99b0 | |
|
1d21edde8d | |
|
5e984eec1a | |
|
a48f491f09 | |
|
3ef5783bf9 | |
|
7f6b5d3103 | |
|
5a1a8adb3f | |
|
1000875f88 | |
|
1f5ae37e2c | |
|
3be979cc05 |
35
src/bridge.h
35
src/bridge.h
|
@ -37,6 +37,30 @@ constexpr uint SPRITES_PER_BRIDGE_PIECE = 32; ///< Number of sprites there are p
|
|||
|
||||
typedef uint BridgeType; ///< Bridge spec number.
|
||||
|
||||
/**
|
||||
* Actions that can be performed when the vehicle enters the depot.
|
||||
*/
|
||||
enum class BridgePiecePillarFlag : uint8_t {
|
||||
BPPF_CORNER_W = 1 << 0,
|
||||
BPPF_CORNER_S = 1 << 1,
|
||||
BPPF_CORNER_E = 1 << 2,
|
||||
BPPF_CORNER_N = 1 << 3,
|
||||
BPPF_ALL_CORNERS = 0xF,
|
||||
BPPF_EDGE_NE = 1 << 4,
|
||||
BPPF_EDGE_SE = 1 << 5,
|
||||
BPPF_EDGE_SW = 1 << 6,
|
||||
BPPF_EDGE_NW = 1 << 7,
|
||||
};
|
||||
using BridgePiecePillarFlags = EnumBitSet<BridgePiecePillarFlag, uint8_t>;
|
||||
|
||||
enum class BridgeSpecCtrlFlag : uint8_t{
|
||||
BSCF_CUSTOM_PILLAR_FLAGS,
|
||||
BSCF_INVALID_PILLAR_FLAGS,
|
||||
BSCF_NOT_AVAILABLE_TOWN,
|
||||
BSCF_NOT_AVAILABLE_AI_GS,
|
||||
};
|
||||
using BridgeSpecCtrlFlags = EnumBitSet<BridgeSpecCtrlFlag, uint8_t>;
|
||||
|
||||
/**
|
||||
* Struct containing information about a single bridge type
|
||||
*/
|
||||
|
@ -52,6 +76,8 @@ struct BridgeSpec {
|
|||
StringID transport_name[2]; ///< description of the bridge, when built for road or rail
|
||||
std::vector<std::vector<PalSpriteID>> sprite_table; ///< table of sprites for drawing the bridge
|
||||
uint8_t flags; ///< bit 0 set: disable drawing of far pillars.
|
||||
BridgeSpecCtrlFlags ctrl_flags; ///< control flags
|
||||
std::array<BridgePiecePillarFlags, 12> pillar_flags; ///< bridge pillar flags: 6 x pairs of x and y flags
|
||||
};
|
||||
|
||||
extern BridgeSpec _bridge[MAX_BRIDGES];
|
||||
|
@ -75,6 +101,15 @@ void DrawBridgeMiddle(const TileInfo *ti);
|
|||
CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoCommandFlags flags = {});
|
||||
int CalcBridgeLenCostFactor(int x);
|
||||
|
||||
BridgePiecePillarFlags GetBridgeTilePillarFlags(TileIndex tile, TileIndex northern_bridge_end, TileIndex southern_bridge_end, BridgeType bridge_type, TransportType bridge_transport_type);
|
||||
|
||||
struct BridgePieceDebugInfo {
|
||||
BridgePieces piece;
|
||||
BridgePiecePillarFlags pillar_flags;
|
||||
uint pillar_index;
|
||||
};
|
||||
BridgePieceDebugInfo GetBridgePieceDebugInfo(TileIndex tile);
|
||||
|
||||
void ResetBridges();
|
||||
|
||||
#endif /* BRIDGE_H */
|
||||
|
|
|
@ -382,6 +382,8 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
|
|||
StringID errmsg = INVALID_STRING_ID;
|
||||
CommandCost ret = Command<CMD_BUILD_BRIDGE>::Do(CommandFlagsToDCFlags(GetCommandFlags<CMD_BUILD_BRIDGE>()) | DoCommandFlag::QueryCost, end, start, transport_type, 0, road_rail_type);
|
||||
|
||||
const bool query_per_bridge_type = ret.Failed() && (ret.GetErrorMessage() == STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION || ret.GetErrorMessage() == STR_ERROR_BRIDGE_PILLARS_OBSTRUCT_STATION);
|
||||
|
||||
GUIBridgeList bl;
|
||||
if (ret.Failed()) {
|
||||
errmsg = ret.GetErrorMessage();
|
||||
|
@ -415,11 +417,13 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
|
|||
}
|
||||
|
||||
bool any_available = false;
|
||||
StringID type_errmsg = INVALID_STRING_ID;
|
||||
CommandCost type_check;
|
||||
/* loop for all bridgetypes */
|
||||
for (BridgeType brd_type = 0; brd_type != MAX_BRIDGES; brd_type++) {
|
||||
type_check = CheckBridgeAvailability(brd_type, bridge_len);
|
||||
if (type_check.Succeeded()) {
|
||||
if (query_per_bridge_type && Command<CMD_BUILD_BRIDGE>::Do(CommandFlagsToDCFlags(GetCommandFlags<CMD_BUILD_BRIDGE>()) | DoCommandFlag::QueryCost, end, start, transport_type, brd_type, road_rail_type).Failed()) continue;
|
||||
/* bridge is accepted, add to list */
|
||||
BuildBridgeData &item = bl.emplace_back();
|
||||
item.index = brd_type;
|
||||
|
@ -428,10 +432,12 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
|
|||
* bridge itself (not computed with DoCommandFlag::QueryCost) */
|
||||
item.cost = ret.GetCost() + (((int64_t)tot_bridgedata_len * _price[PR_BUILD_BRIDGE] * item.spec->price) >> 8) + infra_cost;
|
||||
any_available = true;
|
||||
} else if (type_check.GetErrorMessage() != INVALID_STRING_ID && !query_per_bridge_type) {
|
||||
type_errmsg = type_check.GetErrorMessage();
|
||||
}
|
||||
}
|
||||
/* give error cause if no bridges available here*/
|
||||
if (!any_available)
|
||||
if (!any_available && type_errmsg != INVALID_STRING_ID) errmsg = type_errmsg;
|
||||
{
|
||||
errmsg = type_check.GetErrorMessage();
|
||||
}
|
||||
|
|
|
@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Não mos
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Mostrar/Ocultar gráfico para este tipo de carga
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Histórico da Produção
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produzido
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportado
|
||||
|
||||
|
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produç
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produção no último minuto:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportado)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centralizar visualização principal na localização da indústria. Ctrl+Clique para abrir uma nova visualização na localização da indústria
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gráfico de Produção
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Mostrar gráfico do histórico de produção da indústria
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nível de produção: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A indústria anunciou fechamento iminente!
|
||||
|
||||
|
|
|
@ -628,7 +628,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Скри
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Активирай/деактивирай графиката за видовете товар
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - История на производството
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Покажи подробен рейтинг на представянето
|
||||
|
||||
|
@ -3967,8 +3966,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Прои
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Произведено последната минута:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% превозено)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Центриране камерата върху индустрията. Ctrl+Click отваря прозорец с нов изглед към индустрията
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Производствена графика
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Показва графиката на производствената история на индустрията
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ниво на производство: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Индустрията обяви незабавна ликвидация!
|
||||
|
||||
|
|
|
@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}No mostr
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Mostra/amaga el tipus de càrrega al gràfic
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historial de producció
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produït
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportat
|
||||
|
||||
|
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producci
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Producció durant l'últim minut:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}{NBSP}% transportat)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centra la vista principal al lloc de la indústria. Amb Ctrl+clic, s'obre una vista nova centrada al lloc on és la indústria.
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gràfic de producció
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Mostra el gràfic de l'evolució de la producció de la indústria.
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivell de producció: {YELLOW}{COMMA}{NBSP}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}La indústria ha anunciat la seva clausura imminent!
|
||||
|
||||
|
|
|
@ -720,7 +720,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Skryje v
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Zobrazit nebo skrýt graf pro určitý druh nákladu
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historie produkce
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Vyprodukováno
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Přepraveno
|
||||
|
||||
|
@ -4069,8 +4068,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produkce
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produkce v minulé minutě:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% přepraveno)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Vystředit pohled na průmysl. Ctrl+Klik otevře nový pohled na umístění průmyslu
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Graf výroby
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Zobrazí graf historie produkce průmyslu
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produkce: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Průmysl oznámila blížící se uzavření!
|
||||
|
||||
|
|
|
@ -633,7 +633,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Vis inte
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Skift grafen for denne lasttype til/fra
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Produktionshistorie
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produceret
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transporteret
|
||||
|
||||
|
@ -4013,8 +4012,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produkti
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produktion sidste minut:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transporteret)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrer skærmen over industriens lokalitet. Ctrl+Klik åbner et nyt vindue ved industriens lokalitet.
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Produktionsgraf
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Viser grafen over industriens produktionshistorie
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktions niveauet: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrien har rapporteret øjeblikkelig nedlukning!
|
||||
|
||||
|
|
|
@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Geen vra
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Grafiek voor dit vrachttype weergeven-verbergen
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Productiegeschiedenis
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Geproduceerd
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Vervoerd
|
||||
|
||||
|
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producti
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Productie vorige minuut:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% vervoerd)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centreer het hoofdscherm op de locatie van de industrie. Ctrl+klik opent een nieuws venster op de locatie van de industrie
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Productiegrafiek
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Geeft de grafiek weer van de productiegeschiedenis van de industrie
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Productieniveau: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}De industrie heeft een dreigende sluiting aangekondigd!
|
||||
|
||||
|
|
|
@ -5244,6 +5244,8 @@ STR_ERROR_START_AND_END_MUST_BE_IN :{WHITE}Start an
|
|||
STR_ERROR_ENDS_OF_BRIDGE_MUST_BOTH :{WHITE}... ends of bridge must both be on land
|
||||
STR_ERROR_BRIDGE_TOO_LONG :{WHITE}... bridge too long
|
||||
STR_ERROR_BRIDGE_THROUGH_MAP_BORDER :{WHITE}Bridge would end out of the map
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION :{WHITE}Bridge is too low for station
|
||||
STR_ERROR_BRIDGE_PILLARS_OBSTRUCT_STATION :{WHITE}Bridge pillars obstruct station
|
||||
|
||||
# Tunnel related errors
|
||||
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :{WHITE}Can't build tunnel here...
|
||||
|
|
|
@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Display
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Toggle graph of this cargo type
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Production History
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produced
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transported
|
||||
|
||||
|
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producti
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Production last minute:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transported)
|
||||
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_GRAPH :{BLACK}Production Graph
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Shows the graph of industry production history
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure!
|
||||
|
||||
|
|
|
@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Display
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Toggle graph of this cargo type
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Production History
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produced
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transported
|
||||
|
||||
|
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producti
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Production last minute:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transported)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Center the main view on industry location. Ctrl+Click to open a new viewport on industry location
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Production Graph
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Shows the graph of industry production history
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure!
|
||||
|
||||
|
@ -5001,6 +4998,7 @@ STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}Flat lan
|
|||
STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Land sloped in wrong direction
|
||||
STR_ERROR_CAN_T_DO_THIS :{WHITE}Can't do this...
|
||||
STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Building must be demolished first
|
||||
STR_ERROR_BUILDING_IS_PROTECTED :{WHITE}... building is protected
|
||||
STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Can't clear this area...
|
||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}... site unsuitable
|
||||
STR_ERROR_ALREADY_BUILT :{WHITE}... already built
|
||||
|
|
|
@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Älä n
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Valitse, näytetäänkö tämän rahdin kuvaaja
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} – Tuotantohistoria
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Tuotettu
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Kuljetettu
|
||||
|
||||
|
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Tuotanto
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Tuotanto viime minuutissa:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}{NBSP}% kuljetettu)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Keskitä päänäkymä tuotantolaitoksen sijaintiin. Ctrl+napsautus avataksesi uuden näkymäikkunan laitoksen sijaintiin
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Tuotannon kuvaaja
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Näyttää tuotantohistorian kuvaajana
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Tuotantotaso: {YELLOW}{COMMA}{NBSP}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Teollisuuslaitos ilmoittaa välittömästä lakkautuksesta!
|
||||
|
||||
|
|
|
@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}N'affich
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Afficher/Cacher le type de marchandise
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historique de production
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produit
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transporté
|
||||
|
||||
|
@ -4002,8 +4001,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producti
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Production la minute précédente{NBSP}:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}{NBSP}% transporté{P "" s})
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrer la vue sur l'industrie. Ctrl-clic pour ouvrir une nouvelle vue sur l'industrie.
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Graphe de production
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Affiche le graphe de l'historique de la production des industries
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Niveau de production{NBSP}: {YELLOW}{COMMA}{NBSP}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}L'industrie a annoncé sa fermeture imminente{NBSP}!
|
||||
|
||||
|
|
|
@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Non amos
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Amosar/ocultar gráfica para o tipo de carga
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historial de produción
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Producido
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportado
|
||||
|
||||
|
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produci
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Producción no último minuto:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportado)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar a vista principal na localización da industria. Ctrl+Clic abre unha nova fiestra na localización da industria
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gráfico de produción
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Amosa o gráfico co histórico de produción industrial
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de produción: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A industria anunció un peche inminente
|
||||
|
||||
|
|
|
@ -627,7 +627,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Zeige ke
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Diagramm für diesen Frachttyp ein/aus
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Produktionshistorie
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Zeige detailierte Leistungsaufschlüsselung
|
||||
|
||||
|
@ -3958,8 +3957,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produkti
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produktion in der letzten Minute:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% befördert)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Hauptansicht auf den Industriestandort zentrieren. Mit Strg+Klick wird eine neue Zusatzansicht auf den Industriestandort geöffnet
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Produktionsgraph
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Zeigt den Graphen der Produktionshistorie der Industrie an
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktionsrate: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Diese Industrie wird in Kürze schließen!
|
||||
|
||||
|
|
|
@ -727,7 +727,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Εμφά
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Εναλλαγή γραφήματος αυτού του τύπου φορτίου
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Ιστορικό Παραγωγής
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Παράχθηκε/αν
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Μεταφέρθηκε/αν
|
||||
|
||||
|
@ -4118,8 +4117,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Παρα
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Παραγωγή τελευταίου λεπτού:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% μεταφέρθηκαν)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Κεντράρισμα εικόνας στην περιοχή της βιομηχανίας. Ctrl+Κλικ για άνοιγμα νέου παραθύρου προβολής στην περιοχή της βιομηχανίας
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Γράφημα Παραγωγής
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Εμφανίζει το γράφημα ιστορικού παραγωγής της βιομηχανίας
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Επίπεδο παραγωγής: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Η βιομηχανία έχει ανακοινώσει άμεσο κλείσιμο!
|
||||
|
||||
|
|
|
@ -697,7 +697,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Ne mutas
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Adott rakomány grafikonjának mutatása be/ki
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Termelési előzmények
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Előállított
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Szállítva
|
||||
|
||||
|
@ -4088,8 +4087,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Múlt ha
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Termelés az elmúlt percben:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% elszállítva)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}A fő nézetet a gazdasági épületre állítja. Ctrl+kattintással új nézet nyílik a gazdasági épület helyzeténél
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Termelési grafikon
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Megjeleníti az ipar termelési történetének grafikonját
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Termelési szint: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A gyár bejelentette a közelgő bezárását!
|
||||
|
||||
|
|
|
@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}화물
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}이 화물의 그래프를 표시하거나 숨깁니다
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - 생산량 이력
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :생산량
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :수송량
|
||||
|
||||
|
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}지난
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}지난 1분간 생산량:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% 수송됨)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}이 산업시설로 이동합니다. CTRL+클릭하면 이 산업시설을 기준으로 새로운 외부 화면을 엽니다
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}생산량 그래프
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}산업시설 생산량 이력 그래프를 보여줍니다
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}생산 수준: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}산업시설이 곧 폐쇄됩니다!
|
||||
|
||||
|
|
|
@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Nerādī
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Paslēgt kravas veida diagrammu
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Ražošanas Vēsture
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Saražots
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Pārvadāts
|
||||
|
||||
|
@ -4021,8 +4020,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Iepriek
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Ražošanas pēdējā minūtē:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} (pārvadāti {COMMA}%)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrēt galveno skatu uz ražotni. Ctrl+klikšķis atvērs skatu uz ražotni jaunā skatlaukā
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Ražošanas Grafiks
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Parāda nozares ražošanas vēstures grafiku
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ražošanas līmenis: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Nozare ir paziņojusi par nenovēršamu slēgšanu!
|
||||
|
||||
|
|
|
@ -633,7 +633,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Keng Wue
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Schalt d'Grafik fir de Wuerentyp em
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Produktiounshistorie
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produzéiert
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportéiert
|
||||
|
||||
|
@ -3994,8 +3993,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produkti
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produktioun déi läscht Minutt:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportéiert)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Zentréiert d'Siicht op d'Industrie. Ctrl+Klick erstellt eng nei Usiicht op d'Industrie
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Produktiounsgrafik
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Weist d'Grafik vun der Industrieproduktiounshistorie un
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktiounslevel: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}D'Industrie annoncéiert dass se zougemaach gëtt
|
||||
|
||||
|
|
|
@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Skjul al
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Vis/skjul graf for en bestemt varetype
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Produksjonshistorikk
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produsert
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportert
|
||||
|
||||
|
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produksj
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produksjon forrige minutt:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}{NBSP}% transportert)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Sentrer hovedvisningen på industrilokasjon. Ctrl+klikk for å åpne et nytt tilleggsvindu på industrilokasjon
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Graf over produksjon
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Viser grafen for industriell produksjonshistorikk
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produksjonsnivå: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Næringen har annonsert snarlig nedleggelse!
|
||||
|
||||
|
|
|
@ -1013,7 +1013,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Ukryj ws
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Przełącz ukrywanie/wyświetlanie wykresu danego typu ładunku
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historia Produkcji
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Wyprodukowano
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Przetransportowano
|
||||
|
||||
|
@ -4404,8 +4403,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Wyproduk
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Wyprodukowano w poprzedniej minucie:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% przetransportowano)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Wyśrodkuj widok główny na lokalizacji przedsiębiorstwa. Użyj Ctrl, aby otworzyć nowy podgląd na jego lokalizację
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Wykres Produkcji
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Wyświetl wykres historii produkcji tego przedsiębiorstwa
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Poziom produkcji: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Przedsiębiorstwo ogłosiło likwidację!
|
||||
|
||||
|
|
|
@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Não mos
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Alternar o gráfico para este tipo de carga
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Histórico da Produção
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produzido
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportado
|
||||
|
||||
|
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produç
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produção no último minuto:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportado)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização da indústria. Ctrl+Clique para abrir um novo visualizador na localização da indústria
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gráfico de Produção
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Mostrar gráfico do histórico de produção da indústria
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nível de produção: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A indústria anunciou encerramento iminente!
|
||||
|
||||
|
|
|
@ -3976,8 +3976,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producț
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Producție în ultimul minut:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportat)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrează imaginea pe locația industriei. Ctrl+Click pentru a deshide o fereastra cu locația industriei
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Grafic de producție
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Arată graficul de producție istoric al industriei
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivelul producției: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industria a anunțat închiderea iminentă!
|
||||
|
||||
|
|
|
@ -772,7 +772,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Скры
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Включить/отключить отображение груза на графике
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}График производительности: {INDUSTRY}
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Произведено
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Перевезено
|
||||
|
||||
|
@ -4199,8 +4198,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Прои
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Произведено за минуту:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% перевезено)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Показать предприятие в основном окне. Ctrl+щелчок{NBSP}- показать в дополнительном окне.
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}График производительности
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Показать график производительности этого предприятия
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Производительность: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Предприятие скоро закрывается!
|
||||
|
||||
|
|
|
@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}在货
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}切换显示货物
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - 产量历史
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :已生产
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :已运输
|
||||
|
||||
|
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}上月
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}上分钟产量:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK}(已运输 {COMMA}%)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}将屏幕中心移动到当前工业的位置。按住 <Ctrl> 键点选会在新视点中显示工业位置
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}产量图表
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}显示工业产量历史图表
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}生产等级:{YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}此工业已经宣布即刻停业倒闭!
|
||||
|
||||
|
|
|
@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Oculta t
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Alterna entre mostrar/ocultar la gráfica para este tipo de carga
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historial de Producción
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Producido
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportado
|
||||
|
||||
|
@ -4011,8 +4010,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producci
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Producción el minuto anterior:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportado)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centra la vista principal sobre la industria. Ctrl+clic abre un punto de vista en dicha posición
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gráfico de Producción
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Muestra el gráfico del historial de producción de la industria
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de producción: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}La industria ha anunciado su cierre inminente!
|
||||
|
||||
|
|
|
@ -635,7 +635,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Ocultar
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Mostrar u ocultar gráfica de este tipo de carga
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Historial de producción
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Producido
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportado
|
||||
|
||||
|
@ -4025,8 +4024,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Producci
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Producción último minuto:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transportad{G 0 o a o a}{P 0 "" s})
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar vista en la industria. Ctrl+Clic abre una vista aparte en su ubicación
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Gráfica de producción
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Mostrar la gráfica histórica de producción de la industria
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de producción: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}¡La industria ha anunciado su cierre inminente!
|
||||
|
||||
|
|
|
@ -633,7 +633,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Visa ing
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Slå på/av denna godstyps graf
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Produktionshistorik
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Producerat
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transporterat
|
||||
|
||||
|
@ -4001,8 +4000,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Produkti
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Produktion förra minuten:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% transporterat)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrera huvudvyn ovanför industrin. Ctrl+Klick för att öppna en ny fönstervy industrins läge
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Produktionsgraf
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Visar en graf över den historiska industriproduktionen
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Produktionsnivå: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industrin har annonserat att den snart kommer att stänga!
|
||||
|
||||
|
|
|
@ -634,7 +634,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}於貨
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}切換該貨物類型圖示
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - 產量歷史
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :已產出
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :已運送
|
||||
|
||||
|
@ -4024,8 +4023,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}上月
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}上分鐘產量︰
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} (運送了 {COMMA}%)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}將工業置於畫面正中央。按住 <Ctrl> 點選可於工業位置開啟新檢視視窗
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}產量圖表
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}顯示工業產量歷史圖表
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}產出等級:{YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}該工業已宣佈關閉!
|
||||
|
||||
|
|
|
@ -770,7 +770,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Не п
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Ввімк/вимик графік типів вантажу
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Історія виробництва
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Вироблено
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Перевезено
|
||||
|
||||
|
@ -4150,8 +4149,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Виро
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Вироблено за минулу хвилину:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% перевезено)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Показати підприємство у центрі екрану. Ctrl+клац мишею відкриє нове вікно з видом на підприємство
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Графік продуктивності
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Відобразити графік продуктивності підприємства
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Обсяг виробництва: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Підприємство оголосило про близьке закриття!
|
||||
|
||||
|
|
|
@ -627,7 +627,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Không h
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Bật/tắt đồ thị cho hàng hóa này
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Lịch Sử Sản Xuất
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Đã cung cấp
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Đã vận chuyển
|
||||
|
||||
|
@ -3976,8 +3975,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Sản l
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Sản lượng phút trước:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% đã vận chuyển)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Xem vị trí trung tâm của nhà máy. Ctrl+Click mở cửa sổ mới để xem
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Biểu Đồ Sản Xuất
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Hiển thị biểu đồ lịch sử sản xuất của nhà máy
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Mức sản lượng: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Nhà máy này đã thông báo sắp đóng cửa!
|
||||
|
||||
|
|
|
@ -633,7 +633,6 @@ STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Peidio a
|
|||
STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Toglu'r graff ar gyfer y math llwyth yma
|
||||
STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
|
||||
|
||||
STR_GRAPH_INDUSTRY_PRODUCTION_CAPTION :{WHITE}{INDUSTRY} - Hanes Cynhyrchu
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Cynhyrchwyd
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Cludwyd
|
||||
|
||||
|
@ -3994,8 +3993,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Cynnyrch
|
|||
STR_INDUSTRY_VIEW_PRODUCTION_LAST_MINUTE_TITLE :{BLACK}Cynnyrch y munud olaf:
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% wedi'i gludo)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Canoli'r brif olygfa ar y diwydiant. Ctrl+Clic i agor ffenest golwg newydd ar leoliad y diwydiant
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH :{BLACK}Graff Cynhyrchiant
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_GRAPH_TOOLTIP :{BLACK}Dangos graff o hanes cynhyrchu diwydiant
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Lefel cynhyrchu: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Mae'r diwydiant wedi datgan ei fod ar fin cau!
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#ifndef NEWGRF_ROADSTATION_H
|
||||
#define NEWGRF_ROADSTATION_H
|
||||
|
||||
#include "bridge.h"
|
||||
#include "newgrf_animation_type.h"
|
||||
#include "newgrf_spritegroup.h"
|
||||
#include "newgrf_badge_type.h"
|
||||
|
@ -71,6 +72,12 @@ enum class RoadStopSpecFlag : uint8_t {
|
|||
};
|
||||
using RoadStopSpecFlags = EnumBitSet<RoadStopSpecFlag, uint8_t>;
|
||||
|
||||
enum class RoadStopSpecIntlFlag : uint8_t {
|
||||
BridgeHeightsSet, ///< bridge_height[6] is set.
|
||||
BridgeDisallowedPillarsSet, ///< bridge_disallowed_pillars[6] is set.
|
||||
};
|
||||
using RoadStopSpecIntlFlags = EnumBitSet<RoadStopSpecIntlFlag, uint8_t>;
|
||||
|
||||
enum RoadStopView : uint8_t {
|
||||
RSV_BAY_NE = 0, ///< Bay road stop, facing Northeast
|
||||
RSV_BAY_SE = 1, ///< Bay road stop, facing Southeast
|
||||
|
@ -133,17 +140,20 @@ struct RoadStopSpec : NewGRFSpecBase<RoadStopClassID> {
|
|||
RoadStopDrawModes draw_mode = {RoadStopDrawMode::Road, RoadStopDrawMode::Overlay};
|
||||
RoadStopCallbackMasks callback_mask{};
|
||||
RoadStopSpecFlags flags{};
|
||||
RoadStopSpecIntlFlags internal_flags{};
|
||||
|
||||
CargoTypes cargo_triggers = 0; ///< Bitmask of cargo types which cause trigger re-randomizing
|
||||
|
||||
AnimationInfo<StationAnimationTriggers> animation;
|
||||
|
||||
uint8_t bridge_height[6]; ///< Minimum height for a bridge above, 0 for none
|
||||
uint8_t bridge_disallowed_pillars[6]; ///< Disallowed pillar flags for a bridge above
|
||||
BridgePiecePillarFlags bridge_disallowed_pillars[6]; ///< Disallowed pillar flags for a bridge above
|
||||
|
||||
uint8_t build_cost_multiplier = 16; ///< Build cost multiplier per tile.
|
||||
uint8_t clear_cost_multiplier = 16; ///< Clear cost multiplier per tile.
|
||||
|
||||
uint8_t height; ///< The height of this structure, in heightlevels; max MAX_TILE_HEIGHT.
|
||||
|
||||
std::vector<BadgeID> badges;
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#ifndef NEWGRF_STATION_H
|
||||
#define NEWGRF_STATION_H
|
||||
|
||||
#include "bridge.h"
|
||||
#include "core/enum_type.hpp"
|
||||
#include "newgrf_animation_type.h"
|
||||
#include "newgrf_badge_type.h"
|
||||
|
@ -118,6 +119,12 @@ enum class StationSpecFlag : uint8_t {
|
|||
};
|
||||
using StationSpecFlags = EnumBitSet<StationSpecFlag, uint8_t>;
|
||||
|
||||
enum class StationSpecIntlFlag : uint8_t {
|
||||
BridgeHeightsSet, ///< bridge_height[8] is set.
|
||||
BridgeDisallowedPillarsSet, ///< bridge_disallowed_pillars[8] is set.
|
||||
};
|
||||
using StationSpecIntlFlags = EnumBitSet<StationSpecIntlFlag, uint8_t>;
|
||||
|
||||
/** Station specification. */
|
||||
struct StationSpec : NewGRFSpecBase<StationClassID> {
|
||||
StationSpec() : name(0),
|
||||
|
@ -162,6 +169,12 @@ struct StationSpec : NewGRFSpecBase<StationClassID> {
|
|||
|
||||
StationSpecFlags flags; ///< Bitmask of flags, bit 0: use different sprite set; bit 1: divide cargo about by station size
|
||||
|
||||
struct BridgeAboveFlags {
|
||||
uint8_t height = UINT8_MAX; ///< Minimum height for a bridge above, 0 for none
|
||||
BridgePiecePillarFlags disallowed_pillars = {}; ///< Disallowed pillar flags for a bridge above
|
||||
};
|
||||
std::vector<BridgeAboveFlags> bridge_above_flags; ///< List of bridge above flags.
|
||||
|
||||
enum class TileFlag : uint8_t {
|
||||
Pylons = 0, ///< Tile should contain catenary pylons.
|
||||
NoWires = 1, ///< Tile should NOT contain catenary wires.
|
||||
|
@ -172,10 +185,18 @@ struct StationSpec : NewGRFSpecBase<StationClassID> {
|
|||
|
||||
AnimationInfo<StationAnimationTriggers> animation;
|
||||
|
||||
StationSpecIntlFlags internal_flags{}; ///< Bitmask of internal spec flags
|
||||
|
||||
/** Custom platform layouts, keyed by platform and length combined. */
|
||||
std::unordered_map<uint16_t, std::vector<uint8_t>> layouts;
|
||||
|
||||
std::vector<BadgeID> badges;
|
||||
|
||||
BridgeAboveFlags GetBridgeAboveFlags(uint gfx) const
|
||||
{
|
||||
if (gfx < this->bridge_above_flags.size()) return this->bridge_above_flags[gfx];
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
/** Class containing information relating to station classes. */
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
/** @file station_cmd.cpp Handling of station tiles. */
|
||||
|
||||
#include "core/enum_type.hpp"
|
||||
#include "stdafx.h"
|
||||
#include "core/flatset_type.hpp"
|
||||
#include "aircraft.h"
|
||||
|
@ -949,125 +950,6 @@ static CommandCost CheckFlatLandRailStation(TileIndex tile_cur, TileIndex north_
|
|||
return cost;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a road stop can be built at the given tile.
|
||||
* @param cur_tile Tile to check.
|
||||
* @param allowed_z Height allowed for the tile. If allowed_z is negative, it will be set to the height of this tile.
|
||||
* @param flags Operation to perform.
|
||||
* @param invalid_dirs Prohibited directions (set of DiagDirections).
|
||||
* @param is_drive_through True if trying to build a drive-through station.
|
||||
* @param station_type Station type (bus, truck or road waypoint).
|
||||
* @param axis Axis of a drive-through road stop.
|
||||
* @param station StationID to be queried and returned if available.
|
||||
* @param rt Road type to build, may be INVALID_ROADTYPE if an existing road is required.
|
||||
* @return The cost in case of success, or an error code if it failed.
|
||||
*/
|
||||
static CommandCost CheckFlatLandRoadStop(TileIndex cur_tile, int &allowed_z, DoCommandFlags flags, DiagDirections invalid_dirs, bool is_drive_through, StationType station_type, Axis axis, StationID *station, RoadType rt)
|
||||
{
|
||||
CommandCost cost(EXPENSES_CONSTRUCTION);
|
||||
|
||||
CommandCost ret = CheckBuildableTile(cur_tile, invalid_dirs, allowed_z, !is_drive_through);
|
||||
if (ret.Failed()) return ret;
|
||||
cost.AddCost(ret.GetCost());
|
||||
|
||||
/* If station is set, then we have special handling to allow building on top of already existing stations.
|
||||
* Station points to StationID::Invalid() if we can build on any station.
|
||||
* Or it points to a station if we're only allowed to build on exactly that station. */
|
||||
if (station != nullptr && IsTileType(cur_tile, MP_STATION)) {
|
||||
if (!IsAnyRoadStop(cur_tile)) {
|
||||
return ClearTile_Station(cur_tile, DoCommandFlag::Auto); // Get error message.
|
||||
} else {
|
||||
if (station_type != GetStationType(cur_tile) ||
|
||||
is_drive_through != IsDriveThroughStopTile(cur_tile)) {
|
||||
return ClearTile_Station(cur_tile, DoCommandFlag::Auto); // Get error message.
|
||||
}
|
||||
/* Drive-through station in the wrong direction. */
|
||||
if (is_drive_through && IsDriveThroughStopTile(cur_tile) && GetDriveThroughStopAxis(cur_tile) != axis) {
|
||||
return CommandCost(STR_ERROR_DRIVE_THROUGH_DIRECTION);
|
||||
}
|
||||
StationID st = GetStationIndex(cur_tile);
|
||||
if (*station == StationID::Invalid()) {
|
||||
*station = st;
|
||||
} else if (*station != st) {
|
||||
return CommandCost(STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
bool build_over_road = is_drive_through && IsNormalRoadTile(cur_tile);
|
||||
/* Road bits in the wrong direction. */
|
||||
RoadBits rb = IsNormalRoadTile(cur_tile) ? GetAllRoadBits(cur_tile) : ROAD_NONE;
|
||||
if (build_over_road && (rb & (axis == AXIS_X ? ROAD_Y : ROAD_X)) != 0) {
|
||||
/* Someone was pedantic and *NEEDED* three fracking different error messages. */
|
||||
switch (CountBits(rb)) {
|
||||
case 1:
|
||||
return CommandCost(STR_ERROR_DRIVE_THROUGH_DIRECTION);
|
||||
|
||||
case 2:
|
||||
if (rb == ROAD_X || rb == ROAD_Y) return CommandCost(STR_ERROR_DRIVE_THROUGH_DIRECTION);
|
||||
return CommandCost(STR_ERROR_DRIVE_THROUGH_CORNER);
|
||||
|
||||
default: // 3 or 4
|
||||
return CommandCost(STR_ERROR_DRIVE_THROUGH_JUNCTION);
|
||||
}
|
||||
}
|
||||
|
||||
if (build_over_road) {
|
||||
/* There is a road, check if we can build road+tram stop over it. */
|
||||
RoadType road_rt = GetRoadType(cur_tile, RTT_ROAD);
|
||||
if (road_rt != INVALID_ROADTYPE) {
|
||||
Owner road_owner = GetRoadOwner(cur_tile, RTT_ROAD);
|
||||
if (road_owner == OWNER_TOWN) {
|
||||
if (!_settings_game.construction.road_stop_on_town_road) return CommandCost(STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD);
|
||||
} else if (!_settings_game.construction.road_stop_on_competitor_road && road_owner != OWNER_NONE) {
|
||||
ret = CheckOwnership(road_owner);
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
uint num_pieces = CountBits(GetRoadBits(cur_tile, RTT_ROAD));
|
||||
|
||||
if (rt != INVALID_ROADTYPE && RoadTypeIsRoad(rt) && !HasPowerOnRoad(rt, road_rt)) return CommandCost(STR_ERROR_NO_SUITABLE_ROAD);
|
||||
|
||||
if (GetDisallowedRoadDirections(cur_tile) != DRD_NONE && road_owner != OWNER_TOWN) {
|
||||
ret = CheckOwnership(road_owner);
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
|
||||
cost.AddCost(RoadBuildCost(road_rt) * (2 - num_pieces));
|
||||
} else if (rt != INVALID_ROADTYPE && RoadTypeIsRoad(rt)) {
|
||||
cost.AddCost(RoadBuildCost(rt) * 2);
|
||||
}
|
||||
|
||||
/* There is a tram, check if we can build road+tram stop over it. */
|
||||
RoadType tram_rt = GetRoadType(cur_tile, RTT_TRAM);
|
||||
if (tram_rt != INVALID_ROADTYPE) {
|
||||
Owner tram_owner = GetRoadOwner(cur_tile, RTT_TRAM);
|
||||
if (Company::IsValidID(tram_owner) &&
|
||||
(!_settings_game.construction.road_stop_on_competitor_road ||
|
||||
/* Disallow breaking end-of-line of someone else
|
||||
* so trams can still reverse on this tile. */
|
||||
HasExactlyOneBit(GetRoadBits(cur_tile, RTT_TRAM)))) {
|
||||
ret = CheckOwnership(tram_owner);
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
uint num_pieces = CountBits(GetRoadBits(cur_tile, RTT_TRAM));
|
||||
|
||||
if (rt != INVALID_ROADTYPE && RoadTypeIsTram(rt) && !HasPowerOnRoad(rt, tram_rt)) return CommandCost(STR_ERROR_NO_SUITABLE_ROAD);
|
||||
|
||||
cost.AddCost(RoadBuildCost(tram_rt) * (2 - num_pieces));
|
||||
} else if (rt != INVALID_ROADTYPE && RoadTypeIsTram(rt)) {
|
||||
cost.AddCost(RoadBuildCost(rt) * 2);
|
||||
}
|
||||
} else if (rt == INVALID_ROADTYPE) {
|
||||
return CommandCost(STR_ERROR_THERE_IS_NO_ROAD);
|
||||
} else {
|
||||
ret = Command<CMD_LANDSCAPE_CLEAR>::Do(flags, cur_tile);
|
||||
if (ret.Failed()) return ret;
|
||||
cost.AddCost(ret.GetCost());
|
||||
cost.AddCost(RoadBuildCost(rt) * 2);
|
||||
}
|
||||
}
|
||||
|
||||
return cost;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether we can expand the rail part of the given station.
|
||||
|
@ -1324,6 +1206,230 @@ void SetRailStationTileFlags(TileIndex tile, const StationSpec *statspec)
|
|||
SetStationTileHaveWires(tile, !flags.Test(StationSpec::TileFlag::NoWires));
|
||||
}
|
||||
|
||||
CommandCost IsRailStationBridgeAboveOk(TileIndex tile, const StationSpec *statspec, uint8_t layout, TileIndex northern_bridge_end, TileIndex southern_bridge_end, int bridge_height,
|
||||
BridgeType bridge_type, TransportType bridge_transport_type)
|
||||
{
|
||||
if (statspec != nullptr && statspec->internal_flags.Test(StationSpecIntlFlag::BridgeHeightsSet)) {
|
||||
int height_above = statspec->GetBridgeAboveFlags(layout).height;
|
||||
if (height_above == 0) return CommandCost(INVALID_STRING_ID);
|
||||
if (GetTileMaxZ(tile) + height_above > bridge_height) {
|
||||
return CommandCost(STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION);
|
||||
}
|
||||
} else if (!statspec) {
|
||||
/* Default stations/waypoints */
|
||||
const int height = layout < 4 ? 2 : 5;
|
||||
if (GetTileMaxZ(tile) + height > bridge_height) return CommandCost(STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION);
|
||||
} else {
|
||||
return CommandCost(INVALID_STRING_ID);
|
||||
}
|
||||
|
||||
BridgePiecePillarFlags disallowed_pillar_flags;
|
||||
if (statspec != nullptr && statspec->internal_flags.Test(StationSpecIntlFlag::BridgeDisallowedPillarsSet)) {
|
||||
/* Pillar flags set by NewGRF */
|
||||
disallowed_pillar_flags = statspec->GetBridgeAboveFlags(layout).disallowed_pillars;
|
||||
} else if (!statspec) {
|
||||
/* Default stations/waypoints */
|
||||
if (layout < 8) {
|
||||
static const BridgePiecePillarFlags st_flags[8] = {
|
||||
{BridgePiecePillarFlag::BPPF_EDGE_SW, BridgePiecePillarFlag::BPPF_EDGE_NE}, //0x50,
|
||||
{BridgePiecePillarFlag::BPPF_EDGE_NW, BridgePiecePillarFlag::BPPF_EDGE_SE}, //0xA0,
|
||||
{BridgePiecePillarFlag::BPPF_EDGE_SW, BridgePiecePillarFlag::BPPF_EDGE_NE}, //0x50,
|
||||
{BridgePiecePillarFlag::BPPF_EDGE_NW, BridgePiecePillarFlag::BPPF_EDGE_SE}, //0xA0,
|
||||
{BridgePiecePillarFlag::BPPF_EDGE_SW, BridgePiecePillarFlag::BPPF_EDGE_NE, BridgePiecePillarFlag::BPPF_EDGE_SE, BridgePiecePillarFlag::BPPF_CORNER_E, BridgePiecePillarFlag::BPPF_CORNER_S}, //0x50 | 0x26,
|
||||
{BridgePiecePillarFlag::BPPF_EDGE_NW, BridgePiecePillarFlag::BPPF_EDGE_SE, BridgePiecePillarFlag::BPPF_EDGE_NE, BridgePiecePillarFlag::BPPF_CORNER_N, BridgePiecePillarFlag::BPPF_CORNER_E}, //0xA0 | 0x1C,
|
||||
{BridgePiecePillarFlag::BPPF_EDGE_NW, BridgePiecePillarFlag::BPPF_EDGE_SE, BridgePiecePillarFlag::BPPF_EDGE_NW, BridgePiecePillarFlag::BPPF_CORNER_N, BridgePiecePillarFlag::BPPF_CORNER_W}, //0x50 | 0x89,
|
||||
{BridgePiecePillarFlag::BPPF_EDGE_NW, BridgePiecePillarFlag::BPPF_EDGE_SE, BridgePiecePillarFlag::BPPF_EDGE_SW, BridgePiecePillarFlag::BPPF_CORNER_S, BridgePiecePillarFlag::BPPF_CORNER_W} //0xA0 | 0x43
|
||||
};
|
||||
|
||||
disallowed_pillar_flags = st_flags[layout];
|
||||
} else {
|
||||
disallowed_pillar_flags = {};
|
||||
}
|
||||
} else if (GetStationTileFlags(layout, statspec).Test(StationSpec::TileFlag::Blocked)) {
|
||||
/* Non-track station tiles */
|
||||
disallowed_pillar_flags = {};
|
||||
} else {
|
||||
/* Tracked station tiles */
|
||||
const Axis axis = HasBit(layout, 0) ? AXIS_Y : AXIS_X;
|
||||
disallowed_pillar_flags = axis == AXIS_X ? BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_EDGE_SW, BridgePiecePillarFlag::BPPF_EDGE_NE}) : BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_EDGE_NW, BridgePiecePillarFlag::BPPF_EDGE_SE}); //0x50, 0xA0
|
||||
}
|
||||
|
||||
if (!(GetBridgeTilePillarFlags(tile, northern_bridge_end, southern_bridge_end, bridge_type, bridge_transport_type) & disallowed_pillar_flags).Any()) return CommandCost(STR_ERROR_BRIDGE_PILLARS_OBSTRUCT_STATION);
|
||||
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
CommandCost IsRailStationBridgeAboveOk(TileIndex tile, const StationSpec *statspec, uint8_t layout)
|
||||
{
|
||||
if (!IsBridgeAbove(tile)) return CommandCost();
|
||||
|
||||
TileIndex southern_bridge_end = GetSouthernBridgeEnd(tile);
|
||||
TileIndex northern_bridge_end = GetNorthernBridgeEnd(tile);
|
||||
return IsRailStationBridgeAboveOk(tile, statspec, layout, northern_bridge_end, southern_bridge_end, GetBridgeHeight(southern_bridge_end),
|
||||
GetBridgeType(southern_bridge_end), GetTunnelBridgeTransportType(southern_bridge_end));
|
||||
}
|
||||
|
||||
CommandCost IsRoadStopBridgeAboveOK(TileIndex tile, const RoadStopSpec *spec, bool drive_through, DiagDirection entrance,
|
||||
TileIndex northern_bridge_end, TileIndex southern_bridge_end, int bridge_height,
|
||||
BridgeType bridge_type, TransportType bridge_transport_type)
|
||||
{
|
||||
if (spec != nullptr && spec->internal_flags.Test(RoadStopSpecIntlFlag::BridgeHeightsSet)) {
|
||||
int height = spec->bridge_height[drive_through ? (GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET + DiagDirToAxis(entrance)) : entrance];
|
||||
if (height == 0) return CommandCost(INVALID_STRING_ID);
|
||||
if (GetTileMaxZ(tile) + height > bridge_height) {
|
||||
return CommandCost(STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION);
|
||||
}
|
||||
} else {
|
||||
return CommandCost(INVALID_STRING_ID);
|
||||
|
||||
if (GetTileMaxZ(tile) + (drive_through ? 1 : 2) > bridge_height) {
|
||||
return CommandCost(STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION);
|
||||
}
|
||||
}
|
||||
|
||||
BridgePiecePillarFlags disallowed_pillar_flags = {};
|
||||
if (spec != nullptr && spec->internal_flags.Test(RoadStopSpecIntlFlag::BridgeDisallowedPillarsSet)) {
|
||||
disallowed_pillar_flags = spec->bridge_disallowed_pillars[drive_through ? (GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET + DiagDirToAxis(entrance)) : entrance];
|
||||
} else if (drive_through) {
|
||||
disallowed_pillar_flags = DiagDirToAxis(entrance) == AXIS_X ? BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_EDGE_SW, BridgePiecePillarFlag::BPPF_EDGE_NE}) : BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_EDGE_NW, BridgePiecePillarFlag::BPPF_EDGE_SE}); //0x50, 0xA0
|
||||
} else {
|
||||
disallowed_pillar_flags.Set((BridgePiecePillarFlags) (4 + entrance));
|
||||
}
|
||||
if (!(GetBridgeTilePillarFlags(tile, northern_bridge_end, southern_bridge_end, bridge_type, bridge_transport_type) & disallowed_pillar_flags).Any()) return CommandCost(STR_ERROR_BRIDGE_PILLARS_OBSTRUCT_STATION);
|
||||
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a road stop can be built at the given tile.
|
||||
* @param cur_tile Tile to check.
|
||||
* @param allowed_z Height allowed for the tile. If allowed_z is negative, it will be set to the height of this tile.
|
||||
* @param flags Operation to perform.
|
||||
* @param invalid_dirs Prohibited directions (set of DiagDirections).
|
||||
* @param is_drive_through True if trying to build a drive-through station.
|
||||
* @param station_type Station type (bus, truck or road waypoint).
|
||||
* @param axis Axis of a drive-through road stop.
|
||||
* @param station StationID to be queried and returned if available.
|
||||
* @param rt Road type to build, may be INVALID_ROADTYPE if an existing road is required.
|
||||
* @return The cost in case of success, or an error code if it failed.
|
||||
*/
|
||||
static CommandCost CheckFlatLandRoadStop(TileIndex cur_tile, int &allowed_z, const RoadStopSpec *spec, DoCommandFlags flags, DiagDirections invalid_dirs, bool is_drive_through, StationType station_type, Axis axis, StationID *station, RoadType rt)
|
||||
{
|
||||
CommandCost cost(EXPENSES_CONSTRUCTION);
|
||||
|
||||
bool allow_under_bridge = spec != nullptr && spec->internal_flags.Test(RoadStopSpecIntlFlag::BridgeHeightsSet);
|
||||
CommandCost ret = CheckBuildableTile(cur_tile, invalid_dirs, allowed_z, !is_drive_through, true);
|
||||
if (ret.Failed()) return ret;
|
||||
cost.AddCost(ret.GetCost());
|
||||
|
||||
if (allow_under_bridge && IsBridgeAbove(cur_tile)) {
|
||||
TileIndex southern_bridge_end = GetSouthernBridgeEnd(cur_tile);
|
||||
TileIndex northern_bridge_end = GetNorthernBridgeEnd(cur_tile);
|
||||
CommandCost bridge_ret = IsRoadStopBridgeAboveOK(cur_tile, spec, is_drive_through, DiagDirection::DIAGDIR_NE /*obviously wrong, but how do you get the "first bit" from invalid_dirs? and how would that be correct?? */,
|
||||
northern_bridge_end, southern_bridge_end, GetBridgeHeight(southern_bridge_end),
|
||||
GetBridgeType(southern_bridge_end), GetTunnelBridgeTransportType(southern_bridge_end));
|
||||
if (bridge_ret.Failed()) return bridge_ret;
|
||||
}
|
||||
|
||||
/* If station is set, then we have special handling to allow building on top of already existing stations.
|
||||
* Station points to StationID::Invalid() if we can build on any station.
|
||||
* Or it points to a station if we're only allowed to build on exactly that station. */
|
||||
if (station != nullptr && IsTileType(cur_tile, MP_STATION)) {
|
||||
if (!IsAnyRoadStop(cur_tile)) {
|
||||
return ClearTile_Station(cur_tile, DoCommandFlag::Auto); // Get error message.
|
||||
} else {
|
||||
if (station_type != GetStationType(cur_tile) ||
|
||||
is_drive_through != IsDriveThroughStopTile(cur_tile)) {
|
||||
return ClearTile_Station(cur_tile, DoCommandFlag::Auto); // Get error message.
|
||||
}
|
||||
/* Drive-through station in the wrong direction. */
|
||||
if (is_drive_through && IsDriveThroughStopTile(cur_tile) && GetDriveThroughStopAxis(cur_tile) != axis) {
|
||||
return CommandCost(STR_ERROR_DRIVE_THROUGH_DIRECTION);
|
||||
}
|
||||
StationID st = GetStationIndex(cur_tile);
|
||||
if (*station == StationID::Invalid()) {
|
||||
*station = st;
|
||||
} else if (*station != st) {
|
||||
return CommandCost(STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
bool build_over_road = is_drive_through && IsNormalRoadTile(cur_tile);
|
||||
/* Road bits in the wrong direction. */
|
||||
RoadBits rb = IsNormalRoadTile(cur_tile) ? GetAllRoadBits(cur_tile) : ROAD_NONE;
|
||||
if (build_over_road && (rb & (axis == AXIS_X ? ROAD_Y : ROAD_X)) != 0) {
|
||||
/* Someone was pedantic and *NEEDED* three fracking different error messages. */
|
||||
switch (CountBits(rb)) {
|
||||
case 1:
|
||||
return CommandCost(STR_ERROR_DRIVE_THROUGH_DIRECTION);
|
||||
|
||||
case 2:
|
||||
if (rb == ROAD_X || rb == ROAD_Y) return CommandCost(STR_ERROR_DRIVE_THROUGH_DIRECTION);
|
||||
return CommandCost(STR_ERROR_DRIVE_THROUGH_CORNER);
|
||||
|
||||
default: // 3 or 4
|
||||
return CommandCost(STR_ERROR_DRIVE_THROUGH_JUNCTION);
|
||||
}
|
||||
}
|
||||
|
||||
if (build_over_road) {
|
||||
/* There is a road, check if we can build road+tram stop over it. */
|
||||
RoadType road_rt = GetRoadType(cur_tile, RTT_ROAD);
|
||||
if (road_rt != INVALID_ROADTYPE) {
|
||||
Owner road_owner = GetRoadOwner(cur_tile, RTT_ROAD);
|
||||
if (road_owner == OWNER_TOWN) {
|
||||
if (!_settings_game.construction.road_stop_on_town_road) return CommandCost(STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD);
|
||||
} else if (!_settings_game.construction.road_stop_on_competitor_road && road_owner != OWNER_NONE) {
|
||||
ret = CheckOwnership(road_owner);
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
uint num_pieces = CountBits(GetRoadBits(cur_tile, RTT_ROAD));
|
||||
|
||||
if (rt != INVALID_ROADTYPE && RoadTypeIsRoad(rt) && !HasPowerOnRoad(rt, road_rt)) return CommandCost(STR_ERROR_NO_SUITABLE_ROAD);
|
||||
|
||||
if (GetDisallowedRoadDirections(cur_tile) != DRD_NONE && road_owner != OWNER_TOWN) {
|
||||
ret = CheckOwnership(road_owner);
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
|
||||
cost.AddCost(RoadBuildCost(road_rt) * (2 - num_pieces));
|
||||
} else if (rt != INVALID_ROADTYPE && RoadTypeIsRoad(rt)) {
|
||||
cost.AddCost(RoadBuildCost(rt) * 2);
|
||||
}
|
||||
|
||||
/* There is a tram, check if we can build road+tram stop over it. */
|
||||
RoadType tram_rt = GetRoadType(cur_tile, RTT_TRAM);
|
||||
if (tram_rt != INVALID_ROADTYPE) {
|
||||
Owner tram_owner = GetRoadOwner(cur_tile, RTT_TRAM);
|
||||
if (Company::IsValidID(tram_owner) &&
|
||||
(!_settings_game.construction.road_stop_on_competitor_road ||
|
||||
/* Disallow breaking end-of-line of someone else
|
||||
* so trams can still reverse on this tile. */
|
||||
HasExactlyOneBit(GetRoadBits(cur_tile, RTT_TRAM)))) {
|
||||
ret = CheckOwnership(tram_owner);
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
uint num_pieces = CountBits(GetRoadBits(cur_tile, RTT_TRAM));
|
||||
|
||||
if (rt != INVALID_ROADTYPE && RoadTypeIsTram(rt) && !HasPowerOnRoad(rt, tram_rt)) return CommandCost(STR_ERROR_NO_SUITABLE_ROAD);
|
||||
|
||||
cost.AddCost(RoadBuildCost(tram_rt) * (2 - num_pieces));
|
||||
} else if (rt != INVALID_ROADTYPE && RoadTypeIsTram(rt)) {
|
||||
cost.AddCost(RoadBuildCost(rt) * 2);
|
||||
}
|
||||
} else if (rt == INVALID_ROADTYPE) {
|
||||
return CommandCost(STR_ERROR_THERE_IS_NO_ROAD);
|
||||
} else {
|
||||
ret = Command<CMD_LANDSCAPE_CLEAR>::Do(flags, cur_tile);
|
||||
if (ret.Failed()) return ret;
|
||||
cost.AddCost(ret.GetCost());
|
||||
cost.AddCost(RoadBuildCost(rt) * 2);
|
||||
}
|
||||
}
|
||||
|
||||
return cost;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build rail station
|
||||
* @param flags operation to perform
|
||||
|
@ -1362,6 +1468,9 @@ CommandCost CmdBuildRailStation(DoCommandFlags flags, TileIndex tile_org, RailTy
|
|||
w_org = numtracks;
|
||||
}
|
||||
|
||||
/* Check if the first tile and the last tile are valid */
|
||||
if (!IsValidTile(tile_org) || TileAddWrap(tile_org, w_org - 1, h_org - 1) == INVALID_TILE) return CMD_ERROR;
|
||||
|
||||
bool reuse = (station_to_join != NEW_STATION);
|
||||
if (!reuse) station_to_join = StationID::Invalid();
|
||||
bool distant_join = (station_to_join != StationID::Invalid());
|
||||
|
@ -1376,6 +1485,7 @@ CommandCost CmdBuildRailStation(DoCommandFlags flags, TileIndex tile_org, RailTy
|
|||
/* Make sure the area below consists of clear tiles. (OR tiles belonging to a certain rail station) */
|
||||
StationID est = StationID::Invalid();
|
||||
std::vector<Train *> affected_vehicles;
|
||||
|
||||
/* Add construction and clearing expenses. */
|
||||
CommandCost cost = CalculateRailStationCost(new_location, flags, axis, &est, rt, affected_vehicles, spec_class, spec_index, plat_len, numtracks);
|
||||
if (cost.Failed()) return cost;
|
||||
|
@ -1423,23 +1533,30 @@ CommandCost CmdBuildRailStation(DoCommandFlags flags, TileIndex tile_org, RailTy
|
|||
st->cached_anim_triggers.Set(statspec->animation.triggers);
|
||||
}
|
||||
|
||||
TileIndexDiff tile_delta = TileOffsByAxis(axis); // offset to go to the next platform tile
|
||||
TileIndexDiff track_delta = TileOffsByAxis(OtherAxis(axis)); // offset to go to the next track
|
||||
Track track = AxisToTrack(axis);
|
||||
|
||||
std::vector<uint8_t> layouts(numtracks * plat_len);
|
||||
GetStationLayout(layouts.data(), numtracks, plat_len, statspec);
|
||||
|
||||
TileIndexDiff tile_delta = TileOffsByAxis(axis); // offset to go to the next platform tile
|
||||
TileIndexDiff track_delta = TileOffsByAxis(OtherAxis(axis)); // offset to go to the next track
|
||||
Track track = AxisToTrack(axis);
|
||||
uint8_t numtracks_orig = numtracks;
|
||||
|
||||
Company *c = Company::Get(st->owner);
|
||||
size_t layout_idx = 0;
|
||||
TileIndex tile_track = tile_org;
|
||||
|
||||
do {
|
||||
TileIndex tile = tile_track;
|
||||
int w = plat_len;
|
||||
do {
|
||||
uint8_t layout = layouts[layout_idx++];
|
||||
|
||||
ret = IsRailStationBridgeAboveOk(tile, statspec, layout);
|
||||
if (ret.Failed()) {
|
||||
//return CommandCost::DualErrorMessage(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ret.GetErrorMessage()); //FIXME
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (IsRailStationTile(tile) && HasStationReservation(tile)) {
|
||||
/* Check for trains having a reservation for this tile. */
|
||||
Train *v = GetTrainForReservation(tile, AxisToTrack(GetRailStationAxis(tile)));
|
||||
|
@ -1913,7 +2030,7 @@ static CommandCost FindJoiningRoadStop(StationID existing_stop, StationID statio
|
|||
* @param unit_cost The cost to build one road stop of the current type.
|
||||
* @return The cost in case of success, or an error code if it failed.
|
||||
*/
|
||||
CommandCost CalculateRoadStopCost(TileArea tile_area, DoCommandFlags flags, bool is_drive_through, StationType station_type, Axis axis, DiagDirection ddir, StationID *est, RoadType rt, Money unit_cost)
|
||||
CommandCost CalculateRoadStopCost(TileArea tile_area, DoCommandFlags flags, bool is_drive_through, StationType station_type, const RoadStopSpec *roadstopspec, Axis axis, DiagDirection ddir, StationID *est, RoadType rt, Money unit_cost)
|
||||
{
|
||||
DiagDirections invalid_dirs{};
|
||||
if (is_drive_through) {
|
||||
|
@ -1927,7 +2044,7 @@ CommandCost CalculateRoadStopCost(TileArea tile_area, DoCommandFlags flags, bool
|
|||
int allowed_z = -1;
|
||||
CommandCost cost(EXPENSES_CONSTRUCTION);
|
||||
for (TileIndex cur_tile : tile_area) {
|
||||
CommandCost ret = CheckFlatLandRoadStop(cur_tile, allowed_z, flags, invalid_dirs, is_drive_through, station_type, axis, est, rt);
|
||||
CommandCost ret = CheckFlatLandRoadStop(cur_tile, allowed_z, roadstopspec, flags, invalid_dirs, is_drive_through, station_type, axis, est, rt);
|
||||
if (ret.Failed()) return ret;
|
||||
|
||||
bool is_preexisting_roadstop = IsTileType(cur_tile, MP_STATION) && IsAnyRoadStop(cur_tile);
|
||||
|
@ -2008,7 +2125,7 @@ CommandCost CmdBuildRoadStop(DoCommandFlags flags, TileIndex tile, uint8_t width
|
|||
unit_cost = _price[is_truck_stop ? PR_BUILD_STATION_TRUCK : PR_BUILD_STATION_BUS];
|
||||
}
|
||||
StationID est = StationID::Invalid();
|
||||
CommandCost cost = CalculateRoadStopCost(roadstop_area, flags, is_drive_through, is_truck_stop ? StationType::Truck : StationType::Bus, axis, ddir, &est, rt, unit_cost);
|
||||
CommandCost cost = CalculateRoadStopCost(roadstop_area, flags, is_drive_through, is_truck_stop ? StationType::Truck : StationType::Bus, roadstopspec, axis, ddir, &est, rt, unit_cost);
|
||||
if (cost.Failed()) return cost;
|
||||
|
||||
Station *st = nullptr;
|
||||
|
@ -3380,6 +3497,7 @@ draw_default_foundation:
|
|||
}
|
||||
|
||||
DrawRailTileSeq(ti, t, TO_BUILDINGS, total_offset, relocation, palette);
|
||||
DrawBridgeMiddle(ti);
|
||||
}
|
||||
|
||||
void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image)
|
||||
|
|
|
@ -740,8 +740,53 @@ static const std::span<const std::span<const PalSpriteID>> _bridge_sprite_table[
|
|||
* @param nrl description of the rail bridge in query tool
|
||||
* @param nrd description of the road bridge in query tool
|
||||
*/
|
||||
#define MBR(y, mnl, mxl, p, mxs, spr, plt, dsc, nrl, nrd) \
|
||||
{TimerGameCalendar::Year{y}, mnl, mxl, p, mxs, spr, plt, dsc, { nrl, nrd }, {}, 0}
|
||||
#define MBR(y, mnl, mxl, p, mxs, spr, plt, dsc, nrl, nrd, pillars) \
|
||||
{TimerGameCalendar::Year{y}, mnl, mxl, p, mxs, spr, plt, dsc, { nrl, nrd }, {}, 0, BridgeSpecCtrlFlags(), pillars}
|
||||
|
||||
static constexpr std::array<BridgePiecePillarFlags, 12> all_pillars = {
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F,
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F,
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F,
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F,
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F,
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F,
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F,
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F,
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F,
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F,
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F,
|
||||
BridgePiecePillarFlag::BPPF_ALL_CORNERS, //0x0F
|
||||
};
|
||||
|
||||
static constexpr std::array<BridgePiecePillarFlags, 12> susp_pillars = {
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_W, BridgePiecePillarFlag::BPPF_CORNER_S}), //0x03,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_S, BridgePiecePillarFlag::BPPF_CORNER_E}), //0x06,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_E, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x0C,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_W, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x09,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_E, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x0C,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_W, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x09,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_W, BridgePiecePillarFlag::BPPF_CORNER_S}), //0x03,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_S, BridgePiecePillarFlag::BPPF_CORNER_E}), //0x06,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_ALL_CORNERS}), //0x0F,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_ALL_CORNERS}), //0x0F,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag()}), //0x00,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag()}), //0x00
|
||||
};
|
||||
|
||||
static constexpr std::array<BridgePiecePillarFlags, 12> cant_pillars = {
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag()}), //0x00,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag()}), //0x00,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_E, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x0C,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_W, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x09,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_E, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x0C,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_W, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x09,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_E, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x0C,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_W, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x09,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_E, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x0C,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_W, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x09,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_E, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x0C,
|
||||
BridgePiecePillarFlags({BridgePiecePillarFlag::BPPF_CORNER_W, BridgePiecePillarFlag::BPPF_CORNER_N}), //0x09
|
||||
};
|
||||
|
||||
const BridgeSpec _orig_bridge[] = {
|
||||
/*
|
||||
|
@ -755,43 +800,43 @@ const BridgeSpec _orig_bridge[] = {
|
|||
string with description name on rail name on road
|
||||
| | | | */
|
||||
MBR( 0, 0, 0xFFFF, 80, 32, 0xA24, PAL_NONE,
|
||||
STR_BRIDGE_NAME_WOODEN, STR_LAI_BRIDGE_DESCRIPTION_RAIL_WOODEN, STR_LAI_BRIDGE_DESCRIPTION_ROAD_WOODEN),
|
||||
STR_BRIDGE_NAME_WOODEN, STR_LAI_BRIDGE_DESCRIPTION_RAIL_WOODEN, STR_LAI_BRIDGE_DESCRIPTION_ROAD_WOODEN, all_pillars),
|
||||
|
||||
MBR( 0, 0, 2, 112, 48, 0xA26, PALETTE_TO_STRUCT_RED,
|
||||
STR_BRIDGE_NAME_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CONCRETE),
|
||||
STR_BRIDGE_NAME_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CONCRETE, all_pillars),
|
||||
|
||||
MBR(1930, 0, 5, 144, 64, 0xA25, PAL_NONE,
|
||||
STR_BRIDGE_NAME_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL),
|
||||
STR_BRIDGE_NAME_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL, all_pillars),
|
||||
|
||||
MBR( 0, 2, 10, 168, 80, 0xA22, PALETTE_TO_STRUCT_CONCRETE,
|
||||
STR_BRIDGE_NAME_SUSPENSION_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_CONCRETE),
|
||||
STR_BRIDGE_NAME_SUSPENSION_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_CONCRETE, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_CONCRETE, susp_pillars),
|
||||
|
||||
MBR(1930, 3, 0xFFFF, 185, 96, 0xA22, PAL_NONE,
|
||||
STR_BRIDGE_NAME_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL),
|
||||
STR_BRIDGE_NAME_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL, susp_pillars),
|
||||
|
||||
MBR(1930, 3, 0xFFFF, 192, 112, 0xA22, PALETTE_TO_STRUCT_YELLOW,
|
||||
STR_BRIDGE_NAME_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL),
|
||||
STR_BRIDGE_NAME_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL, susp_pillars),
|
||||
|
||||
MBR(1930, 3, 7, 224, 160, 0xA23, PAL_NONE,
|
||||
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL),
|
||||
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL, cant_pillars),
|
||||
|
||||
MBR(1930, 3, 8, 232, 208, 0xA23, PALETTE_TO_STRUCT_BROWN,
|
||||
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL),
|
||||
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL, cant_pillars),
|
||||
|
||||
MBR(1930, 3, 9, 248, 240, 0xA23, PALETTE_TO_STRUCT_RED,
|
||||
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL),
|
||||
STR_BRIDGE_NAME_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL, cant_pillars),
|
||||
|
||||
MBR(1930, 0, 2, 240, 256, 0xA27, PAL_NONE,
|
||||
STR_BRIDGE_NAME_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL),
|
||||
STR_BRIDGE_NAME_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL, all_pillars),
|
||||
|
||||
MBR(1995, 2, 0xFFFF, 255, 320, 0xA28, PAL_NONE,
|
||||
STR_BRIDGE_NAME_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL),
|
||||
STR_BRIDGE_NAME_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL, cant_pillars),
|
||||
|
||||
MBR(2005, 2, 0xFFFF, 380, 512, 0xA28, PALETTE_TO_STRUCT_YELLOW,
|
||||
STR_BRIDGE_NAME_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL),
|
||||
STR_BRIDGE_NAME_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL, cant_pillars),
|
||||
|
||||
MBR(2010, 2, 0xFFFF, 510, 608, 0xA28, PALETTE_TO_STRUCT_CONCRETE,
|
||||
STR_BRIDGE_TUBULAR_SILICON, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL)
|
||||
STR_BRIDGE_TUBULAR_SILICON, STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL, STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL, cant_pillars)
|
||||
};
|
||||
|
||||
#undef MBR
|
||||
|
|
|
@ -39,10 +39,13 @@
|
|||
#include "object_base.h"
|
||||
#include "water.h"
|
||||
#include "company_gui.h"
|
||||
#include "newgrf_roadstop.h"
|
||||
#include "station_func.h"
|
||||
#include "station_map.h"
|
||||
#include "tunnelbridge_cmd.h"
|
||||
#include "landscape_cmd.h"
|
||||
#include "terraform_cmd.h"
|
||||
#include "newgrf_station.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/bridge_land.h"
|
||||
|
@ -55,6 +58,12 @@ TileIndex _build_tunnel_endtile; ///< The end of a tunnel; as hidden return from
|
|||
/** Z position of the bridge sprites relative to bridge height (downwards) */
|
||||
static const int BRIDGE_Z_START = 3;
|
||||
|
||||
extern CommandCost IsRailStationBridgeAboveOk(TileIndex tile, const StationSpec *statspec, uint8_t layout, TileIndex northern_bridge_end, TileIndex southern_bridge_end, int bridge_height,
|
||||
BridgeType bridge_type, TransportType bridge_transport_type);
|
||||
|
||||
extern CommandCost IsRoadStopBridgeAboveOK(TileIndex tile, const RoadStopSpec *spec, bool drive_through, DiagDirection entrance,
|
||||
TileIndex northern_bridge_end, TileIndex southern_bridge_end, int bridge_height,
|
||||
BridgeType bridge_type, TransportType bridge_transport_type);
|
||||
|
||||
/**
|
||||
* Mark bridge tiles dirty.
|
||||
|
@ -391,6 +400,43 @@ CommandCost CmdBuildBridge(DoCommandFlags flags, TileIndex tile_end, TileIndex t
|
|||
/* If bridge belonged to bankrupt company, it has a new owner now */
|
||||
is_new_owner = (owner == OWNER_NONE);
|
||||
if (is_new_owner) owner = company;
|
||||
|
||||
TileIndexDiff delta = (direction == AXIS_X ? TileDiffXY(1, 0) : TileDiffXY(0, 1));
|
||||
for (TileIndex tile = tile_start + delta; tile != tile_end; tile += delta) {
|
||||
if (!IsTileType(tile, MP_STATION)) continue;
|
||||
switch (GetStationType(tile)) {
|
||||
case StationType::Rail:
|
||||
case StationType::RailWaypoint: {
|
||||
CommandCost ret = IsRailStationBridgeAboveOk(tile, GetStationSpec(tile), GetStationGfx(tile), tile_start, tile_end, z_start + 1, bridge_type, transport_type);
|
||||
if (ret.Failed()) {
|
||||
if (ret.GetErrorMessage() != INVALID_STRING_ID) return ret;
|
||||
ret = Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case StationType::Bus:
|
||||
case StationType::Truck:
|
||||
case StationType::RoadWaypoint: {
|
||||
CommandCost ret = IsRoadStopBridgeAboveOK(tile, GetRoadStopSpec(tile), IsDriveThroughStopTile(tile), IsDriveThroughStopTile(tile) ? AxisToDiagDir(GetDriveThroughStopAxis(tile)) : GetBayRoadStopDir(tile),
|
||||
tile_start, tile_end, z_start + 1, bridge_type, transport_type);
|
||||
if (ret.Failed()) {
|
||||
if (ret.GetErrorMessage() != INVALID_STRING_ID) return ret;
|
||||
ret = Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile);
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case StationType::Buoy:
|
||||
/* Buoys are always allowed */
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Build a new bridge. */
|
||||
|
||||
|
@ -467,6 +513,45 @@ CommandCost CmdBuildBridge(DoCommandFlags flags, TileIndex tile_end, TileIndex t
|
|||
break;
|
||||
}
|
||||
|
||||
case MP_STATION: {
|
||||
switch (GetStationType(tile)) {
|
||||
case StationType::Airport:
|
||||
goto not_valid_below;
|
||||
|
||||
case StationType::Rail:
|
||||
case StationType::RailWaypoint: {
|
||||
CommandCost ret = IsRailStationBridgeAboveOk(tile, GetStationSpec(tile), GetStationGfx(tile), tile_start, tile_end, z_start + 1, bridge_type, transport_type);
|
||||
if (ret.Failed()) {
|
||||
if (ret.GetErrorMessage() != INVALID_STRING_ID) return ret;
|
||||
goto not_valid_below;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case StationType::Bus:
|
||||
case StationType::Truck:
|
||||
case StationType::RoadWaypoint: {
|
||||
CommandCost ret = IsRoadStopBridgeAboveOK(tile, GetRoadStopSpec(tile), IsDriveThroughStopTile(tile), IsDriveThroughStopTile(tile) ? AxisToDiagDir(GetDriveThroughStopAxis(tile)) : GetBayRoadStopDir(tile),
|
||||
tile_start, tile_end, z_start + 1, bridge_type, transport_type);
|
||||
if (ret.Failed()) {
|
||||
if (ret.GetErrorMessage() != INVALID_STRING_ID) return ret;
|
||||
goto not_valid_below;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case StationType::Buoy:
|
||||
/* Buoys are always allowed */
|
||||
break;
|
||||
|
||||
default:
|
||||
//if (!(GetStationType(tile) == StationType::Dock && _settings_game.construction.allow_docks_under_bridges)) goto not_valid_below;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MP_CLEAR:
|
||||
break;
|
||||
|
||||
|
@ -1517,6 +1602,49 @@ static BridgePieces CalcBridgePiece(uint north, uint south)
|
|||
}
|
||||
}
|
||||
|
||||
BridgePiecePillarFlags GetBridgeTilePillarFlags(TileIndex tile, TileIndex northern_bridge_end, TileIndex southern_bridge_end, BridgeType bridge_type, TransportType bridge_transport_type)
|
||||
{
|
||||
if (bridge_transport_type == TRANSPORT_WATER) return BridgePiecePillarFlag::BPPF_ALL_CORNERS;
|
||||
|
||||
BridgePieces piece = CalcBridgePiece(
|
||||
GetTunnelBridgeLength(tile, northern_bridge_end) + 1,
|
||||
GetTunnelBridgeLength(tile, southern_bridge_end) + 1
|
||||
);
|
||||
assert(piece < BRIDGE_PIECE_HEAD);
|
||||
|
||||
const BridgeSpec *spec = GetBridgeSpec(bridge_type);
|
||||
const Axis axis = TileX(northern_bridge_end) == TileX(southern_bridge_end) ? AXIS_Y : AXIS_X;
|
||||
if (!spec->ctrl_flags.Test(BridgeSpecCtrlFlag::BSCF_INVALID_PILLAR_FLAGS)) {
|
||||
return spec->pillar_flags[piece * 2 + (axis == AXIS_Y ? 1 : 0)];
|
||||
} else {
|
||||
uint base_offset;
|
||||
if (bridge_transport_type == TRANSPORT_RAIL) {
|
||||
base_offset = GetRailTypeInfo(GetRailType(southern_bridge_end))->bridge_offset;
|
||||
} else {
|
||||
base_offset = 8;
|
||||
}
|
||||
|
||||
const PalSpriteID *psid = &GetBridgeSpriteTable(bridge_type, piece)[base_offset];
|
||||
if (axis == AXIS_Y) psid += 4;
|
||||
return psid[2].sprite != 0 ? BridgePiecePillarFlag::BPPF_ALL_CORNERS : BridgePiecePillarFlags();
|
||||
}
|
||||
}
|
||||
|
||||
BridgePieceDebugInfo GetBridgePieceDebugInfo(TileIndex tile)
|
||||
{
|
||||
TileIndex rampnorth = GetNorthernBridgeEnd(tile);
|
||||
TileIndex rampsouth = GetSouthernBridgeEnd(tile);
|
||||
|
||||
BridgePieces piece = CalcBridgePiece(
|
||||
GetTunnelBridgeLength(tile, rampnorth) + 1,
|
||||
GetTunnelBridgeLength(tile, rampsouth) + 1
|
||||
);
|
||||
BridgePiecePillarFlags pillar_flags = GetBridgeTilePillarFlags(tile, rampnorth, rampsouth, GetBridgeType(rampnorth), GetTunnelBridgeTransportType(rampnorth));
|
||||
const Axis axis = TileX(rampnorth) == TileX(rampsouth) ? AXIS_Y : AXIS_X;
|
||||
uint pillar_index = piece * 2 + (axis == AXIS_Y ? 1 : 0);
|
||||
return { piece, pillar_flags, pillar_index };
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw the middle bits of a bridge.
|
||||
* @param ti Tile information of the tile to draw it on.
|
||||
|
|
|
@ -182,7 +182,9 @@ static CommandCost IsValidTileForWaypoint(TileIndex tile, Axis axis, StationID *
|
|||
extern void GetStationLayout(uint8_t *layout, uint numtracks, uint plat_len, const StationSpec *statspec);
|
||||
extern CommandCost FindJoiningWaypoint(StationID existing_station, StationID station_to_join, bool adjacent, TileArea ta, Waypoint **wp, bool is_road);
|
||||
extern CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta);
|
||||
extern CommandCost CalculateRoadStopCost(TileArea tile_area, DoCommandFlags flags, bool is_drive_through, StationType station_type, Axis axis, DiagDirection ddir, StationID *est, RoadType rt, Money unit_cost);
|
||||
extern CommandCost CalculateRoadStopCost(TileArea tile_area, DoCommandFlags flags, bool is_drive_through, StationType station_type, const RoadStopSpec *roadstopspec, Axis axis, DiagDirection ddir, StationID *est, RoadType rt, Money unit_cost);
|
||||
extern CommandCost IsRailStationBridgeAboveOk(TileIndex tile, const StationSpec *statspec, uint8_t layout);
|
||||
|
||||
extern CommandCost RemoveRoadWaypointStop(TileIndex tile, DoCommandFlags flags, int replacement_spec_index);
|
||||
|
||||
/**
|
||||
|
@ -220,6 +222,17 @@ CommandCost CmdBuildRailWaypoint(DoCommandFlags flags, TileIndex start_tile, Axi
|
|||
|
||||
if (distant_join && (!_settings_game.station.distant_join_stations || !Waypoint::IsValidID(station_to_join))) return CMD_ERROR;
|
||||
|
||||
const StationSpec *spec = StationClass::Get(spec_class)->GetSpec(spec_index);
|
||||
std::vector<uint8_t> layout_ptr;
|
||||
layout_ptr.resize(count);
|
||||
if (spec == nullptr) {
|
||||
/* The layout must be 0 for the 'normal' waypoints by design. */
|
||||
//memset(layout_ptr, 0, count); //FIXME
|
||||
} else {
|
||||
/* But for NewGRF waypoints we like to have their style. */
|
||||
GetStationLayout(&layout_ptr[0], count, 1, spec);
|
||||
}
|
||||
|
||||
TileArea new_location(start_tile, width, height);
|
||||
|
||||
/* only AddCost for non-existing waypoints */
|
||||
|
@ -237,6 +250,10 @@ CommandCost CmdBuildRailWaypoint(DoCommandFlags flags, TileIndex start_tile, Axi
|
|||
TileIndex tile = start_tile + i * offset;
|
||||
CommandCost ret = IsValidTileForWaypoint(tile, axis, &est);
|
||||
if (ret.Failed()) return ret;
|
||||
ret = IsRailStationBridgeAboveOk(tile, spec, layout_ptr[i]);
|
||||
if (ret.Failed()) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Waypoint *wp = nullptr;
|
||||
|
@ -364,7 +381,7 @@ CommandCost CmdBuildRoadWaypoint(DoCommandFlags flags, TileIndex start_tile, Axi
|
|||
unit_cost = _price[PR_BUILD_STATION_TRUCK];
|
||||
}
|
||||
StationID est = StationID::Invalid();
|
||||
CommandCost cost = CalculateRoadStopCost(roadstop_area, flags, true, StationType::RoadWaypoint, axis, AxisToDiagDir(axis), &est, INVALID_ROADTYPE, unit_cost);
|
||||
CommandCost cost = CalculateRoadStopCost(roadstop_area, flags, true, StationType::RoadWaypoint, roadstopspec, axis, AxisToDiagDir(axis), &est, INVALID_ROADTYPE, unit_cost);
|
||||
if (cost.Failed()) return cost;
|
||||
|
||||
Waypoint *wp = nullptr;
|
||||
|
|
Loading…
Reference in New Issue