Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TradeShips hyperjump code change #5647

Merged

Commits on Jan 17, 2024

  1. TradeShips hyperjump code change

    TradeShips now will check for distance(altitude) between orbital station(station's parent body) before making the jump. This should address accumulating hyperclouds around stations and rare illegal jumps. The algorithm will be:
    For orbital stations:
    1. Undock;
    2. Fly to limits of current orbital station (AIFlyTo);
    3. OnAICompleted event fires, tell ship to fly to current system's star;
    4. Assign task to check distance between current orbital station and ship, if distance is large enough, make the jump.
    
    For ground stations;
    1. Undock;
    2. Tell ship to fly to current system's star;
    3. Assign task to check altitude between current orbital station's parent and ship, if altitude is high enough, make the jump.
    
    Additionally:
    1. Fixed lua error when hyperjumping with TradeShips debug tab opened;
    2. Added function "PutShipIntoOrbit" in "LuaSpace.cpp" to put ship into orbit of the target body;
    3. Added two new methods "setPlayerAsTraderDocked" and "setPlayerAsTraderInbound" in "Flow.lua".
    
    Co-Authored-By: Gliese852 <[email protected]>
    Max5377 and Gliese852 committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    31aaa64 View commit details
    Browse the repository at this point in the history