Skip to content

Airline Prestige#154

Open
Ciaran5933 wants to merge 8 commits intomyflyclub:v4/mainfrom
Ciaran5933:mfc/airline-prestige
Open

Airline Prestige#154
Ciaran5933 wants to merge 8 commits intomyflyclub:v4/mainfrom
Ciaran5933:mfc/airline-prestige

Conversation

@Ciaran5933
Copy link
Copy Markdown

No description provided.

AirlineSource.saveAirlineBase(base)
Prestige.updatePrestigeCharmForAirport(airportId)
// So any prestige charm change can be reflected in the airport detail panel immediately
ResponseCache.airportDetailCache.invalidate(airportId)
Copy link
Copy Markdown
Author

@Ciaran5933 Ciaran5933 Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Placeholder

Comment on lines +296 to +316
override def demandAdjustment(rawDemand: Double, passengerType: PassengerType.Value, airportId: Int, fromAirport: Airport, toAirport: Airport, affinity: Int, distance: Int) : Int = {
if (fromAirport.hasFeature(AirportFeatureType.PRESTIGE_CHARM) && toAirport.hasFeature(AirportFeatureType.PRESTIGE_CHARM) ) { //extra demand if both airports are gateway
val distanceMultiplier = {
if (distance <= 1250) {
0.2
} else if (distance <= 2500) {
0.4
} else if (distance <= 5000) {
0.6
} else {
0.8
}
}
val affinityMultiplier = (affinity.toDouble + 1.0) / 4.0 + 0.5
(Math.log(strength) * distanceMultiplier * affinityMultiplier).toInt
} else if (toAirport.id == airportId && fromAirport.countryCode == toAirport.countryCode && fromAirport.baseIncome >= 40000 && toAirport.hasFeature(AirportFeatureType.PRESTIGE_CHARM)) {
Math.min(Math.min(100, strength * 10), 3 + (rawDemand * 0.2).toInt) //add domestic demand to prestige charms, but only for rich airports
} else {
0
}
}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I based this off gateway airport and then changed it a bit. You can tell because its still got one of the comments,

@spencerm spencerm marked this pull request as ready for review March 2, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant