@@ -298,7 +298,7 @@ function TravelWindow:Constructor()
298
298
end
299
299
300
300
Plugins [" Travel Window II" ].Load = function (sender , args )
301
- Turbine .Shell .WriteLine (" <u><rgb=#DAA520>Travel Window II v " .. Plugins [" Travel Window II" ]:GetVersion () .. " by Hyoss</rgb></u>" );
301
+ Turbine .Shell .WriteLine (" <u><rgb=#DAA520>Travel Window II " .. Plugins [" Travel Window II" ]:GetVersion () .. " by Hyoss</rgb></u>" );
302
302
end
303
303
end
304
304
341
341
342
342
function TravelWindow :LoadSettings ()
343
343
-- load the self.settings
344
- -- If a value is not available, set a default value
344
+ -- if a value is not available, set a default value
345
345
346
346
-- load TWII settings file
347
347
pcall (function ()
@@ -743,7 +743,7 @@ function TravelWindow:SetShortcuts()
743
743
TravelShortcuts = {};
744
744
local shortcutIndex = 1 ;
745
745
746
- -- set the travel skills for free people
746
+ -- set the either the travel skills for free people or monsters
747
747
if (PlayerAlignment == Turbine .Gameplay .Alignment .FreePeople ) then
748
748
-- set the generic travel items
749
749
for i = 1 , travelCount [3 ], 1 do
@@ -774,12 +774,12 @@ function TravelWindow:SetShortcuts()
774
774
-- add the race travel to the list
775
775
local racialShortcutIndex = self :TableIndex (settings .order , racialLocations :IdAtIndex (settings .playerRaceKey ));
776
776
table.insert (TravelShortcuts , TravelShortcut (6.0 ,
777
- racialLocations :IdAtIndex (settings .playerRaceKey ),
778
- racialLocations :NameAtIndex (settings .playerRaceKey ),
779
- 2 ,
780
- racialShortcutIndex ,
781
- settings .enabled [racialLocations :IdAtIndex (settings .playerRaceKey )],
782
- racialLocations :LabelAtIndex (settings .playerRaceKey )));
777
+ racialLocations :IdAtIndex (settings .playerRaceKey ),
778
+ racialLocations :NameAtIndex (settings .playerRaceKey ),
779
+ 2 ,
780
+ racialShortcutIndex ,
781
+ settings .enabled [racialLocations :IdAtIndex (settings .playerRaceKey )],
782
+ racialLocations :LabelAtIndex (settings .playerRaceKey )));
783
783
784
784
-- set the reputation travel items
785
785
for i = 1 , travelCount [4 ], 1 do
@@ -1035,16 +1035,14 @@ function TravelWindow:TableIndex(tableToSearch, elementToSearchFor)
1035
1035
end
1036
1036
1037
1037
function TravelWindow :SortShortcuts ()
1038
- -- ensure we have more than 2 shortcuts
1038
+ -- do not sort if there is one or less shortcuts
1039
1039
if # TravelShortcuts < 2 then
1040
- Turbine .Engine .WriteLine (" Table does not have enough data in it" );
1041
1040
return ;
1042
1041
end
1043
1042
1044
- -- perform the bubble sort
1043
+ -- perform a bubble sort
1045
1044
for i = 1 , # TravelShortcuts do
1046
1045
for j = 2 , # TravelShortcuts do
1047
-
1048
1046
-- if the index of the second shortcut is lower than the index of
1049
1047
-- the first, switch the shortcuts
1050
1048
if TravelShortcuts [j ]:GetIndex () < TravelShortcuts [j - 1 ]:GetIndex () then
0 commit comments