mirror of https://github.com/OpenTTD/OpenTTD
Compare commits
3 Commits
47093d36a4
...
98419ce944
Author | SHA1 | Date |
---|---|---|
|
98419ce944 | |
|
7eb042feac | |
|
3c44d5ba5a |
|
@ -634,8 +634,11 @@ 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_CAPTION :{WHITE}{INDUSTRY} - Cargo History
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produced
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transported
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :Delivered
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING :Waiting
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Show detailed performance ratings
|
||||
|
||||
|
@ -4023,6 +4026,8 @@ 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_CARGO_GRAPH :{BLACK}Cargo Graph
|
||||
STR_INDUSTRY_VIEW_CARGO_GRAPH_TOOLTIP :{BLACK}Shows the graph of industry cargo history
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure!
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
* \li AICargo::CC_POTABLE
|
||||
* \li AICargo::CC_NON_POTABLE
|
||||
* \li AIVehicleList_Waypoint
|
||||
* \li AIBaseStation::GetBaseStationID
|
||||
*
|
||||
* Other changes:
|
||||
* \li AIBridge::GetBridgeID renamed to AIBridge::GetBridgeType
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
* \li GSCargo::CC_NON_POTABLE
|
||||
* \li GSVehicleList_Waypoint
|
||||
* \li GSBaseStation::GetOwner
|
||||
* \li GSBaseStation::GetBaseStationID
|
||||
*
|
||||
* Other changes:
|
||||
* \li GSBridge::GetBridgeID renamed to GSBridge::GetBridgeType
|
||||
|
|
|
@ -34,6 +34,12 @@
|
|||
return ScriptCompany::ToScriptCompanyID(::BaseStation::Get(station_id)->owner);
|
||||
}
|
||||
|
||||
/* static */ StationID ScriptBaseStation::GetBaseStationID(TileIndex tile)
|
||||
{
|
||||
if (!::IsValidTile(tile) || !::IsTileType(tile, MP_STATION) || ::BaseStation::GetByTile(tile) == nullptr) return StationID::Invalid();
|
||||
return ::GetStationIndex(tile);
|
||||
}
|
||||
|
||||
/* static */ std::optional<std::string> ScriptBaseStation::GetName(StationID station_id)
|
||||
{
|
||||
if (!IsValidBaseStation(station_id)) return std::nullopt;
|
||||
|
|
|
@ -42,6 +42,15 @@ public:
|
|||
*/
|
||||
static ScriptCompany::CompanyID GetOwner(StationID station_id);
|
||||
|
||||
/**
|
||||
* Get the StationID of a tile, if there is a basestation.
|
||||
* @param tile The tile to find the StationID of.
|
||||
* @pre IsValidTile(tile).
|
||||
* @return StationID of the basestation.
|
||||
* @post Use IsValidBaseStation() to see if the basestation is valid.
|
||||
*/
|
||||
static StationID GetBaseStationID(TileIndex tile);
|
||||
|
||||
/**
|
||||
* Get the name of a basestation.
|
||||
* @param station_id The basestation to get the name of.
|
||||
|
|
Loading…
Reference in New Issue