| 1862 | } |
| 1863 | |
| 1864 | static money64 TrackDesignCreateRide(int32_t type, int32_t subType, CommandFlags flags, RideId* outRideIndex) |
| 1865 | { |
| 1866 | // Don't set colours as will be set correctly later. |
| 1867 | auto gameAction = GameActions::RideCreateAction( |
| 1868 | type, subType, 0, 0, getGameState().lastEntranceStyle, Config::Get().general.defaultInspectionInterval); |
| 1869 | gameAction.SetFlags(flags); |
| 1870 | |
| 1871 | auto& gameState = getGameState(); |
| 1872 | |
| 1873 | auto res = GameActions::ExecuteNested(&gameAction, gameState); |
| 1874 | |
| 1875 | // Callee's of this function expect kMoney64Undefined in case of failure. |
| 1876 | if (res.error != GameActions::Status::ok) |
| 1877 | { |
| 1878 | return kMoney64Undefined; |
| 1879 | } |
| 1880 | |
| 1881 | *outRideIndex = res.getData<RideId>(); |
| 1882 | |
| 1883 | return res.cost; |
| 1884 | } |
| 1885 | |
| 1886 | /** |
| 1887 | * |
no test coverage detected