Clear queue when leave station in the middle of the craft proccess

Leandro Silva [03-28-20 - 10:06]
Clear queue when leave station in the middle of the craft proccess
Filename
Bank.lua
Bindings.xml
Craft.lua
Deconstruct.lua
Launcher.lua
Launcher.xml
LeoTrainer.lua
LeoTrainer.txt
LeoTrainer.xml
LeoTrainerConst.lua
LeoTrainerUI.lua
Research.lua
Settings.lua
Settings.xml
Ui.lua
diff --git a/Bank.lua b/Bank.lua
old mode 100755
new mode 100644
diff --git a/Bindings.xml b/Bindings.xml
old mode 100755
new mode 100644
diff --git a/Craft.lua b/Craft.lua
old mode 100755
new mode 100644
index 652c510..0b9a233
--- a/Craft.lua
+++ b/Craft.lua
@@ -150,7 +150,7 @@ function Craft.StillHaveCraftToDo(craftSkill)
     return false
 end

-function Craft.RemoveCraftedFromQueue()
+function Craft.RemoveCraftedFromQueue(craftSkill)
     local i=1
     while i <= #LeoTrainer.data.craftQueue do
         if LeoTrainer.data.craftQueue[i].crafted then
@@ -159,10 +159,11 @@ function Craft.RemoveCraftedFromQueue()
             i = i + 1
         end
     end
+    LeoTrainer.LLC:cancelItem(craftSkill)
 end

 function Craft.OnStationExit(craftSkill)
-    Craft.RemoveCraftedFromQueue()
+    Craft.RemoveCraftedFromQueue(craftSkill)
 end

 function Craft.OnStationEnter(craftSkill)
diff --git a/Deconstruct.lua b/Deconstruct.lua
old mode 100755
new mode 100644
diff --git a/Launcher.lua b/Launcher.lua
old mode 100755
new mode 100644
diff --git a/Launcher.xml b/Launcher.xml
old mode 100755
new mode 100644
diff --git a/LeoTrainer.lua b/LeoTrainer.lua
old mode 100755
new mode 100644
diff --git a/LeoTrainer.txt b/LeoTrainer.txt
old mode 100755
new mode 100644
index dfa4054..43b5a42
--- a/LeoTrainer.txt
+++ b/LeoTrainer.txt
@@ -1,7 +1,7 @@
 ## Title: Leo's Trainer
 ## APIVersion: 100030
-## Version: 2.0.0
-## AddOnVersion: 200
+## Version: 2.0.1
+## AddOnVersion: 201
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoTrainer_Settings LeoTrainer_Data
 ## OptionalDependsOn: FCOItemSaver PersonalAssistant DolgubonsLazyWritCreator
diff --git a/LeoTrainer.xml b/LeoTrainer.xml
old mode 100755
new mode 100644
diff --git a/LeoTrainerConst.lua b/LeoTrainerConst.lua
old mode 100755
new mode 100644
index 327cf7e..d23f3f7
--- a/LeoTrainerConst.lua
+++ b/LeoTrainerConst.lua
@@ -8,7 +8,7 @@ LeoTrainer = {
 }
 LeoTrainer.name = "LeoTrainer"
 LeoTrainer.displayName = "Leo's Trainer"
-LeoTrainer.version = "2.0.0"
+LeoTrainer.version = "2.0.1"
 LeoTrainer.chatPrefix = "|c39B027" .. LeoTrainer.name .. "|r: "
 LeoTrainer.setting = nil
 LeoTrainer.hidden = true
diff --git a/LeoTrainerUI.lua b/LeoTrainerUI.lua
old mode 100755
new mode 100644
diff --git a/Research.lua b/Research.lua
old mode 100755
new mode 100644
diff --git a/Settings.lua b/Settings.lua
old mode 100755
new mode 100644
diff --git a/Settings.xml b/Settings.xml
old mode 100755
new mode 100644
diff --git a/Ui.lua b/Ui.lua
old mode 100755
new mode 100644