-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I'm not sure if this fits as a bug, but basically, if you call construct.getMaxThrustAlongAxis you will not get the right values for lift and no values at all for brakes. For example, the script below should get all thrust, brake and lift stats for a ship:
local pwrAtmoThrust = construct.getMaxThrustAlongAxis('atmospheric_engine', construct.getOrientationForward())
local pwrSpaceThrust = construct.getMaxThrustAlongAxis('space_engine', construct.getOrientationForward())
local pwrAtmoBrake = construct.getMaxThrustAlongAxis('atmospheric_brake')
local pwrSpaceBrake = construct.getMaxThrustAlongAxis('space_brake')
local pwrLiftHigh = construct.getMaxThrustAlongAxis('airfoil', construct.getOrientationUp())
local pwrLiftLow = construct.getMaxThrustAlongAxis('ground', construct.getOrientationUp())
system.print('AT: ' .. table.concat(pwrAtmoThrust, ', '))
system.print('ST: ' .. table.concat(pwrSpaceThrust, ', '))
system.print('AB: ' .. table.concat(pwrAtmoBrake, ', '))
system.print('SB: ' .. table.concat(pwrSpaceBrake, ', '))
system.print('LH: ' .. table.concat(pwrLiftHigh, ', '))
system.print('LL: ' .. table.concat(pwrLiftLow, ', '))The values for atmo and space thrust work correctly, same as low-altitude lift. When trying to retrieve values for high-altitude lift (airfoils) the values returned are zero. The same applies for brakes, no matter what I use as the second argument (axis).
This problems gets worse if I try to use construct.getMaxBrake(), as not only that function only returns a single number value, which we don't know whether it's space or atmo brake value, but it also seems to return zero when ran from a Programming Board with the ship not moving.
An ideal solution would be making so that the values returned by the function matched what's received from the Build Helper, including brakes and high-altitude lift power. Another thing that could help is described on #54, but basically having an API where we can query each of the individual element's stats, though it's not ideal as it's probably going to be very laggy...
Thanks!