This blueprint is for the Space Exploration mod.
The logic here allows creating a schedule of stops for a spaceship. The blueprint has space for six in the rotation but it can be easily extended if necessary. Unused stops can be removed.
Combinators at the sides set destination and docking information for the "G" (go) points, numbered starting at zero. Add one location signal (found in the universe explorer), one ship clamp ID, and one docking clamp ID. Alternatively, a waypoint can be designated by setting one location signal and "C" equal to "-1"; this allows, for example, a ship to "continue" through point F while going from A to B.
To make things easy, since the very first launch will advance the schedule to G=1, make G=0 be the "home" station (typically where the ship is being built) and G=1 be the first destination upon leaving the home station. Continue from there.
Also change the constant in the "<" combinator (to the left of the substation) to be the number of stops in the rotation.
An example schedule of 5 stops, #0 to #4, is included in the blueprint. Don't use them as the numbers will be different in your game.
Launch the ship by having outside logic send and hold the "launch" signal on the red wire to the substation or use top-right combinator for manual launch, leaving it on until the launch actually happens. Once travelling, the launch signal must be turned off or it'll get stuck in a launch/anchor loop at the next destination.
The logic for determining when to launch can also be on the ship but it's often better to be at the site so as to reduce hull stress by not carrying all those extra combinators around. Connect red and green wires from the substation to the ship's docking clamps. The green wire carries the ship's status out while the red wire carries control signals in. If doing the logic onboard, be sure the launch signal goes off once underway.
Notes
- In order for the ship to "engage" after launch, it must also be fed a "speed" signal. You can do this with logic or another constant combinator sending that signal to the red wire.
- It would seem that the two chained combinators at the far left of the substation (that manage waypoints) could be combined into a single
distance=Ccondition. Unfortunately, a limitation in SE causes all decider combinators to have no input signals for a single tick after the transition between dock and space. That makes any "=" condition between signals evaluate true (0=0) and creates a one-tick pulse on the "launch" output resulting in an extra advancement of the schedule.
Potential Problems
- The "launch" signal remains asserted. This will cause an anchor/launch loop at the next destination until the ship runs out of fuel.
