/*****************************************************************************
 * Copyright (c) 2014-2026 OpenRCT2 developers
 *
 * For a complete list of all authors, please refer to contributors.md
 * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
 *
 * OpenRCT2 is licensed under the GNU General Public License version 3.
 *****************************************************************************/

#pragma once

#include "../../../SpriteIds.h"
#include "../../../drawing/LightFX.h"
#include "../../RideData.h"
#include "../../RideStringIds.h"
#include "../../ShopItem.h"

// clang-format off
namespace OpenRCT2
{
constexpr RideTypeDescriptor kChairliftRTD =
{
    .Category = RideCategory::transport,
    .StartTrackPiece = TrackElemType::endStation,
    .TrackPaintFunctions = TrackDrawerDescriptor({
        .trackStyle = TrackStyle::chairlift,
        .supportType = MetalSupportType::truss,
        .enabledTrackGroups = {TrackGroup::straight, TrackGroup::stationEnd, TrackGroup::slope, TrackGroup::curveVerySmall},
        .extraTrackGroups = {},
    }),
    .InvertedTrackPaintFunctions = {},
    .flags = RtdFlags(RtdFlag::hasTrackColourMain, RtdFlag::hasTrackColourSupports, RtdFlag::canSynchroniseWithAdjacentStations,
                     RtdFlag::hasLoadOptions, RtdFlag::hasVehicleColours, RtdFlag::hasTrack,
                     RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit,
                     RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::isTransportRide, RtdFlag::showInTrackDesigner,
                     RtdFlag::slightlyInterestingToLookAt, RtdFlag::isSuspended, RtdFlag::runningSpeedAffectsReliability),
    .RideModes = EnumsToFlags(RideMode::stationToStation),
    .DefaultMode = RideMode::stationToStation,
    .OperatingSettings = { 1, 4 },
    .Naming = { STR_RIDE_NAME_CHAIRLIFT, STR_RIDE_DESCRIPTION_CHAIRLIFT },
    .NameConvention = { RideComponentType::car, RideComponentType::track, RideComponentType::station },
    .availableBreakdowns = { Breakdown::safetyCutOut },
    .Heights = { 40, 32, 28, 2, },
    .MaxMass = 18,
    .LiftData = { Audio::SoundId::null, 5, 5 },
    .RatingsMultipliers = { 70, 10, 0 },
    .UpkeepCosts = { 60, 20, 0, 4, 3, 10 },
    .BuildCosts = { 32.50_GBP, 0.50_GBP, 30, },
    .DefaultPrices = { 10, 0 },
    .DefaultMusic = kMusicObjectSummer,
    .PhotoItem = ShopItem::photo,
    .BonusValue = 55,
    .ColourPresets = TRACK_COLOUR_PRESETS(
        { Drawing::Colour::bordeauxRed, Drawing::Colour::bordeauxRed, Drawing::Colour::grey },
        { Drawing::Colour::white, Drawing::Colour::white, Drawing::Colour::oliveGreen },
        { Drawing::Colour::lightBrown, Drawing::Colour::lightBrown, Drawing::Colour::white },
    ),
    .ColourPreview = { SPR_RIDE_DESIGN_PREVIEW_CHAIRLIFT_TRACK, SPR_RIDE_DESIGN_PREVIEW_CHAIRLIFT_SUPPORTS },
    .ColourKey = RideColourKey::ride,
    .Name = "chairlift",
    .RatingsData =
    {
        RatingsCalculationType::normal,
        { RideRating::make(1, 60), RideRating::make(0, 40), RideRating::make(0, 50) },
        14,
        kDynamicRideShelterRating,
        false,
        {
            { RatingsModifierType::bonusLength,            6000,     764, 0, 0 },
            { RatingsModifierType::bonusTrainLength,       0,        187245, 0, 0 },
            { RatingsModifierType::bonusMaxSpeed,          0,        44281, 88562, 35424 },
            { RatingsModifierType::bonusAverageSpeed,      0,        291271, 436906, 0 },
            { RatingsModifierType::bonusDuration,          150,      26214, 0, 0 },
            { RatingsModifierType::bonusTurns,             0,        7430, 3476, 4574 },
            { RatingsModifierType::bonusSheltered,         0,        -19275, 21845, 23405 },
            { RatingsModifierType::bonusProximity,         0,        11183, 0, 0 },
            { RatingsModifierType::bonusScenery,           0,        25098, 0, 0 },
            { RatingsModifierType::requirementLength,      0x960000, 2, 2, 2 },
            { RatingsModifierType::requirementStations,    1,        0, 2, 1 },
            { RatingsModifierType::requirementUnsheltered, 4,        4, 1, 1 },
        },
    },
    .UpdateRotating = UpdateRotatingDefault,
    .LightFXAddLightsMagicVehicle = Drawing::LightFx::AddLightsMagicVehicle_ChairLift,
    .StartRideMusic = RideAudio::DefaultStartRideMusicChannel,
    .DesignCreateMode = TrackDesignCreateMode::standard,
    .MusicUpdateFunction = DefaultMusicUpdate,
    .Classification = RideClassification::ride,
    .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault,
    .SpecialElementRatingAdjustment = SpecialTrackElementRatingsAdjustment_Default,
    .GetGuestWaypointLocation = GetGuestWaypointLocationDefault,
    .ConstructionWindowContext = RideConstructionWindowContext::standard,
    .RideUpdate = updateChairlift,
};
} // namespace OpenRCT2
// clang-format on
