pioneerspacesim/pioneer — pull request #2747 by laarmen (2014-02-10 22:50:18+00:00)
Title: Add the ability to bypass fuel and range checks when hyperjumping from Lua

From the commit log of 94a1902 (the rest is trivial):

New API to make (almost) uncondional jumps

This commit adds new InitiateHyperjump and AbortHyperjump methods to
Ship, with only the minimal consistency checking (not in hyperspace
already, and not jumping towards the current system), as well as a way
to use an arbitrary Lua function to abort the jump during the countdown.

The plan is to make these methods available from Lua, and to implement
all Hyperspace-related policies in Lua (waiting on #1719, as usual). In
the end, I plan on removing CheckHyperSpaceTo and friends.

In order to make this work, I had to add a temporary flag to
the HyperspaceOut structure to tell the various checking functions not
to deal with considerations of fuel or range when the hyperjump has been
initiated by the new methods. This flag will definitely be on its way
along with all the fuel-related code in an hopefully near future.