Improve launch sequence, add some control buttons to rocket program.
This commit is contained in:
parent
9b034aaa1a
commit
6830f23613
4 changed files with 88 additions and 19 deletions
|
@ -3,11 +3,14 @@
|
|||
// stages, spools up the engines, and then "releases control"
|
||||
// to the main ship computer.
|
||||
//
|
||||
// *** TAGGING REQUIREMENTS ***
|
||||
// The launchpad object should have the "launchpad" tag.
|
||||
// The ship's main CPU (the one with launch functionality" should be tagged "shipcpu".
|
||||
// Fuel tanks with the "nofuel" tag will have *all* resources temporarily disabled during this
|
||||
// sequence. The main ship computer must re-enable them after staging. NoFuelResources in lib/systems is ideal
|
||||
// Fuel tanks with the "nofuel" tag will have *all* resources temporarily disabled during the pre-launch
|
||||
// sequence. The main ship computer must re-enable them after staging. NoFuelResources() in lib/systems is ideal
|
||||
// for this.
|
||||
// Similarly, any crossfeed-capable decouplers tagged "prelaunch" will have crossfeed ENABLED during pre-launch.
|
||||
// MainCPU should, again, disable these once it stages. PreLaunchCrossfeed() in lib/systems is your friend.
|
||||
|
||||
RunOncePath("/lib/systems").
|
||||
RunOncePath("/lib/ui").
|
||||
|
@ -35,6 +38,7 @@ function preLaunch {
|
|||
|
||||
print "Beginning pre-launch sequence.".
|
||||
NoFuelResources(false).
|
||||
PreLaunchCrossfeed(true).
|
||||
|
||||
// turn on generator and fuel flow
|
||||
enableLaunchpadFlow().
|
||||
|
@ -56,7 +60,8 @@ function preLaunch {
|
|||
local msg is Lex(
|
||||
"command", "launch",
|
||||
"angle", options["Kick Angle"]:TEXT:ToNumber(),
|
||||
"time", options["Kick Time"]:TEXT:ToNumber()
|
||||
"time", options["Kick Time"]:TEXT:ToNumber(),
|
||||
"start", options["Kick Start"]:TEXT:ToNumber()
|
||||
).
|
||||
Processor("shipcpu"):CONNECTION:SendMessage(msg).
|
||||
iface:Hide().
|
||||
|
@ -76,7 +81,8 @@ MakeMenu(
|
|||
List(
|
||||
List("Spool-up Time", "SCALAR", "15"),
|
||||
List("Kick Angle", "SCALAR", "30"),
|
||||
List("Kick Time", "SCALAR", "45")
|
||||
List("Kick Time", "SCALAR", "45"),
|
||||
List("Kick Start", "SCALAR", "100")
|
||||
),
|
||||
"Execute",
|
||||
preLaunch@
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue