OpenTTD GameScript API: game_changelog.hpp File Reference

OpenTTD GameScript API 14.0-RC1

game_changelog.hpp File Reference

## Detailed Description

Lists all changes / additions to the API.

Only new / renamed / deleted api functions will be listed here. A list of bug fixes can be found in the normal changelog. Note that removed API functions may still be available if you return an older API version in GetAPIVersion() in info.nut.

14.0

This version is not yet released. The following changes are not set in stone yet.

API additions:

- GSIndustry::GetConstructionDate
- GSAsyncMode
- GSCompanyMode::IsValid
- GSCompanyMode::IsDeity
- GSTimeMode
- GSTown::ROAD_LAYOUT_RANDOM
- GSVehicle::IsPrimaryVehicle
- GSOrder::SetOrderJumpTo
- GSOrder::SetOrderCondition
- GSOrder::SetOrderCompareFunction
- GSOrder::SetOrderCompareValue
- GSOrder::SetStopLocation
- GSOrder::SetOrderRefit
- GSOrder::AppendOrder
- GSOrder::AppendConditionalOrder
- GSOrder::InsertOrder
- GSOrder::InsertConditionalOrder
- GSOrder::RemoveOrder
- GSOrder::SetOrderFlags
- GSOrder::MoveOrder
- GSOrder::SkipToOrder
- GSOrder::CopyOrders
- GSOrder::ShareOrders
- GSOrder::UnshareOrders
- GSCompany::IsMine
- GSCompany::SetPresidentGender
- GSCompany::SetAutoRenewStatus
- GSCompany::SetAutoRenewMonths
- GSCompany::SetAutoRenewMoney
- GSCompany::SetMaxLoanAmountForCompany
- GSCompany::ResetMaxLoanAmountForCompany
- GSGameSettings::IsDisabledVehicleType
- GSGroup::GroupID
- GSGroup::IsValidGroup
- GSGroup::CreateGroup
- GSGroup::DeleteGroup
- GSGroup::GetVehicleType
- GSGroup::SetName
- GSGroup::GetName
- GSGroup::SetParent
- GSGroup::GetParent
- GSGroup::EnableAutoReplaceProtection
- GSGroup::GetAutoReplaceProtection
- GSGroup::GetNumEngines
- GSGroup::GetNumVehicles
- GSGroup::MoveVehicle
- GSGroup::EnableWagonRemoval
- GSGroup::HasWagonRemoval
- GSGroup::SetAutoReplace
- GSGroup::GetEngineReplacement
- GSGroup::StopAutoReplace
- GSGroup::GetProfitThisYear
- GSGroup::GetProfitLastYear
- GSGroup::GetCurrentUsage
- GSGroup::SetPrimaryColour
- GSGroup::SetSecondaryColour
- GSGroup::GetPrimaryColour
- GSGroup::GetSecondaryColour
- GSGroupList
- GSVehicleList_Group
- GSVehicleList_DefaultGroup
- GSGoal::IsValidGoalDestination
- GSGoal::SetDestination
- GSIndustry::GetProductionLevel
- GSIndustry::SetProductionLevel
- GSStoryPage::IsValidStoryPageElementType
- GSStoryPage::IsValidStoryPageButtonColour
- GSStoryPage::IsValidStoryPageButtonFlags
- GSStoryPage::IsValidStoryPageButtonCursor
- GSTileList_StationCoverage
- GSAirport::GetAirportNumHelipads

API removals:

- GSError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, that error is never returned anymore.
- GSInfo::CONFIG_RANDOM, no longer used.

Other changes:

- GSGroupList accepts an optional filter function
- GSIndustryList accepts an optional filter function
- GSSignList accepts an optional filter function
- GSSubsidyList accepts an optional filter function
- GSTownList accepts an optional filter function
- GSVehicleList accepts an optional filter function
- GSInfo::AddSettings easy_value / medium_value / hard_value are replaced with default_value

13.0

API additions:

- GSCargo::GetWeight
- GSIndustryType::ResolveNewGRFID
- GSObjectType::ResolveNewGRFID
- GSLeagueTable

Other changes:

- GSRoad::HasRoadType now correctly checks RoadType against RoadType

12.0

API additions:

- GSNewGRF
- GSNewGRFList
- GSMarine::BT_LOCK
- GSMarine::BT_CANAL
- GSTile::IsSeaTile
- GSTile::IsRiverTile
- GSTile::BT_CLEAR_WATER
- GSObjectTypeList
- GSObjectType

1.11.0

API additions:

- GSCargo::GetName
- GSEventStoryPageButtonClick
- GSEventStoryPageTileSelect
- GSEventStoryPageVehicleSelect
- GSIndustry::GetCargoLastAcceptedDate
- GSIndustry::GetControlFlags
- GSIndustry::GetExclusiveConsumer
- GSIndustry::GetExclusiveSupplier
- GSIndustry::GetLastProductionYear
- GSIndustry::SetControlFlags
- GSIndustry::SetExclusiveConsumer
- GSIndustry::SetExclusiveSupplier
- GSIndustry::SetText
- GSStoryPage::MakePushButtonReference
- GSStoryPage::MakeTileButtonReference
- GSStoryPage::MakeVehicleButtonReference
- GSPriorityQueue

Other changes:

- GSCompany::ChangeBankBalance takes one extra parameter to refer to a location to show text effect on
- GSGoal::Question and GSGoal::QuestionClient no longer require to have any buttons except for the window type GSGoal.QT_QUESTION

1.10.0

API additions:

- GSVehicle::BuildVehicleWithRefit
- GSVehicle::GetBuildWithRefitCapacity
- GSRoad::GetName
- GSRoad::RoadVehCanRunOnRoad
- GSRoad::RoadVehHasPowerOnRoad
- GSRoad::ConvertRoadType
- GSRoad::GetMaxSpeed
- GSEngine::EnableForCompany
- GSEngine::DisableForCompany

1.9.0

API additions:

- GSAirport::GetMonthlyMaintenanceCost
- GSClient
- GSClientList
- GSClientList_Company
- GSViewport::ScrollEveryoneTo
- GSViewport::ScrollCompanyClientsTo
- GSViewport::ScrollClientTo
- GSGoal::QuestionClient

Other changes:

- GSBridge::GetName takes one extra parameter to refer the vehicle type

1.8.0

No changes

API additions:

- GSRoad::ERR_ROADTYPE_DISALLOWS_CROSSING

1.7.0 - 1.7.2

No changes

1.6.1 - 1.6.0

No changes

1.5.3 - 1.5.1

No changes

1.5.0

API additions:

- GSList::SwapList
- GSStation::GetCargoPlanned
- GSStation::GetCargoPlannedFrom
- GSStation::GetCargoPlannedFromVia
- GSStation::GetCargoPlannedVia
- GSStation::GetCargoWaitingFromVia
- GSStationList_CargoPlannedByFrom
- GSStationList_CargoPlannedByVia
- GSStationList_CargoPlannedFromByVia
- GSStationList_CargoPlannedViaByFrom
- GSStationList_CargoWaitingByFrom
- GSStationList_CargoWaitingByVia
- GSStationList_CargoWaitingFromByVia
- GSStationList_CargoWaitingViaByFrom

Other changes:

- GSNews::Create takes two extra parameters to refer to a location, station, industry, or town. The user can click at the news message to jump to the referred location.

1.4.4 - 1.4.3

No changes

1.4.2

Other changes:

- GSCargoMonitor delivery and pickup monitor functions have improved boundary checking for their parameters, and return `-1` if they are found out of bounds.

1.4.1

No changes

1.4.0

API additions:

- AICargo::GetDistributionType
- GSCompany::ChangeBankBalance
- GSDate::DATE_INVALID
- GSDate::IsValidDate
- GSGoal::GT_STORY_PAGE
- GSGoal::IsCompleted
- GSGoal::SetCompleted
- GSGoal::SetProgress
- GSGoal::SetText
- GSStation::HasCargoRating
- GSStation::GetCargoWaitingFrom
- GSStation::GetCargoWaitingVia
- GSStoryPage
- GSStoryPageList
- GSStoryPageElementList
- GSTile::GetTerrainType
- GSTown::FoundTown
- GSTown::GetFundBuildingsDuration
- GSTown::SetName
- GSTown::TOWN_GROWTH_NONE
- GSTown::TOWN_GROWTH_NORMAL

Other changes:

- GSGoal::New can now create up to 64000 concurrent goals. The old limit was 256 goals.
- GSStation::GetCargoRating does return -1 for cargo-station combinations that do not have a rating yet instead of returning 69.

1.3.3 - 1.3.2

No changes

1.3.1

API additions:

- GSTile::GetTerrainType

1.3.0

API additions:

- GSCargoMonitor
- GSEngine::IsValidEngine and GSEngine::IsBuildable when outside GSCompanyMode scope
- GSEventExclusiveTransportRights
- GSEventRoadReconstruction
- GSNews::NT_ACCIDENT, GSNews::NT_COMPANY_INFO, GSNews::NT_ADVICE, GSNews::NT_ACCEPTANCE
- GSIndustryType::IsProcessingIndustry
- GSStation::IsAirportClosed
- GSStation::OpenCloseAirport
- GSController::Break
- GSIndustryType::BuildIndustry, GSIndustryType::CanBuildIndustry, GSIndustryType::ProspectIndustry and GSIndustryType::CanProspectIndustry when outside GSCompanyMode scope

Other changes:

- Company specific goals are now removed when a company goes bankrupt or is taken over.

1.2.3 - 1.2.1

No changes

1.2.0

- First stable release with the NoGo framework.