Naev

Module swapship

Utility to swap the player's ship.

Functions

test (template) Tests to see if it is possible to swap ships for the player.
swap (template, acquired) Swaps the player's ship.


Functions

test (template)
Tests to see if it is possible to swap ships for the player.

Parameters:

  • template Pilot Template pilot to try to swap ships with the player.
swap (template, acquired)
Swaps the player's ship. Performs checks to make sure things don't break. Use in place of player.shipSwap() unless you really know what you're doing.

Can fail if the player can't copy all the mission cargo over.

Parameters:

  • template Pilot Template pilot to swap with the player. Note that the template pilot gets removed on success.
  • acquired string Description of how the new ship was acquired.

Returns:

    boolean true on success, false otherwise
generated by LDoc 1.5.0 Last updated 2024-12-13 16:37:51