Layne's Docking Fees
====================
Version 1.6

This is a minor OXP for Oolite-- it adds docking fees based on tech level to all GalCop stations (the fee is 1/2 the system's tech level, between 0.5 credits for a tech 1 to 7.5 credits at tech 15) as well as some colourful docking messages chosen at random.  Rock hermits and many OXP stations are also included, either as no-cost landing stations (they either offer limited services or poor trading) or in some cases costing more than the main station to dock. (Astrofactories/commie factories cost a bribe to dock with because of the cheaper equipment prices, casinos cost twice as much as the main station because they're luxury retreats, etc.)  I have attempted to include as many OXP stations as I could find, but the list is by no means complete due to the number of additional stations that are mission-created or in older OXPs.  Thanks to additional station lists provided by Norby, I believe that all OXP stations that exist as of June 2015 have been at least accounted for (Though not all have been given special messages or fees).

Special thanks to phkb for help understanding the structure of the message callbacks; my friend Eris (who does not play Oolite but knows her Javascript very well in-deed).  Thanks to everyone on the Oolite forum who gave me scripting pointers.  Thanks to Norby for the comprehensive list of OXP stations and additional suggestions.

3rd Party interface
-------------------
To add a unique docking message for a specific station use the following code:
    worldScripts["Docking Fees"].$addFee("my_station_role", {fee:20, message:"Welcome to my station, commander! Have a nice day, and thanks for paying your [fee_amt] fee."});
"my_station_role" must be a role of the station in question.
Possible parameters:
    fee             the fee amount to deduct from the player
    multiplier      a multiplier which is applied to the default fee calculation, allowing you to make your station 
                    more expensive (numbers greater than 1) or cheaper (numbers between 0 and 1) than the default.
    messageKey      the key name of the docking message from descriptions.plist.
    message         the text of the message to be displayed.

Text in "message", and inside your descriptions.plist messageKey text, can include the following text inserts:
    [fee_amt]       will be replaced by the fee paid by the player.
    [st_name]       will be replaced by the station name where the player is docking.

To disable docking fees for a particular station, use the following code:
    worldScripts["Docking Fees"].$addFee("my_station_role", {messageKey:""});

This OXP is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0).  Please share and enjoy.

History:
4-22-15 1.0
Initial version of script posted on Oolite forum.

4-23-15 1.1
Changes to script by phkb to add support for non-galcop stations.

4-23-15 1.2
OXP (config files, etc.) constructed and messages moved to docking report screen.  Multiple new messages written for galcop and more OXP stations (Commies, Dictators, Feudal, etc.) added.

4-26-15 1.3
First public release of OXP package.

5-7-15  1.4
Corrections to scripting for compatibility with Combat Simulator OXP.  Additional stations (Sentinel, Lave Academy, Training) added to script.  Minor typos corrected in docking report.

6-9-15  1.5
One additional docking message per tech level for a total of fifteen new messages!

6-15-15 1.6
Fee script changed to exclude any station not specifically included in the script (random OXP stations will no longer have docking fees assigned).  Many, many (and did I say many?) new stations have been added to the list, though most have only a generic docking message or none at all.

7-27-15 1.6.1
Bugfix to correct Escape Capsule misbehaviours!

7-2-18 1.6.2
Fixed issue with long decimal values being displayed in arrival messages.
Fixed issue with incorrect role being used for current Black Monks stations.
Added message for Tionisla Orbital Graveyard station.

7-6-21 2.0
Reworked logic to allow for new stations to be added into the system without recoding.
Code refactoring.

8-1-22 2.1
Added currency symbol to arrival text.
Fixed issue of defaulting to main station fee when fee equals 0.

30-11-2023 2.2
Fixed incorrect lookup key for RRS stations.

03-08-2026 2.3
No docking fees in systems going nova.