Merge branch 'master' into jgrpp
# Conflicts: # src/script/api/script_company.cpp # src/script/api/script_date.cpp # src/script/api/script_date.hpp # src/script/api/script_gamesettings.cpp # src/script/api/script_order.hpp # src/script/api/script_town.cpp # src/script/api/script_window.cpp
This commit is contained in:
@@ -50,21 +50,21 @@ extern uint8 GetAirportNoiseLevelForDistance(const struct AirportSpec *as, uint
|
||||
return ::IsTileType(tile, MP_STATION) && ::IsAirport(tile);
|
||||
}
|
||||
|
||||
/* static */ int32 ScriptAirport::GetAirportWidth(AirportType type)
|
||||
/* static */ SQInteger ScriptAirport::GetAirportWidth(AirportType type)
|
||||
{
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
|
||||
return ::AirportSpec::Get(type)->size_x;
|
||||
}
|
||||
|
||||
/* static */ int32 ScriptAirport::GetAirportHeight(AirportType type)
|
||||
/* static */ SQInteger ScriptAirport::GetAirportHeight(AirportType type)
|
||||
{
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
|
||||
return ::AirportSpec::Get(type)->size_y;
|
||||
}
|
||||
|
||||
/* static */ int32 ScriptAirport::GetAirportCoverageRadius(AirportType type)
|
||||
/* static */ SQInteger ScriptAirport::GetAirportCoverageRadius(AirportType type)
|
||||
{
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
|
||||
@@ -92,7 +92,7 @@ extern uint8 GetAirportNoiseLevelForDistance(const struct AirportSpec *as, uint
|
||||
return ScriptObject::DoCommand(tile, 0, 0, CMD_LANDSCAPE_CLEAR);
|
||||
}
|
||||
|
||||
/* static */ int32 ScriptAirport::GetNumHangars(TileIndex tile)
|
||||
/* static */ SQInteger ScriptAirport::GetNumHangars(TileIndex tile)
|
||||
{
|
||||
if (!::IsValidTile(tile)) return -1;
|
||||
if (!::IsTileType(tile, MP_STATION)) return -1;
|
||||
@@ -129,7 +129,7 @@ extern uint8 GetAirportNoiseLevelForDistance(const struct AirportSpec *as, uint
|
||||
}
|
||||
|
||||
|
||||
/* static */ int ScriptAirport::GetNoiseLevelIncrease(TileIndex tile, AirportType type)
|
||||
/* static */ SQInteger ScriptAirport::GetNoiseLevelIncrease(TileIndex tile, AirportType type)
|
||||
{
|
||||
if (!::IsValidTile(tile)) return -1;
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
@@ -159,9 +159,9 @@ extern uint8 GetAirportNoiseLevelForDistance(const struct AirportSpec *as, uint
|
||||
return AirportGetNearestTown(as, AirportTileTableIterator(as->table[0], tile), dist)->index;
|
||||
}
|
||||
|
||||
/* static */ uint16 ScriptAirport::GetMaintenanceCostFactor(AirportType type)
|
||||
/* static */ SQInteger ScriptAirport::GetMaintenanceCostFactor(AirportType type)
|
||||
{
|
||||
if (!IsAirportInformationAvailable(type)) return INVALID_TOWN;
|
||||
if (!IsAirportInformationAvailable(type)) return 0;
|
||||
|
||||
return AirportSpec::Get(type)->maintenance_cost;
|
||||
}
|
||||
|
Reference in New Issue
Block a user