diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index a2a8116..64d7af8 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -259,19 +259,19 @@ local function IsCombinationAvailable( sCombination, nUnloadPos, bSquareSection) end -- ADVANCED : come BASIC ma ammesse anche le prerotazioni (posizione di scarico può essere diversa da posizione iniziale) elseif BEAM.Rotation.bAdvanced then - local Rotation90 = EgtIf( nUnloadPos + 1 > 4, nUnloadPos + 1 - 4, nUnloadPos + 1) - local Rotation180 = EgtIf( nUnloadPos + 2 > 4, nUnloadPos + 2 - 4, nUnloadPos + 2) - local ExtraRotation = EgtIf( nUnloadPos + 3 > 4, nUnloadPos + 3 - 4, nUnloadPos + 3) + local nRotation90 = EgtIf( nUnloadPos + 1 > 4, nUnloadPos + 1 - 4, nUnloadPos + 1) + local nRotation180 = EgtIf( nUnloadPos + 2 > 4, nUnloadPos + 2 - 4, nUnloadPos + 2) + local nExtraRotation = EgtIf( nUnloadPos + 3 > 4, nUnloadPos + 3 - 4, nUnloadPos + 3) if not bSquareSection and ( nUnloadPos == 2 or nUnloadPos == 4) then return false else - if string.sub( sCombination, nUnloadPos, nUnloadPos) ~= '1' or string.sub( sCombination, ExtraRotation, ExtraRotation) == '1' then + if string.sub( sCombination, nUnloadPos, nUnloadPos) ~= '1' or string.sub( sCombination, nExtraRotation, nExtraRotation) == '1' then return false else - if not BeamData.ROT90 and string.sub( sCombination, Rotation90, Rotation90) == '1' then + if not BeamData.ROT90 and string.sub( sCombination, nRotation90, nRotation90) == '1' then return false - elseif not BeamData.ROT180 and string.sub( sCombination, Rotation180, Rotation180) == '1' then + elseif not BeamData.ROT180 and string.sub( sCombination, nRotation180, nRotation180) == '1' then return false else return true