{"slots": {"-1": {"name": "unit", "type": {"methods": [], "events": []}}, "-3": {"name": "player", "type": {"methods": [], "events": []}}, "-2": {"name": "construct", "type": {"methods": [], "events": []}}, "-4": {"name": "system", "type": {"methods": [], "events": []}}, "0": {"name": "core", "type": {"methods": [], "events": []}}, "-5": {"name": "library", "type": {"methods": [], "events": []}}, "1": {"name": "slot2", "type": {"methods": [], "events": []}}, "2": {"name": "slot3", "type": {"methods": [], "events": []}}, "3": {"name": "slot4", "type": {"methods": [], "events": []}}, "4": {"name": "slot5", "type": {"methods": [], "events": []}}, "5": {"name": "slot6", "type": {"methods": [], "events": []}}, "6": {"name": "slot7", "type": {"methods": [], "events": []}}, "7": {"name": "slot8", "type": {"methods": [], "events": []}}, "8": {"name": "slot9", "type": {"methods": [], "events": []}}, "9": {"name": "slot10", "type": {"methods": [], "events": []}}}, "handlers": [{"key": "0", "filter": {"slotKey": "-1", "signature": "onStart()", "args": []}, "code": "-- category panel display helpers\n_autoconf = {}\n_autoconf.panels = {}\n_autoconf.panels_size = 0\n_autoconf.displayCategoryPanel = function(elements, size, title, type, widgetPerData)\n widgetPerData = widgetPerData or false -- default to one widget for all data\n if size > 0 then\n local panel = system.createWidgetPanel(title)\n local widget\n if not widgetPerData then\n widget = system.createWidget(panel, type)\n end\n for i = 1, size do\n if widgetPerData then\n widget = system.createWidget(panel, type)\n end\n system.addDataToWidget(elements[i].getWidgetDataId(), widget)\n end\n _autoconf.panels_size = _autoconf.panels_size + 1\n _autoconf.panels[_autoconf.panels_size] = panel\n end\nend\n_autoconf.hideCategoryPanels = function()\n for i=1,_autoconf.panels_size do\n system.destroyWidgetPanel(_autoconf.panels[i])\n end\nend\n-- Proxy array to access auto-plugged slots programmatically\n\natmofueltank = {}\natmofueltank_size = 0\n\nspacefueltank = {}\nspacefueltank_size = 0\n\nrocketfueltank = {}\nrocketfueltank_size = 0\n\nweapon = {}\nweapon_size = 0\n\nradar = {}\nradar_size = 0\n-- End of auto-generated code\npitchInput = 0\nrollInput = 0\nyawInput = 0\nbrakeInput = 0\n\nNav = Navigator.new(system, core, unit)\nNav.axisCommandManager:setupCustomTargetSpeedRanges(axisCommandId.longitudinal, {1000, 5000, 10000, 20000, 30000})\nNav.axisCommandManager:setTargetGroundAltitude(4)\n\n-- Parenting widget\nparentingPanelId = system.createWidgetPanel(\"Docking\")\nparentingWidgetId = system.createWidget(parentingPanelId,\"parenting\")\nsystem.addDataToWidget(unit.getWidgetDataId(),parentingWidgetId)\n\n-- Combat stress widget\ncoreCombatStressPanelId = system.createWidgetPanel(\"Core combat stress\")\ncoreCombatStressgWidgetId = system.createWidget(coreCombatStressPanelId,\"core_stress\")\nsystem.addDataToWidget(core.getWidgetDataId(),coreCombatStressgWidgetId)\n\n-- element widgets\n-- For now we have to alternate between PVP and non-PVP widgets to have them on the same side.\n_autoconf.displayCategoryPanel(weapon, weapon_size, \"Weapons\", \"weapon\", true)\ncore.showWidget()\n_autoconf.displayCategoryPanel(radar, radar_size, \"Periscope\", \"periscope\")\nplaceRadar = true\nif atmofueltank_size > 0 then\n _autoconf.displayCategoryPanel(atmofueltank, atmofueltank_size, \"Atmo Fuel\", \"fuel_container\")\n if placeRadar then\n _autoconf.displayCategoryPanel(radar, radar_size, \"Radar\", \"radar\")\n placeRadar = false\n end\nend\nif spacefueltank_size > 0 then\n _autoconf.displayCategoryPanel(spacefueltank, spacefueltank_size, \"Space Fuel\", \"fuel_container\")\n if placeRadar then\n _autoconf.displayCategoryPanel(radar, radar_size, \"Radar\", \"radar\")\n placeRadar = false\n end\nend\n_autoconf.displayCategoryPanel(rocketfueltank, rocketfueltank_size, \"Rocket Fuel\", \"fuel_container\")\nif placeRadar then -- We either have only rockets or no fuel tanks at all, uncommon for usual vessels\n _autoconf.displayCategoryPanel(radar, radar_size, \"Radar\", \"radar\")\n placeRadar = false\nend\nif antigrav ~= nil then antigrav.showWidget() end\nif warpdrive ~= nil then warpdrive.showWidget() end\nif gyro ~= nil then gyro.showWidget() end\nif shield ~= nil then shield.showWidget() end\n\n-- freeze the player in he is remote controlling the construct\nif unit.isRemoteControlled() then\n player.freeze(1)\nend\n\n-- landing gear\n-- make sure every gears are synchonized with the first\ngearExtended = unit.isAnyLandingGearDeployed()\nif gearExtended then\n unit.deployLandingGears()\nelse\n unit.retractLandingGears()\nend\n"}, {"key": "1", "filter": {"slotKey": "-1", "signature": "onStop()", "args": []}, "code": "_autoconf.hideCategoryPanels()\nif antigrav ~= nil then antigrav.hideWidget() end\nif warpdrive ~= nil then warpdrive.hideWidget() end\nif gyro ~= nil then gyro.hideWidget() end\ncore.hideWidget()\nunit.switchOffHeadlights()\n"}, {"key": "2", "filter": {"slotKey": "-4", "signature": "onFlush()", "args": []}, "code": "-- constants: use 'myvar = defaultValue --export: description' to expose the variable in context menu\n\nlocal pitchSpeedFactor = 0.8 --export: This factor will increase/decrease the player input along the pitch axis
(higher value may be unstable)
Valid values: Superior or equal to 0.01\nlocal yawSpeedFactor = 1 --export: This factor will increase/decrease the player input along the yaw axis
(higher value may be unstable)
Valid values: Superior or equal to 0.01\nlocal rollSpeedFactor = 1.5 --export: This factor will increase/decrease the player input along the roll axis
(higher value may be unstable)
Valid values: Superior or equal to 0.01\n\nlocal brakeSpeedFactor = 3 --export: When braking, this factor will increase the brake force by brakeSpeedFactor * velocity
Valid values: Superior or equal to 0.01\nlocal brakeFlatFactor = 1 --export: When braking, this factor will increase the brake force by a flat brakeFlatFactor * velocity direction>
(higher value may be unstable)
Valid values: Superior or equal to 0.01\n\nlocal autoRoll = false --export: [Only in atmosphere]
When the pilot stops rolling, flight model will try to get back to horizontal (no roll)\nlocal autoRollFactor = 2 --export: [Only in atmosphere]
When autoRoll is engaged, this factor will increase to strength of the roll back to 0
Valid values: Superior or equal to 0.01\n\nlocal turnAssist = true --export: [Only in atmosphere]
When the pilot is rolling, the flight model will try to add yaw and pitch to make the construct turn better
The flight model will start by adding more yaw the more horizontal the construct is and more pitch the more vertical it is\nlocal turnAssistFactor = 2 --export: [Only in atmosphere]
This factor will increase/decrease the turnAssist effect
(higher value may be unstable)
Valid values: Superior or equal to 0.01\n\nlocal torqueFactor = 2 -- Force factor applied to reach rotationSpeed
(higher value may be unstable)
Valid values: Superior or equal to 0.01\n\n-- validate params\npitchSpeedFactor = math.max(pitchSpeedFactor, 0.01)\nyawSpeedFactor = math.max(yawSpeedFactor, 0.01)\nrollSpeedFactor = math.max(rollSpeedFactor, 0.01)\ntorqueFactor = math.max(torqueFactor, 0.01)\nbrakeSpeedFactor = math.max(brakeSpeedFactor, 0.01)\nbrakeFlatFactor = math.max(brakeFlatFactor, 0.01)\nautoRollFactor = math.max(autoRollFactor, 0.01)\nturnAssistFactor = math.max(turnAssistFactor, 0.01)\n\n-- final inputs\nlocal finalPitchInput = pitchInput + system.getControlDeviceForwardInput()\nlocal finalRollInput = rollInput + system.getControlDeviceYawInput()\nlocal finalYawInput = yawInput - system.getControlDeviceLeftRightInput()\nlocal finalBrakeInput = brakeInput\n\n-- Axis\nlocal worldVertical = vec3(core.getWorldVertical()) -- along gravity\nlocal constructUp = vec3(construct.getWorldOrientationUp())\nlocal constructForward = vec3(construct.getWorldOrientationForward())\nlocal constructRight = vec3(construct.getWorldOrientationRight())\nlocal constructVelocity = vec3(construct.getWorldVelocity())\nlocal constructVelocityDir = vec3(construct.getWorldVelocity()):normalize()\nlocal currentRollDeg = getRoll(worldVertical, constructForward, constructRight)\nlocal currentRollDegAbs = math.abs(currentRollDeg)\nlocal currentRollDegSign = utils.sign(currentRollDeg)\n\n-- Rotation\nlocal constructAngularVelocity = vec3(construct.getWorldAngularVelocity())\nlocal targetAngularVelocity = finalPitchInput * pitchSpeedFactor * constructRight\n + finalRollInput * rollSpeedFactor * constructForward\n + finalYawInput * yawSpeedFactor * constructUp\n\n-- In atmosphere?\nif worldVertical:len() > 0.01 and unit.getAtmosphereDensity() > 0.0 then\n local autoRollRollThreshold = 1.0\n -- autoRoll on AND currentRollDeg is big enough AND player is not rolling\n if autoRoll == true and currentRollDegAbs > autoRollRollThreshold and finalRollInput == 0 then\n local targetRollDeg = utils.clamp(0,currentRollDegAbs-30, currentRollDegAbs+30); -- we go back to 0 within a certain limit\n if (rollPID == nil) then\n rollPID = pid.new(autoRollFactor * 0.01, 0, autoRollFactor * 0.1) -- magic number tweaked to have a default factor in the 1-10 range\n end\n rollPID:inject(targetRollDeg - currentRollDeg)\n local autoRollInput = rollPID:get()\n\n targetAngularVelocity = targetAngularVelocity + autoRollInput * constructForward\n end\n local turnAssistRollThreshold = 20.0\n -- turnAssist AND currentRollDeg is big enough AND player is not pitching or yawing\n if turnAssist == true and currentRollDegAbs > turnAssistRollThreshold and finalPitchInput == 0 and finalYawInput == 0 then\n local rollToPitchFactor = turnAssistFactor * 0.1 -- magic number tweaked to have a default factor in the 1-10 range\n local rollToYawFactor = turnAssistFactor * 0.025 -- magic number tweaked to have a default factor in the 1-10 range\n\n -- rescale (turnAssistRollThreshold -> 180) to (0 -> 180)\n local rescaleRollDegAbs = ((currentRollDegAbs - turnAssistRollThreshold) / (180 - turnAssistRollThreshold)) * 180\n local rollVerticalRatio = 0\n if rescaleRollDegAbs < 90 then\n rollVerticalRatio = rescaleRollDegAbs / 90\n elseif rescaleRollDegAbs < 180 then\n rollVerticalRatio = (180 - rescaleRollDegAbs) / 90\n end\n\n rollVerticalRatio = rollVerticalRatio * rollVerticalRatio\n\n local turnAssistYawInput = - currentRollDegSign * rollToYawFactor * (1.0 - rollVerticalRatio)\n local turnAssistPitchInput = rollToPitchFactor * rollVerticalRatio\n\n targetAngularVelocity = targetAngularVelocity\n + turnAssistPitchInput * constructRight\n + turnAssistYawInput * constructUp\n end\nend\n\n-- Engine commands\nlocal keepCollinearity = 1 -- for easier reading\nlocal dontKeepCollinearity = 0 -- for easier reading\nlocal tolerancePercentToSkipOtherPriorities = 1 -- if we are within this tolerance (in%), we don't go to the next priorities\n\n-- Rotation\nlocal angularAcceleration = torqueFactor * (targetAngularVelocity - constructAngularVelocity)\nlocal airAcceleration = vec3(construct.getWorldAirFrictionAngularAcceleration())\nangularAcceleration = angularAcceleration - airAcceleration -- Try to compensate air friction\nNav:setEngineTorqueCommand('torque', angularAcceleration, keepCollinearity, 'airfoil', '', '', tolerancePercentToSkipOtherPriorities)\n\n-- Brakes\nlocal brakeAcceleration = -finalBrakeInput * (brakeSpeedFactor * constructVelocity + brakeFlatFactor * constructVelocityDir)\nNav:setEngineForceCommand('brake', brakeAcceleration)\n\n-- AutoNavigation regroups all the axis command by 'TargetSpeed'\nlocal autoNavigationEngineTags = ''\nlocal autoNavigationAcceleration = vec3()\nlocal autoNavigationUseBrake = false\n\n-- Longitudinal Translation\nlocal longitudinalEngineTags = 'thrust analog longitudinal'\nlocal longitudinalCommandType = Nav.axisCommandManager:getAxisCommandType(axisCommandId.longitudinal)\nif (longitudinalCommandType == axisCommandType.byThrottle) then\n local longitudinalAcceleration = Nav.axisCommandManager:composeAxisAccelerationFromThrottle(longitudinalEngineTags,axisCommandId.longitudinal)\n Nav:setEngineForceCommand(longitudinalEngineTags, longitudinalAcceleration, keepCollinearity)\nelseif (longitudinalCommandType == axisCommandType.byTargetSpeed) then\n local longitudinalAcceleration = Nav.axisCommandManager:composeAxisAccelerationFromTargetSpeed(axisCommandId.longitudinal)\n autoNavigationEngineTags = autoNavigationEngineTags .. ' , ' .. longitudinalEngineTags\n autoNavigationAcceleration = autoNavigationAcceleration + longitudinalAcceleration\n if (Nav.axisCommandManager:getTargetSpeed(axisCommandId.longitudinal) == 0 or -- we want to stop\n Nav.axisCommandManager:getCurrentToTargetDeltaSpeed(axisCommandId.longitudinal) < - Nav.axisCommandManager:getTargetSpeedCurrentStep(axisCommandId.longitudinal) * 0.5) -- if the longitudinal velocity would need some braking\n then\n autoNavigationUseBrake = true\n end\n\nend\n\n-- Lateral Translation\nlocal lateralStrafeEngineTags = 'thrust analog lateral'\nlocal lateralCommandType = Nav.axisCommandManager:getAxisCommandType(axisCommandId.lateral)\nif (lateralCommandType == axisCommandType.byThrottle) then\n local lateralStrafeAcceleration = Nav.axisCommandManager:composeAxisAccelerationFromThrottle(lateralStrafeEngineTags,axisCommandId.lateral)\n Nav:setEngineForceCommand(lateralStrafeEngineTags, lateralStrafeAcceleration, keepCollinearity)\nelseif (lateralCommandType == axisCommandType.byTargetSpeed) then\n local lateralAcceleration = Nav.axisCommandManager:composeAxisAccelerationFromTargetSpeed(axisCommandId.lateral)\n autoNavigationEngineTags = autoNavigationEngineTags .. ' , ' .. lateralStrafeEngineTags\n autoNavigationAcceleration = autoNavigationAcceleration + lateralAcceleration\nend\n\n-- Vertical Translation\nlocal verticalStrafeEngineTags = 'thrust analog vertical'\nlocal verticalCommandType = Nav.axisCommandManager:getAxisCommandType(axisCommandId.vertical)\nif (verticalCommandType == axisCommandType.byThrottle) then\n local verticalStrafeAcceleration = Nav.axisCommandManager:composeAxisAccelerationFromThrottle(verticalStrafeEngineTags,axisCommandId.vertical)\n Nav:setEngineForceCommand(verticalStrafeEngineTags, verticalStrafeAcceleration, keepCollinearity, 'airfoil', 'ground', '', tolerancePercentToSkipOtherPriorities)\nelseif (verticalCommandType == axisCommandType.byTargetSpeed) then\n local verticalAcceleration = Nav.axisCommandManager:composeAxisAccelerationFromTargetSpeed(axisCommandId.vertical)\n autoNavigationEngineTags = autoNavigationEngineTags .. ' , ' .. verticalStrafeEngineTags\n autoNavigationAcceleration = autoNavigationAcceleration + verticalAcceleration\nend\n\n-- Auto Navigation (Cruise Control)\nif (autoNavigationAcceleration:len() > constants.epsilon) then\n if (brakeInput ~= 0 or autoNavigationUseBrake or math.abs(constructVelocityDir:dot(constructForward)) < 0.95) -- if the velocity is not properly aligned with the forward\n then\n autoNavigationEngineTags = autoNavigationEngineTags .. ', brake'\n end\n Nav:setEngineForceCommand(autoNavigationEngineTags, autoNavigationAcceleration, dontKeepCollinearity, '', '', '', tolerancePercentToSkipOtherPriorities)\nend\n\n-- Rockets\nNav:setBoosterCommand('rocket_engine')\n"}, {"key": "3", "filter": {"slotKey": "-4", "signature": "onUpdate()", "args": []}, "code": "Nav:update()"}, {"key": "4", "filter": {"slotKey": "-4", "signature": "onActionStart(gear)", "args": [{"value": "gear"}]}, "code": "gearExtended = not gearExtended\nif gearExtended then\n unit.deployLandingGears()\nelse\n unit.retractLandingGears()\nend\n"}, {"key": "5", "filter": {"slotKey": "-4", "signature": "onActionStart(light)", "args": [{"value": "light"}]}, "code": "if unit.isAnyHeadlightSwitchedOn() then\n unit.switchOffHeadlights()\nelse\n unit.switchOnHeadlights()\nend\n"}, {"key": "6", "filter": {"slotKey": "-4", "signature": "onActionStart(forward)", "args": [{"value": "forward"}]}, "code": "pitchInput = pitchInput - 1"}, {"key": "7", "filter": {"slotKey": "-4", "signature": "onActionStop(forward)", "args": [{"value": "forward"}]}, "code": "pitchInput = pitchInput + 1"}, {"key": "8", "filter": {"slotKey": "-4", "signature": "onActionStart(backward)", "args": [{"value": "backward"}]}, "code": "pitchInput = pitchInput + 1"}, {"key": "9", "filter": {"slotKey": "-4", "signature": "onActionStop(backward)", "args": [{"value": "backward"}]}, "code": "pitchInput = pitchInput - 1"}, {"key": "10", "filter": {"slotKey": "-4", "signature": "onActionStart(left)", "args": [{"value": "left"}]}, "code": "rollInput = rollInput - 1"}, {"key": "11", "filter": {"slotKey": "-4", "signature": "onActionStop(left)", "args": [{"value": "left"}]}, "code": "rollInput = rollInput + 1"}, {"key": "12", "filter": {"slotKey": "-4", "signature": "onActionStart(right)", "args": [{"value": "right"}]}, "code": "rollInput = rollInput + 1"}, {"key": "13", "filter": {"slotKey": "-4", "signature": "onActionStop(right)", "args": [{"value": "right"}]}, "code": "rollInput = rollInput - 1"}, {"key": "14", "filter": {"slotKey": "-4", "signature": "onActionStart(straferight)", "args": [{"value": "straferight"}]}, "code": "Nav.axisCommandManager:updateCommandFromActionStart(axisCommandId.lateral, 1.0)"}, {"key": "15", "filter": {"slotKey": "-4", "signature": "onActionStop(straferight)", "args": [{"value": "straferight"}]}, "code": "Nav.axisCommandManager:updateCommandFromActionStop(axisCommandId.lateral, -1.0)"}, {"key": "16", "filter": {"slotKey": "-4", "signature": "onActionStart(strafeleft)", "args": [{"value": "strafeleft"}]}, "code": "Nav.axisCommandManager:updateCommandFromActionStart(axisCommandId.lateral, -1.0)"}, {"key": "17", "filter": {"slotKey": "-4", "signature": "onActionStop(strafeleft)", "args": [{"value": "strafeleft"}]}, "code": "Nav.axisCommandManager:updateCommandFromActionStop(axisCommandId.lateral, 1.0)"}, {"key": "18", "filter": {"slotKey": "-4", "signature": "onActionStart(up)", "args": [{"value": "up"}]}, "code": "Nav.axisCommandManager:deactivateGroundEngineAltitudeStabilization()\nNav.axisCommandManager:updateCommandFromActionStart(axisCommandId.vertical, 1.0)\n"}, {"key": "19", "filter": {"slotKey": "-4", "signature": "onActionStop(up)", "args": [{"value": "up"}]}, "code": "Nav.axisCommandManager:updateCommandFromActionStop(axisCommandId.vertical, -1.0)\nNav.axisCommandManager:activateGroundEngineAltitudeStabilization(currentGroundAltitudeStabilization)\n"}, {"key": "20", "filter": {"slotKey": "-4", "signature": "onActionStart(down)", "args": [{"value": "down"}]}, "code": "Nav.axisCommandManager:deactivateGroundEngineAltitudeStabilization()\nNav.axisCommandManager:updateCommandFromActionStart(axisCommandId.vertical, -1.0)\n"}, {"key": "21", "filter": {"slotKey": "-4", "signature": "onActionStop(down)", "args": [{"value": "down"}]}, "code": "Nav.axisCommandManager:updateCommandFromActionStop(axisCommandId.vertical, 1.0)\nNav.axisCommandManager:activateGroundEngineAltitudeStabilization(currentGroundAltitudeStabilization)\n"}, {"key": "22", "filter": {"slotKey": "-4", "signature": "onActionStart(groundaltitudeup)", "args": [{"value": "groundaltitudeup"}]}, "code": "Nav.axisCommandManager:updateTargetGroundAltitudeFromActionStart(1.0)"}, {"key": "23", "filter": {"slotKey": "-4", "signature": "onActionLoop(groundaltitudeup)", "args": [{"value": "groundaltitudeup"}]}, "code": "Nav.axisCommandManager:updateTargetGroundAltitudeFromActionLoop(1.0)"}, {"key": "24", "filter": {"slotKey": "-4", "signature": "onActionStart(groundaltitudedown)", "args": [{"value": "groundaltitudedown"}]}, "code": "Nav.axisCommandManager:updateTargetGroundAltitudeFromActionStart(-1.0)"}, {"key": "25", "filter": {"slotKey": "-4", "signature": "onActionLoop(groundaltitudedown)", "args": [{"value": "groundaltitudedown"}]}, "code": "Nav.axisCommandManager:updateTargetGroundAltitudeFromActionLoop(-1.0)"}, {"key": "26", "filter": {"slotKey": "-4", "signature": "onActionStart(yawright)", "args": [{"value": "yawright"}]}, "code": "yawInput = yawInput - 1"}, {"key": "27", "filter": {"slotKey": "-4", "signature": "onActionStop(yawright)", "args": [{"value": "yawright"}]}, "code": "yawInput = yawInput + 1"}, {"key": "28", "filter": {"slotKey": "-4", "signature": "onActionStart(yawleft)", "args": [{"value": "yawleft"}]}, "code": "yawInput = yawInput + 1"}, {"key": "29", "filter": {"slotKey": "-4", "signature": "onActionStop(yawleft)", "args": [{"value": "yawleft"}]}, "code": "yawInput = yawInput - 1"}, {"key": "30", "filter": {"slotKey": "-4", "signature": "onActionStart(brake)", "args": [{"value": "brake"}]}, "code": "brakeInput = brakeInput + 1\nlocal longitudinalCommandType = Nav.axisCommandManager:getAxisCommandType(axisCommandId.longitudinal)\nif (longitudinalCommandType == axisCommandType.byTargetSpeed) then\n local targetSpeed = Nav.axisCommandManager:getTargetSpeed(axisCommandId.longitudinal)\n if (math.abs(targetSpeed) > constants.epsilon) then\n Nav.axisCommandManager:updateCommandFromActionStart(axisCommandId.longitudinal, - utils.sign(targetSpeed))\n end\nend\n"}, {"key": "31", "filter": {"slotKey": "-4", "signature": "onActionStop(brake)", "args": [{"value": "brake"}]}, "code": "brakeInput = brakeInput - 1"}, {"key": "32", "filter": {"slotKey": "-4", "signature": "onActionLoop(brake)", "args": [{"value": "brake"}]}, "code": "local longitudinalCommandType = Nav.axisCommandManager:getAxisCommandType(axisCommandId.longitudinal)\nif (longitudinalCommandType == axisCommandType.byTargetSpeed) then\n local targetSpeed = Nav.axisCommandManager:getTargetSpeed(axisCommandId.longitudinal)\n if (math.abs(targetSpeed) > constants.epsilon) then\n Nav.axisCommandManager:updateCommandFromActionLoop(axisCommandId.longitudinal, - utils.sign(targetSpeed))\n end\nend\n"}, {"key": "33", "filter": {"slotKey": "-4", "signature": "onActionStart(booster)", "args": [{"value": "booster"}]}, "code": "Nav:toggleBoosters()"}, {"key": "34", "filter": {"slotKey": "-4", "signature": "onActionStart(stopengines)", "args": [{"value": "stopengines"}]}, "code": "Nav.axisCommandManager:resetCommand(axisCommandId.longitudinal)"}, {"key": "35", "filter": {"slotKey": "-4", "signature": "onActionStart(speedup)", "args": [{"value": "speedup"}]}, "code": "Nav.axisCommandManager:updateCommandFromActionStart(axisCommandId.longitudinal, 5.0)"}, {"key": "36", "filter": {"slotKey": "-4", "signature": "onActionLoop(speedup)", "args": [{"value": "speedup"}]}, "code": "Nav.axisCommandManager:updateCommandFromActionLoop(axisCommandId.longitudinal, 1.0)"}, {"key": "37", "filter": {"slotKey": "-4", "signature": "onActionStart(speeddown)", "args": [{"value": "speeddown"}]}, "code": "Nav.axisCommandManager:updateCommandFromActionStart(axisCommandId.longitudinal, -5.0)"}, {"key": "38", "filter": {"slotKey": "-4", "signature": "onActionLoop(speeddown)", "args": [{"value": "speeddown"}]}, "code": "Nav.axisCommandManager:updateCommandFromActionLoop(axisCommandId.longitudinal, -1.0)"}, {"key": "39", "filter": {"slotKey": "-4", "signature": "onActionStart(antigravity)", "args": [{"value": "antigravity"}]}, "code": "if antigrav ~= nil then antigrav.toggle() end"}], "methods": [], "events": []}