Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set sgp to 0.
- set sggo to true.
- set sgf to 8.
- set sgpr to 4.
- set displayItems to list().
- function sgd {
- parameter l.
- parameter d.
- If l:length > sgpr set sgpr to l:length.
- print (l:padleft(sgpr) + ": " +round(d(),2)):padright(terminal:width) at (0, sgp).
- set sgp to sgp + 1.
- }.
- function addLine {
- parameter l.
- parameter d.
- local func to sgd(l,d).
- displayItems:add(func@).
- }
- lock twr to ship:availablethrust/ship:mass/body:mu*body:position:sqrmagnitude.
- list engines in es.
- function fueltime {
- set total to 0.
- for e in es set total to choose total+e:consumedresources["liquid fuel"]:fuelflow if e:consumedresources:haskey("liquid fuel") else 0.
- return choose ship:liquidfuel/total if total > 0 else -1.
- }
- addLine("alt radar",{return alt:radar.}).
- //addLine("terrain alt",ship:geoposition:terrainheight).
- //addLine("groundspeed",groundspeed).
- //addLine("twr",twr).
- //addLine("oxidizer", ship:oxidizer).
- //addLine("liquidfuel", ship:liquidfuel).
- //addLine("Fuel Time", fueltime()/60).
- //addLine("eta minutes", alt:radar / -ship:verticalspeed / 60).
- //addLine("Vertical Speed", ship:verticalspeed).
- //displayItems:add(sgd("bottom alt radar:", ship:bounds:bottomaltradar)).
- set sggo to false. wait 0. set sggo to true.
- On round(kuniverse:realtime * sgf) {
- set sgp to 0.
- foreach line in displayItems {
- line().
- }
- Print "":padright(terminal:width) at (0,sgp).
- Set sgp to sgp + 1.
- Print "":padright(terminal:width) at (0,sgp).
- return sggo.
- }
Add Comment
Please, Sign In to add comment