Skip to content

Commit

Permalink
readded unload event handling, added metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
wduda committed Dec 5, 2022
1 parent dbc730c commit 75ffa6f
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
Empty file added .gitattributes
Empty file.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog
v1.0.21beta
## v1.0.23beta
- saving options is now reliably done on every logout
## v1.0.22beta
- fixed bug with duplicate skillID affecting hunters trying to sort their travel skills
- fixed TWII button not saving position when being moved
- fixed error message when resetting skills to default
## v1.0.21beta
- added U34 skills for EN/DE/FR
- fixed two Muster skills in DE
- PluginManager button for options no longer opens a second copy of options window
Expand Down
2 changes: 1 addition & 1 deletion TravelWindowII.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Information>
<Name>Travel Window II</Name>
<Author>Hyoss</Author>
<Version>v1.0.22beta</Version>
<Version>v1.0.23beta</Version>
<Description>
This plugin creates a single window that contains all the available travel skills, including the race, class and reputation skills.
It is a further development of Travel Window, that has been worked on by multiple authors before.
Expand Down
2 changes: 1 addition & 1 deletion TravelWindowII.plugincompendium
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PluginConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Id>1113</Id>
<Name>Travel Window II</Name>
<Version>v1.0.22beta</Version>
<Version>v1.0.23beta</Version>
<Author>Hyoss</Author>
<InfoUrl>http://www.lotrointerface.com/downloads/info1113</InfoUrl>
<DownloadUrl>http://www.lotrointerface.com/downloads/download1113</DownloadUrl>
Expand Down
6 changes: 2 additions & 4 deletions doc/lotroforums.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
A new version is available!

v1.0.22beta
- fixed bug with duplicate skillID affecting hunters trying to sort their travel skills
- fixed TWII button not saving position when being moved
- fixed error message when resetting skills to default
v1.0.23beta
- saving options is now reliably done on every logout

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].
6 changes: 2 additions & 4 deletions doc/lotrointerface.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ How to handle the settings reset introduced by v1.0.7beta?
[/LIST]

Version history:
v1.0.22beta
- fixed bug with duplicate skillID affecting hunters trying to sort their travel skills
- fixed TWII button not saving position when being moved
- fixed error message when resetting skills to default
v1.0.23beta
- saving options is now reliably done on every logout

Rest of changelog found [URL="https://github.com/wduda/TravelWindowII/blob/master/CHANGELOG.md"]here[/URL].
15 changes: 10 additions & 5 deletions src/Main.lua
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
import "TravelWindowII.src";

-- create the travel window
travel = TravelWindow();
_G.travel = TravelWindow();

-- handle unload event and save settings
plugin.Unload = function()
_G.travel:SaveSettings();
end

-- create a new command line command for the travel window
TravelCommand = Turbine.ShellCommand();

-- handle the travel commands
function TravelCommand:Execute(command, arguments)
if (arguments == "show") then
travel:SetVisible(true);
_G.travel:SetVisible(true);
elseif (arguments == "hide") then
travel:SetVisible(false);
_G.travel:SetVisible(false);
elseif (arguments == "toggle") then
travel:SetVisible(not travel:IsVisible());
_G.travel:SetVisible(not _G.travel:IsVisible());
elseif (arguments == "dump") then
travel:DoDump();
_G.travel:DoDump();
elseif (arguments ~= nil) then
TravelCommand:GetHelp();
end
Expand Down
1 change: 0 additions & 1 deletion src/SettingsMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,5 @@ function SettingsMenu:Update(string)

-- update the main window settings
self.parent:UpdateSettings();
self.parent:SaveSettings();
end

1 change: 0 additions & 1 deletion src/TravelButton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ function TravelButton:Constructor(parent)
Settings.buttonPositionX = one;
Settings.buttonPositionY = two;
self.mainWindow:UpdateSettings();
self.mainWindow:SaveSettings();
hasMoved = false;
self:SetBackColor(Turbine.UI.Color(0, 0.5, 0.5, 0.5));

Expand Down
5 changes: 0 additions & 5 deletions src/TravelWindow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ function TravelWindow:Constructor()
local one, two = self:GetPosition();
Settings.positionX = one;
Settings.positionY = two;
self:SaveSettings();
self.PullTab:ClosePulldown();
end

Expand Down Expand Up @@ -284,8 +283,6 @@ function TravelWindow:Constructor()
Settings.width = self:GetWidth();
Settings.height = self:GetHeight();
self:UpdateSettings();
self:SaveSettings();

end

-- perform the resize
Expand Down Expand Up @@ -447,7 +444,6 @@ function TravelWindow:SaveMapHome(shortcut)
end
-- update and save everything
self:UpdateSettings();
self:SaveSettings();
end

function TravelWindow:SetShortcuts()
Expand Down Expand Up @@ -652,7 +648,6 @@ end
-- function to close the options window if it exists
function TravelWindow:CloseOptions()
if (self.options ~= nil) then
self:SaveSettings();
self.options:SetVisible(false);
end
self.options = nil;
Expand Down

0 comments on commit 75ffa6f

Please sign in to comment.