Skip to content

Commit 908488c

Browse files
authored
v1.0.19updates (#102)
* adding lua formatter config * updated formatting * updated formatting of maps files * updated formatting ob tabs files * updated formatting of main files * updated more formatting * added option to hide window on travel skill use * changed order of options in general options panel * fixed buggy behaviour on pressing escape and f12 * fixed whitespace * renamed two global variables * some beta19 preparation changes * renamed global variable * Added port to Thorenhad * adding metadata
1 parent 37939e8 commit 908488c

28 files changed

+615
-578
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## v1.0.19beta
4+
- added new option to close Travel Window when using a travel skill regardless of window mode
5+
- updated behaviour of Travel Window when using function key and escape to hide the UI, should now handle all cases correctly
6+
- added Tornhad travel skills
7+
- fixed many French Warden skills that were renamed by SSG
38
## v1.0.18beta
49
- fixed changed Gundabad translations for FR
510
## v1.0.17beta

TravelWindowII.plugin

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Information>
44
<Name>Travel Window II</Name>
55
<Author>Hyoss</Author>
6-
<Version>v1.0.18beta</Version>
6+
<Version>v1.0.19beta</Version>
77
<Description>
88
This plugin creates a single window that contains all the available travel skills, including the race, class and reputation skills.
99
It is a further development of Travel Window, that has been worked on by multiple authors before.
@@ -13,6 +13,5 @@ Please report bugs and feature requests at Lotrointeface or GitHub.
1313
<Image>TravelWindowII/src/resources/travel.tga</Image>
1414
</Information>
1515
<Package>TravelWindowII.src.Main</Package>
16-
<Configuration Apartment="TravelWindowII">
17-
</Configuration>
16+
<Configuration Apartment="TravelWindowII"/>
1817
</Plugin>

TravelWindowII.plugincompendium

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PluginConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
33
<Id>1113</Id>
44
<Name>Travel Window II</Name>
5-
<Version>v1.0.18beta</Version>
5+
<Version>v1.0.19beta</Version>
66
<Author>Hyoss</Author>
77
<InfoUrl>http://www.lotrointerface.com/downloads/info1113</InfoUrl>
88
<DownloadUrl>http://www.lotrointerface.com/downloads/download1113</DownloadUrl>

doc/lotroforums.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
A new version is available!
22

3-
v1.0.18beta
4-
- fixed changed Gundabad translations for FR
3+
- added new option to close Travel Window when using a travel skill regardless of window mode
4+
- updated behaviour of Travel Window when using function key and escape to hide the UI, should now handle all cases correctly
5+
- added Tornhad travel skills
6+
- fixed many French Warden skills that were renamed by SSG
57

68
Download it at [url=https://www.lotrointerface.com/downloads/fileinfo.php?id=1113]Lotrointerface[/url], [url=https://github.com/wduda/TravelWindowII/releases]GitHub[/url], via [url=https://github.com/JeremyStepp/OneLauncher]OneLauncher[/url] or via [url=https://www.lotrointerface.com/downloads/info663-LOTROPluginCompendium.html]Plugin Compendium[/url].

doc/lotrointerface.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ This plugin creates a single window that contains available travel skills, inclu
22

33
[B]Since this plugin is a 100% replacement for "Travel Window" you should not have both enabled at the same time. You can keep them both installed though.[/B]
44

5+
The plugin has four modes of operation - icon grid, text list, pulldown list and carousel. These can be switched from the menu that opens when you right-click the plugin. This menu also gives you access to the options window.
6+
57
[SIZE="3"]Installation:[/SIZE]
68
This is a full plugin and can be installed standalone. Follow the general plugin installation instructions to install Travel Window II or update the install (depends on your OS).
79
I recommend you install and manage your plugins with the LOTRO Plugin Compendium found at this URL, since it will install plugins cleanly and take care of installing the Turbine utilities for you: [URL="http://www.lotrointerface.com/downloads/info663-LOTROPluginCompendium.html"]LOTRO Plugin Compendium App[/URL]
@@ -27,7 +29,7 @@ Why does my racial skill show up even though I do not have the racial trait equi
2729

2830
Why does a reputation or store version of my racial skill show up even though I have not obtained or bought it?
2931
[LIST]
30-
[*]This is because the racial and those store-bought skills have identical names ingame (i.e. "Return to Bree") and the plugin obtains a list of learned skills that includes that name at least once. Based on that name alone the plugin cannot know which of the two skills you have obtained, while you can get both through the Racial+Store combo. You can use the Enable/Disable options to hide the skill you do not have that is greyed out.
32+
[*]This is because the racial and those store-bought skills have identical names ingame (i.e. "Return to Bree") and the plugin obtains a list of learned skills for your character that includes that particular name at least once. Based on that name alone the plugin cannot know which of the two skills you have obtained, while you can get both through the Racial+Store combo. You can use the Enable/Disable options to hide the skill you do not have that is greyed out.
3133
[/LIST]
3234

3335
How to handle the settings reset introduced by v1.0.7beta?
@@ -41,7 +43,10 @@ How to handle the settings reset introduced by v1.0.7beta?
4143
[/LIST]
4244

4345
Version history:
44-
v1.0.18beta
45-
- fixed changed Gundabad translations for FR
46+
v1.0.19beta
47+
- added new option to close Travel Window when using a travel skill regardless of window mode
48+
- updated behaviour of Travel Window when using function key and escape to hide the UI, should now handle all cases correctly
49+
- added Tornhad travel skills
50+
- fixed many French Warden skills that were renamed by SSG
4651

4752
Rest of changelog found [URL="https://github.com/wduda/TravelWindowII/blob/master/CHANGELOG.md"]here[/URL].

src/.lua-format-config

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
column_limit: 120
2+
keep_simple_control_block_one_line: false
3+
keep_simple_function_one_line: false
4+
align_args: true
5+
chop_down_parameter: true

src/EriadorMapWindow.lua

+16-29
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ function EriadorMapWindow:Constructor(parent, class, race, shortcuts)
2828
self.quickslots = {};
2929

3030
-- set the default window settings
31-
self:SetPosition(self.windowWidth / 2 - self.width / 2,
32-
self.windowHeight / 2 - self.height / 2);
31+
self:SetPosition(self.windowWidth / 2 - self.width / 2, self.windowHeight / 2 - self.height / 2);
3332
self:SetSize(self.width, self.height);
3433
self:SetBlendMode(Turbine.UI.BlendMode.Undefined);
3534
self:SetBackColor(Turbine.UI.Color(0.0, 0, 0, 0));
@@ -93,7 +92,6 @@ function EriadorMapWindow:Constructor(parent, class, race, shortcuts)
9392
{-1, -1}, -- U30 B
9493
{-1, -1}, -- U31 A
9594
{-1, -1}, -- U31 B
96-
9795
-- Warden skills
9896
{725, 400}, -- Ost Guruth
9997
{650, 280}, -- Esteldin
@@ -135,7 +133,6 @@ function EriadorMapWindow:Constructor(parent, class, race, shortcuts)
135133
{-1, -1}, -- U30 B
136134
{-1, -1}, -- U31 A
137135
{-1, -1}, -- U31 B
138-
139136
-- Reputation skills
140137
{305, 330}, -- Thorin's Hall
141138
{595, 400}, -- Bree
@@ -181,7 +178,6 @@ function EriadorMapWindow:Constructor(parent, class, race, shortcuts)
181178
{-1, -1}, -- U31 A
182179
{-1, -1}, -- U31 B
183180
{-1, -1}, -- U31 C
184-
185181
-- Racial skills
186182
{620, 400}, -- Bree
187183
{445, 415}, -- Michel Delving
@@ -201,7 +197,9 @@ function EriadorMapWindow:Constructor(parent, class, race, shortcuts)
201197
-- have the main window close the options
202198
self.VisibleChanged = function(sender, args)
203199
if (self:IsVisible() == false) then
204-
if (parent ~= nil) then parent:CloseEriadorMap(); end
200+
if (parent ~= nil) then
201+
parent:CloseEriadorMap();
202+
end
205203
end
206204
end
207205

@@ -216,12 +214,9 @@ function EriadorMapWindow:AddShortcuts()
216214
for i = 1, travelCount[1], 1 do
217215

218216
-- add hunter locations if they should be on this map
219-
if (self.mapLocations[counter][1] > 0 and self.PlayerClass ==
220-
Turbine.Gameplay.Class.Hunter and
217+
if (self.mapLocations[counter][1] > 0 and self.PlayerClass == Turbine.Gameplay.Class.Hunter and
221218
self:IsShortcutEnabled(hunterLocations:IdAtIndex(i)) == 1) then
222-
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0,
223-
hunterLocations:IdAtIndex(
224-
i)));
219+
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0, hunterLocations:IdAtIndex(i)));
225220
end
226221

227222
counter = counter + 1;
@@ -231,12 +226,9 @@ function EriadorMapWindow:AddShortcuts()
231226
for i = 1, travelCount[2], 1 do
232227

233228
-- add warden locations if they should be on this map
234-
if (self.mapLocations[counter][1] > 0 and self.PlayerClass ==
235-
Turbine.Gameplay.Class.Warden and
229+
if (self.mapLocations[counter][1] > 0 and self.PlayerClass == Turbine.Gameplay.Class.Warden and
236230
self:IsShortcutEnabled(wardenLocations:IdAtIndex(i)) == 1) then
237-
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0,
238-
wardenLocations:IdAtIndex(
239-
i)));
231+
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0, wardenLocations:IdAtIndex(i)));
240232
end
241233

242234
counter = counter + 1;
@@ -246,11 +238,8 @@ function EriadorMapWindow:AddShortcuts()
246238
for i = 1, travelCount[4], 1 do
247239

248240
-- add rep locations if they should be on this map
249-
if (self.mapLocations[counter][1] > 0 and
250-
self:IsShortcutEnabled(repLocations:IdAtIndex(i)) == 1) then
251-
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0,
252-
repLocations:IdAtIndex(
253-
i)));
241+
if (self.mapLocations[counter][1] > 0 and self:IsShortcutEnabled(repLocations:IdAtIndex(i)) == 1) then
242+
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0, repLocations:IdAtIndex(i)));
254243
end
255244

256245
counter = counter + 1;
@@ -259,12 +248,9 @@ function EriadorMapWindow:AddShortcuts()
259248
-- racial locations
260249
for i = 1, travelCount[5], 1 do
261250

262-
if (self.mapLocations[counter][1] > 0 and
263-
self:IsShortcutEnabled(racialLocations:IdAtIndex(i)) == 1) then
251+
if (self.mapLocations[counter][1] > 0 and self:IsShortcutEnabled(racialLocations:IdAtIndex(i)) == 1) then
264252
if (i == self.PlayerRace) then
265-
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0,
266-
racialLocations:IdAtIndex(
267-
i)));
253+
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0, racialLocations:IdAtIndex(i)));
268254
end
269255
end
270256

@@ -296,8 +282,7 @@ function EriadorMapWindow:AddSingleShortcut(index, shortcut)
296282

297283
self.quickslots[index]:SetStretchMode(1);
298284
self.quickslots[index]:SetSize(22, 22);
299-
self.quickslots[index]:SetPosition(self.mapLocations[index][1],
300-
self.mapLocations[index][2]);
285+
self.quickslots[index]:SetPosition(self.mapLocations[index][1], self.mapLocations[index][2]);
301286
self.quickslots[index]:SetZOrder(98);
302287
self.quickslots[index]:SetVisible(true);
303288

@@ -311,7 +296,9 @@ function EriadorMapWindow:IsShortcutEnabled(id)
311296
-- loop through all the shortcuts and add those that are enabled
312297
for i = 1, #self.shortcuts, 1 do
313298
if (self.shortcuts[i]:GetData() == id) then
314-
if (self.shortcuts[i]:IsEnabled()) then return 1; end
299+
if (self.shortcuts[i]:IsEnabled()) then
300+
return 1;
301+
end
315302
end
316303
end
317304

src/GondorMapWindow.lua

+16-29
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ function GondorMapWindow:Constructor(parent, class, race, shortcuts)
2828
self.quickslots = {};
2929

3030
-- set the default window settings
31-
self:SetPosition(self.windowWidth / 2 - self.width / 2,
32-
self.windowHeight / 2 - self.height / 2);
31+
self:SetPosition(self.windowWidth / 2 - self.width / 2, self.windowHeight / 2 - self.height / 2);
3332
self:SetSize(self.width, self.height);
3433
self:SetBlendMode(Turbine.UI.BlendMode.Undefined);
3534
self:SetBackColor(Turbine.UI.Color(0.0, 0, 0, 0));
@@ -93,7 +92,6 @@ function GondorMapWindow:Constructor(parent, class, race, shortcuts)
9392
{-1, -1}, -- U30 B
9493
{-1, -1}, -- U31 A
9594
{-1, -1}, -- U31 B
96-
9795
-- Muster skills
9896
{-1, -1}, -- Ost Guruth
9997
{-1, -1}, -- Esteldin
@@ -135,7 +133,6 @@ function GondorMapWindow:Constructor(parent, class, race, shortcuts)
135133
{-1, -1}, -- U30 B
136134
{-1, -1}, -- U31 A
137135
{-1, -1}, -- U31 B
138-
139136
-- Reputation skills
140137
{-1, -1}, -- Thorin's Hall
141138
{-1, -1}, -- Bree
@@ -181,7 +178,6 @@ function GondorMapWindow:Constructor(parent, class, race, shortcuts)
181178
{-1, -1}, -- U31 A
182179
{-1, -1}, -- U31 B
183180
{-1, -1}, -- U31 C
184-
185181
-- Racial skills
186182
{-1, -1}, -- Bree
187183
{-1, -1}, -- Michel Delving
@@ -199,7 +195,9 @@ function GondorMapWindow:Constructor(parent, class, race, shortcuts)
199195
-- have the main window close the options
200196
self.VisibleChanged = function(sender, args)
201197
if (self:IsVisible() == false) then
202-
if (parent ~= nil) then parent:CloseEriadorMap(); end
198+
if (parent ~= nil) then
199+
parent:CloseEriadorMap();
200+
end
203201
end
204202
end
205203

@@ -214,12 +212,9 @@ function GondorMapWindow:AddShortcuts()
214212
for i = 1, travelCount[1], 1 do
215213

216214
-- add hunter locations if they should be on this map
217-
if (self.mapLocations[counter][1] > 0 and self.PlayerClass ==
218-
Turbine.Gameplay.Class.Hunter and
215+
if (self.mapLocations[counter][1] > 0 and self.PlayerClass == Turbine.Gameplay.Class.Hunter and
219216
self:IsShortcutEnabled(hunterLocations:IdAtIndex(i)) == 1) then
220-
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0,
221-
hunterLocations:IdAtIndex(
222-
i)));
217+
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0, hunterLocations:IdAtIndex(i)));
223218
end
224219

225220
counter = counter + 1;
@@ -229,12 +224,9 @@ function GondorMapWindow:AddShortcuts()
229224
for i = 1, travelCount[2], 1 do
230225

231226
-- add warden locations if they should be on this map
232-
if (self.mapLocations[counter][1] > 0 and self.PlayerClass ==
233-
Turbine.Gameplay.Class.Warden and
227+
if (self.mapLocations[counter][1] > 0 and self.PlayerClass == Turbine.Gameplay.Class.Warden and
234228
self:IsShortcutEnabled(wardenLocations:IdAtIndex(i)) == 1) then
235-
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0,
236-
wardenLocations:IdAtIndex(
237-
i)));
229+
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0, wardenLocations:IdAtIndex(i)));
238230
end
239231
counter = counter + 1;
240232
end
@@ -243,11 +235,8 @@ function GondorMapWindow:AddShortcuts()
243235
for i = 1, travelCount[4], 1 do
244236

245237
-- add rep locations if they should be on this map
246-
if (self.mapLocations[counter][1] > 0 and
247-
self:IsShortcutEnabled(repLocations:IdAtIndex(i)) == 1) then
248-
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0,
249-
repLocations:IdAtIndex(
250-
i)));
238+
if (self.mapLocations[counter][1] > 0 and self:IsShortcutEnabled(repLocations:IdAtIndex(i)) == 1) then
239+
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0, repLocations:IdAtIndex(i)));
251240
end
252241

253242
counter = counter + 1;
@@ -256,12 +245,9 @@ function GondorMapWindow:AddShortcuts()
256245
-- racial locations
257246
for i = 1, travelCount[5], 1 do
258247

259-
if (self.mapLocations[counter][1] > 0 and
260-
self:IsShortcutEnabled(racialLocations:IdAtIndex(i)) == 1) then
248+
if (self.mapLocations[counter][1] > 0 and self:IsShortcutEnabled(racialLocations:IdAtIndex(i)) == 1) then
261249
if (i == self.PlayerRace) then
262-
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0,
263-
racialLocations:IdAtIndex(
264-
i)));
250+
self:AddSingleShortcut(counter, Turbine.UI.Lotro.Shortcut(6.0, racialLocations:IdAtIndex(i)));
265251
end
266252
end
267253

@@ -284,8 +270,7 @@ function GondorMapWindow:AddSingleShortcut(index, shortcut)
284270

285271
self.quickslots[index]:SetStretchMode(1);
286272
self.quickslots[index]:SetSize(22, 22);
287-
self.quickslots[index]:SetPosition(self.mapLocations[index][1],
288-
self.mapLocations[index][2]);
273+
self.quickslots[index]:SetPosition(self.mapLocations[index][1], self.mapLocations[index][2]);
289274
self.quickslots[index]:SetZOrder(98);
290275
self.quickslots[index]:SetVisible(true);
291276

@@ -299,7 +284,9 @@ function GondorMapWindow:IsShortcutEnabled(id)
299284
-- loop through all the shortcuts and add those that are enabled
300285
for i = 1, #self.shortcuts, 1 do
301286
if (self.shortcuts[i]:GetData() == id) then
302-
if (self.shortcuts[i]:IsEnabled()) then return 1; end
287+
if (self.shortcuts[i]:IsEnabled()) then
288+
return 1;
289+
end
303290
end
304291
end
305292

src/IndexedDictionary.lua

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--[[ use a modified table to maintain data for travel skills
2-
specifically skill name, ID and label ]] IndexedDictionary =
3-
class()
2+
specifically skill name, ID and label ]] IndexedDictionary = class()
43

54
function IndexedDictionary:Constructor()
65
-- set default tables
@@ -12,7 +11,9 @@ function IndexedDictionary:Constructor()
1211
end
1312

1413
-- function to get the total number of entries in the dictionary
15-
function IndexedDictionary:GetCount() return self.numberOfItems; end
14+
function IndexedDictionary:GetCount()
15+
return self.numberOfItems;
16+
end
1617

1718
-- function to add a skills name, ID and label to the end of the dictionary
1819
function IndexedDictionary:AddSkill(name, id, label)
@@ -54,7 +55,9 @@ function IndexedDictionary:RemoveSkillAtIndex(index)
5455
counter = counter + 1;
5556

5657
-- if the keys match, set the location to remove from the table
57-
if (k == self.skillNames[index]) then location = counter; end
58+
if (k == self.skillNames[index]) then
59+
location = counter;
60+
end
5861
end
5962

6063
-- remove the name, ID and label from the tables
@@ -97,7 +100,9 @@ function IndexedDictionary:PairAtIndex(index)
97100
end
98101

99102
-- function to get the ID by a name value
100-
function IndexedDictionary:IdByName(name) return self.skillIds[name]; end
103+
function IndexedDictionary:IdByName(name)
104+
return self.skillIds[name];
105+
end
101106

102107
-- function to check if ID exists
103108
function IndexedDictionary:VerifyId(id)
@@ -112,12 +117,16 @@ end
112117
function IndexedDictionary:IndexByName(name)
113118

114119
-- return if the list of keys is empty
115-
if (self.skillNames == {}) then return -1; end
120+
if (self.skillNames == {}) then
121+
return -1;
122+
end
116123

117124
-- loop through the list of names and search for the given value
118125
for i = 1, #self.skillNames, 1 do
119126
-- return the index value if a match is made
120-
if (self.skillNames[i] == name) then return i; end
127+
if (self.skillNames[i] == name) then
128+
return i;
129+
end
121130
end
122131

123132
-- return -1 since we did not find a key

0 commit comments

Comments
 (0)