Skip to content

Commit

Permalink
Add backup saved variable for current route
Browse files Browse the repository at this point in the history
  • Loading branch information
Neogeekmo committed Sep 6, 2024
1 parent 3e8c25e commit a2fc288
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ function AprRC.command:SlashCmd(input)
APR.settings.profile.coordinateShow = not APR.settings.profile.coordinateShow
AprRC.coordinate:RefreshFrameAnchor()
return
elseif inputText == 'backup' then
AprRCData.CurrentRoute.steps = {}
for k, v in pairs(AprRCData.BackupRoute) do
AprRCData.CurrentRoute.steps[k] = v
end
return
elseif inputText == "help" or inputText == "h" then
print(L_APR["COMMAND_LIST"] .. ":")
print("|cffeda55f/aprrc achievement |r- " .. "HasAchievement")
Expand Down
1 change: 1 addition & 0 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function AprRC:OnInitialize()
AprRCData.QuestLookup = AprRCData.QuestLookup or {}
AprRCData.TaxiLookup = AprRCData.TaxiLookup or {}
AprRCData.BeforePortal = AprRCData.BeforePortal or {}
AprRCData.BackupRoute = AprRCData.BackupRoute or {}

-- Init module
AprRC.settings:InitializeBlizOptions()
Expand Down
4 changes: 4 additions & 0 deletions frames/exportRoute.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ function AprRC.export:Show()
if AprRCData.CurrentRoute.name == selectedRouteName then
AprRCData.CurrentRoute = newRoute
end
AprRCData.BackupRoute = { }
for k, v in pairs(newStepRouteTable) do
AprRCData.BackupRoute[k] = v
end
AutoScrollToBottom()
end)
frame:AddChild(btnSave)
Expand Down

0 comments on commit a2fc288

Please sign in to comment.