From 15b645f2baf8ea55cb865ee6a9f2173ca78024a8 Mon Sep 17 00:00:00 2001 From: LemADEC Date: Sat, 30 Jul 2016 15:46:03 +0200 Subject: [PATCH] Fixed default label not showing up on first boot --- .../warpdriveEnanReactorCore/startup | 1 + .../lua.ComputerCraft/warpdriveMainframe/startup | 12 ++++++++---- .../warpdriveShipController/startup | 12 ++++++++---- .../warpdriveWeaponController/startup | 1 + .../warpdriveShipController/autorun.lua | 11 +++++++---- 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveEnanReactorCore/startup b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveEnanReactorCore/startup index 94ed2938..52bf8761 100644 --- a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveEnanReactorCore/startup +++ b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveEnanReactorCore/startup @@ -269,6 +269,7 @@ function readInputText(currentValue) local inputAbort = false local input = string.format(currentValue) local x, y = term.getCursorPos() + Write(input) os.pullEventRaw() -- skip first char event repeat ClearWarning() diff --git a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveMainframe/startup b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveMainframe/startup index 89168d3b..dec3c0bc 100644 --- a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveMainframe/startup +++ b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveMainframe/startup @@ -291,6 +291,7 @@ function readInputText(currentValue) local inputAbort = false local input = string.format(currentValue) local x, y = term.getCursorPos() + Write(input) os.pullEventRaw() -- skip first char event repeat ClearWarning() @@ -904,8 +905,8 @@ function core_page_setMovement() SetCursorPos(1, 3) core_movement[1] = core_page_setDistanceAxis(2, "Forward" , "Front", "Back", core_movement[1], math.abs(core_front + core_back + 1)) - core_movement[2] = core_page_setDistanceAxis(3, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1)) - core_movement[3] = core_page_setDistanceAxis(4, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1)) + core_movement[2] = core_page_setDistanceAxis(4, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1)) + core_movement[3] = core_page_setDistanceAxis(6, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1)) core_movement = { ship.movement(core_movement[1], core_movement[2], core_movement[3]) } end @@ -914,10 +915,13 @@ function core_page_setDistanceAxis(line, axis, positive, negative, userEntry, sh if core_isInHyper and line ~= 3 then maximumDistance = shipLength + 127 * 100 end - SetCursorPos(1, line + 1) + SetColorDisabled() + SetCursorPos(3, line + 1) Write(positive .. " is " .. ( shipLength + 1) .. ", maximum is " .. maximumDistance .. " ") - SetCursorPos(1, line + 2) + SetCursorPos(3, line + 2) Write(negative .. " is " .. (-shipLength - 1) .. ", maximum is " .. -maximumDistance .. " ") + + SetColorDefault() repeat SetCursorPos(1, line) Write(axis .. " movement: ") diff --git a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveShipController/startup b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveShipController/startup index bc362e17..dbe310b0 100644 --- a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveShipController/startup +++ b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveShipController/startup @@ -269,6 +269,7 @@ function readInputText(currentValue) local inputAbort = false local input = string.format(currentValue) local x, y = term.getCursorPos() + Write(input) os.pullEventRaw() -- skip first char event repeat ClearWarning() @@ -611,8 +612,8 @@ function core_page_setMovement() SetCursorPos(1, 3) core_movement[1] = core_page_setDistanceAxis(2, "Forward" , "Front", "Back", core_movement[1], math.abs(core_front + core_back + 1)) - core_movement[2] = core_page_setDistanceAxis(3, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1)) - core_movement[3] = core_page_setDistanceAxis(4, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1)) + core_movement[2] = core_page_setDistanceAxis(4, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1)) + core_movement[3] = core_page_setDistanceAxis(6, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1)) core_movement = { ship.movement(core_movement[1], core_movement[2], core_movement[3]) } end @@ -621,10 +622,13 @@ function core_page_setDistanceAxis(line, axis, positive, negative, userEntry, sh if core_isInHyper and line ~= 3 then maximumDistance = shipLength + 127 * 100 end - SetCursorPos(1, line + 1) + SetColorDisabled() + SetCursorPos(3, line + 1) Write(positive .. " is " .. ( shipLength + 1) .. ", maximum is " .. maximumDistance .. " ") - SetCursorPos(1, line + 2) + SetCursorPos(3, line + 2) Write(negative .. " is " .. (-shipLength - 1) .. ", maximum is " .. -maximumDistance .. " ") + + SetColorDefault() repeat SetCursorPos(1, line) Write(axis .. " movement: ") diff --git a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveWeaponController/startup b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveWeaponController/startup index cb16c73e..860c6ebe 100644 --- a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveWeaponController/startup +++ b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveWeaponController/startup @@ -269,6 +269,7 @@ function readInputText(currentValue) local inputAbort = false local input = string.format(currentValue) local x, y = term.getCursorPos() + Write(input) os.pullEventRaw() -- skip first char event repeat ClearWarning() diff --git a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveShipController/autorun.lua b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveShipController/autorun.lua index 4c39905e..1b846fcd 100644 --- a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveShipController/autorun.lua +++ b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveShipController/autorun.lua @@ -564,8 +564,8 @@ function core_page_setMovement() SetCursorPos(1, 3) core_movement[1] = core_page_setDistanceAxis(2, "Forward" , "Front", "Back", core_movement[1], math.abs(core_front + core_back + 1)) - core_movement[2] = core_page_setDistanceAxis(3, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1)) - core_movement[3] = core_page_setDistanceAxis(4, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1)) + core_movement[2] = core_page_setDistanceAxis(4, "Vertical", "Up" , "Down", core_movement[2], math.abs(core_up + core_down + 1)) + core_movement[3] = core_page_setDistanceAxis(6, "Lateral" , "Right", "Left", core_movement[3], math.abs(core_left + core_right + 1)) core_movement = { ship.movement(core_movement[1], core_movement[2], core_movement[3]) } end @@ -574,10 +574,13 @@ function core_page_setDistanceAxis(line, axis, positive, negative, userEntry, sh if core_isInHyper and line ~= 3 then maximumDistance = shipLength + 127 * 100 end - SetCursorPos(1, line + 1) + SetColorDisabled() + SetCursorPos(3, line + 1) Write(positive .. " is " .. ( shipLength + 1) .. ", maximum is " .. maximumDistance .. " ") - SetCursorPos(1, line + 2) + SetCursorPos(3, line + 2) Write(negative .. " is " .. (-shipLength - 1) .. ", maximum is " .. -maximumDistance .. " ") + + SetColorDefault() repeat SetCursorPos(1, line) Write(axis .. " movement: ")