From 3ff8d4fe100c8154ef469dbba90fa7bf7bae1263 Mon Sep 17 00:00:00 2001 From: LemADEC Date: Sat, 15 Aug 2015 16:41:41 +0200 Subject: [PATCH] Improved ship controller boot time slightly Remaining is up to the players to tweak out :) --- .../warpdriveShipController/startup | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveShipController/startup b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveShipController/startup index 79e8b0b85..6c7288b88 100644 --- a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveShipController/startup +++ b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveShipController/startup @@ -271,8 +271,8 @@ end function SetDimensions() Clear() - sleep(0.3) ShowTitle("<==== Set dimensions ====>") + sleep(0.3) term.write(" Front ("..GFront..") : ") GFront = tonumber(read()) term.write(" Right ("..GRight..") : ") @@ -401,21 +401,23 @@ GFront, GRight, GUp = warp.dim_positive() GBack, GLeft, GDown = warp.dim_negative() IsInHyper = warp.isInHyperspace() repeat - pos = warp.pos() sleep(0.3) + pos = warp.pos() until pos ~= nil print("Ship core detected...") X, Y, Z = warp.pos() + repeat - isAttached = warp.isAttached() sleep(0.3) -until isAttached ~= false + isAttached = warp.isAttached() +until not isAttached print("Ship core linked...") repeat - Weight = warp.getShipSize() sleep(0.3) -until Weight ~= nil + Weight = warp.getShipSize() +until Weight ~= nil +print("Ship weight updated...") CalcRealDistance()