Split from Mission Refactor: Phase II. This pull request includes changes to Korolov Shipping so it can make better use of ships defined in mods.

Korolov Shipping will use any freighters with the attributes +commonwealth +freighter and StaticData korolovMinLevel. Any qualifying ships from extensions, will be used in missions and be listed in both the Korolov Service Record and Freighter Data screens without having to modify the Korolov dock screens.

Ships which are intended for use by Korolov should have the following StaticData and Language:
StaticData

  • korolov.containerPrice = list of container prices for each level
  • korolovEscortRate = escort fee as fraction of cargo value (default 100 = 1%)
  • korolovMinLevel = minimum player level required to escort freighter

Language:

  • korolov.shipDesc = descriptive text to use in Ship Data screen

When calculating cargo value we
1) try using the new korolov.containerPrice
2) try legacy korolovContainerPrice (support 1.7 and earlier mods)
3) select a default value based on playerLevel

If korolov.shipDesc is missing then only ship stats will be shown in the freighter data screen.

Both escort missions now include a check on ship speed and will only allow missions where player is faster than the freighter (by at-least 2 % light-speed)

george moromisato 30 May 2017:

Merged @giantcabbage's code: https://github.com/kronosaur/Transcendence/pull/40

Thank you!