{"events":[],"handlers":[{"code":"Script.system:update()","filter":{"args":[],"signature":"onUpdate()","slotKey":"-4"},"key":"9"},{"code":"Script.system:inputText(text)","filter":{"args":[{"variable":"*"}],"signature":"onInputText(text)","slotKey":"-4"},"key":"10"},{"code":"Script.system:flush()","filter":{"args":[],"signature":"onFlush()","slotKey":"-4"},"key":"11"},{"code":"Script.system:actionStop(action)","filter":{"args":[{"variable":"*"}],"signature":"onActionStop(action)","slotKey":"-4"},"key":"12"},{"code":"Script.system:actionStart(action)","filter":{"args":[{"variable":"*"}],"signature":"onActionStart(action)","slotKey":"-4"},"key":"13"},{"code":"Script.system:actionLoop(action)","filter":{"args":[{"variable":"*"}],"signature":"onActionLoop(action)","slotKey":"-4"},"key":"14"},{"code":"Script.player:parentChanged(oldId, newId)","filter":{"args":[{"variable":"*"},{"variable":"*"}],"signature":"onParentChanged(oldId,newId)","slotKey":"-3"},"key":"3"},{"code":"Script.construct:VRStationEntered(id)","filter":{"args":[{"variable":"*"}],"signature":"onVRStationEntered(id)","slotKey":"-2"},"key":"4"},{"code":"Script.construct:undocked(id)","filter":{"args":[{"variable":"*"}],"signature":"onUndocked(id)","slotKey":"-2"},"key":"5"},{"code":"Script.construct:PvPTimer(active)","filter":{"args":[{"variable":"*"}],"signature":"onPvPTimer(active)","slotKey":"-2"},"key":"6"},{"code":"Script.construct:playerBoarded(id)","filter":{"args":[{"variable":"*"}],"signature":"onPlayerBoarded(id)","slotKey":"-2"},"key":"7"},{"code":"Script.construct:constructDocked(id)","filter":{"args":[{"variable":"*"}],"signature":"onConstructDocked(id)","slotKey":"-2"},"key":"8"},{"code":"Script.unit:timer(tag)","filter":{"args":[{"variable":"*"}],"signature":"onTimer(tag)","slotKey":"-1"},"key":"0"},{"code":"Script.unit:stop()","filter":{"args":[],"signature":"onStop()","slotKey":"-1"},"key":"1"},{"code":"--[[\r\n DU-ELEVATOR by Jericho\r\n]]\r\n\r\n--[[\r\n Bookmarks: you can store several altitudes here to navigate easily\r\n]]\r\nlocal Bookmarks = {\r\n { name = 'Start Point', altitude = 294 },\r\n { name = 'Hovering', altitude = 300 },\r\n { name = 'Floor 1', altitude = 350 },\r\n { name = 'Floor 2', altitude = 500 },\r\n { name = 'Space 1', altitude = 5000 },\r\n { name = 'Space 2', altitude = 6000 },\r\n { name = 'Space 3', altitude = 10000 },\r\n { name = 'Space 4', altitude = 20000 },\r\n { name = 'Space 5', altitude = 50000 },\r\n { name = 'Space 6', altitude = 200000 },\r\n}\r\n\r\n--[[\r\n LUA PARAMETERS\r\n]]\r\n__DEBUG = false --export: Debug mode, will print more information in the console\r\nShowParentingWidget = false --export: Show the parenting widget\r\nShowControlUnitWidget = false --export: show the default widget of the construct\r\nDisplayAtlasData = true --export: show the Atlas widget with closest planet informations\r\n\r\n--[[\r\n HUD Rendering\r\n]]\r\nfunction RENDER_HUD(ElevatorData)\r\n --[[\r\n That function is used for rendering the HUD,\r\n You can update it or replace all its content to customise it.\r\n You can also remove its content if you don't want a HUD.\r\n It's not affecting in any way how the elevator is working and it's just a display\r\n \r\n ElevatorData is an object containing values that are refresh all the time.\r\n ElevatorData.isBreaking - boolean - if the brakes a are enabled or not.\r\n ElevatorData.verticalSpeed - number - the absolute vertical speed of the elevator in m/s.\r\n ElevatorData.verticalSpeedSigned - number - the real vertical speed of the elevator in m/s. if <0 the elevator is falling.\r\n ElevatorData.lateralSpeed - numver - the absolute lateral speed of the elevator in m/s.\r\n ElevatorData.longitudinalSpeed - number - the absolute Longitudinal speed of the elevator in m/s.\r\n ElevatorData.coreAltitude - number - the altitude from sea level returned by the core in meters. (warning: this altitude in space when far from planets is 0)\r\n ElevatorData.altitude - number - computed altitude from the distance between the construct and the sea level of the closest planet. (not 0 when in space)\r\n ElevatorData.atmosphereDistance - number - computed distance from the construct to the atmosphere of the closest planet\r\n ElevatorData.atmosphereAltitude - number - computed altitude of the atmosphere of the closest planet.\r\n ElevatorData.atmoMaxSpeed - number - the maximum speed of the elevator in m/s when in atmosphere. (anti burn security)\r\n ElevatorData.currentMaxSpeed - number - the maximum speed of the elevator in m/s. (50km/h in space)\r\n ElevatorData.planetData - table - Atlas Data of the closest planet. See atlas in game file for the structure (Game Directory\\data\\lua\\atlas.lua)\r\n ]]\r\n --locale for Translation\r\n local locale = system.getLocale()\r\n localeIndex = 1 --default to english\r\n if locale == 'fr-FR' then\r\n localeIndex = 2 --french index in atlas\r\n elseif locale == 'de-DE' then\r\n localeIndex = 3 --german index in atlas\r\n end\r\n --direction if the elevator from the speed\r\n local direction = 'Stabilizing'\r\n if ElevatorData.verticalSpeedSigned > 0 then\r\n direction = 'Up'\r\n elseif ElevatorData.verticalSpeedSigned < 0 then\r\n direction = 'Down'\r\n end\r\n --braking status text for hud\r\n local brakeStatus = 'Off'\r\n if ElevatorData.isBreaking then\r\n brakeStatus = 'On'\r\n end\r\n --html rendering\r\n local html = [[\r\n \r\n