Open
Conversation
Add Prestige table Add prestige points to airline info table
Ciaran5933
commented
Feb 28, 2026
| AirlineSource.saveAirlineBase(base) | ||
| Prestige.updatePrestigeCharmForAirport(airportId) | ||
| // So any prestige charm change can be reflected in the airport detail panel immediately | ||
| ResponseCache.airportDetailCache.invalidate(airportId) |
Ciaran5933
commented
Mar 1, 2026
Ciaran5933
commented
Mar 1, 2026
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 | ||
| } | ||
| } |
Author
There was a problem hiding this comment.
I based this off gateway airport and then changed it a bit. You can tell because its still got one of the comments,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.