How to contribute to Airline Club

There are many ways to help improve Airline Club. Some of them are listed. We hope you consider taking a look at them!

## Coding

Since Airline Club is open source, you can find its code on Github. It is possible to contribute to the code on there. If you have any ideas for new features and you are very good at programming (in Scala, Javascript or HTML), you may want to code it in yourself. If you want to help but don't have any suggestions, them you can check the open issues and solve them yourself.

You can also make a mod that changes the layout of AC. These do not have to be direct contributions to the source code, and can be implemented via a user's inspect menu or a third-party script runner such as Tampermonkey.

## Adding airplanes

Note: AC is currently **not adding** new planes before v3. You can still suggest them, but they will not be implemented before then. He is also not accepting planes which are too similar to other planes or otherwise not be used by players (or variants for existing planes such as the A220).

Adding an airplane is simple. You will need to define some variables at Model.scala on Github, and add a picture. The variables are organized like this. Bolded values need to be changed by you.

`Model(“**Name**”, “**Family**”, capacity = **x**, fuelBurn = (**capacity** * **fuel burn per pax**).toInt, speed = **x**, range = **x**, price = **x**, lifespan = **x** * 52, constructionTime = **x**, Manufacturer(“**name**”, countryCode = “**Country**”), runwayRequirement = **x**, imageUrl = "**https://www.norebbo.com/something**”)`

Note that the imageUrl is not the actual raw image url, it is the website where the image is posted on. Airline Club uses images from Norebbo. It will be best if images are either from Norebbo or are very similar in style to Norebbo's images. Make sure values do not have any separators (i.e. turn 100,000,000 into 100000000) when inserting new values

An example airplane may look like this:

`Model("Boeing 787-8 Dreamliner", "Boeing 787", capacity = 250, fuelBurn = (250 * 4.5).toInt, speed = 907, range = 13621, price = 125000000, lifespan = 35 * 52, constructionTime = 36, Manufacturer("Boeing", countryCode = "US"), runwayRequirement = 2600, imageUrl = "https://www.norebbo.com/2013/02/boeing-787-8-blank-illustration-templates/")`

### How to edit Norebbo's images for the game

AC has an agreement with Norebbo and is allowed to use his images in the game, as long as the resolution is scaled down to 500px x 200px. Listed below is how AC does it. He uses GIMP (image processing software) for this but you can use other photo editing software.

1. First, size the image to meet the width : 500px
2. Then cut the airplane with the gears down
3. Then use selection tool to select the airplane, and cut out the background to make it transparent
4. Adjust the canvas size to 500px X 200px
5. Move the airplane to center it in the image
6. Export it as PNG (which preserves the transparent background)

After you find and edit the image, it will need to be uploaded onto the airplane pic folder, with the correct file name (e.g. Airbus A350-900 ULR to `airbus-a350-900-url.png)`

After this, you can make a pull request on Github.

## Adding Data

Airline Club is missing lots of data about airports and cities, especially those outside of North America and Europe. If you add or make a change to an airport/city, you would have to wait until V3 is released to see the changes.

### Adding airports/runways

Airline Club uses data from OurAirports for its airports and runways. To edit the database there, first make an account on the website. If you want to add an airport, first, check if it has any airlines servicing it, Airline Club only adds these types of airports. If the airport doesn't have any airlines servicing it (such as General Aviation fields), don't add it. If the airport has airlines servicing it, search for the airport, go to edit, and tick the Has Airline Service checkbox.

Adding a runway is a bit more complicated. To edit runways, go to the airport you want to edit, then select Pilots on the top bar. The dropdown list will list runways. Click it. To find information about the runways of an airport, first check Wikipedia. If Wikipedia doesn't have runway data, go to Google Maps. To measure runway length, use Google's measuring tool, found when right clicking a point. Connect the two opposite points and note the distance. Runway identifiers are found at the ends of runways. Make sure that you read the number correctly, not upside down. Runway identifiers go from 01 - 36, and the numbers on either end should differ by 18 (e.g. 01 and 19, 06 and 24, 18 and 36 etc.).

   Please be sure to double-check your measurements, and add them in feet. If your result is in metric units, you will have to convert them.

### Adding Cities

Airline Club uses Geonames for city data. To edit a city's population, first create an account, and then search for the city that you want to add. To find population info, go to Wikipedia and use the city's urban population, not total population (usually found on the left infobox). In Geonames, click the edit button (pencil), and then change the population. If you run into an error, try it again. If your error is something related to user level, it means that your account is too new. You can message Fly or Die on the Airline Club discord and let him fix it for you.