Version 1.4.1

willneedit [05-28-17 - 15:05]
Version 1.4.1
 * Removed clamping of gold and TV stones for banking
 * Added 'crafted' trait filter
 * Fixed FCO ItemSaver detection for 'not installed' case
Filename
FCOISLink.lua
InventoryManager.lua
Modules/Banking.lua
Rulesets.lua
UI/RuleEdit.lua
UI/Settings.lua
lang/de.lua
lang/en.lua
diff --git a/FCOISLink.lua b/FCOISLink.lua
index 0e1bc56..0c7d29a 100644
--- a/FCOISLink.lua
+++ b/FCOISLink.lua
@@ -33,7 +33,7 @@ function FCOISL:hasAddon()
     TXT_NO_MARK = GetString(IM_FCOIS_NOMARK)
     TXT_ANY_MARK = GetString(IM_FCOIS_ANYMARK)

-    hasFCOIS = ( FCOIS ~= nil and (FCOIsMarked ~= nil and FCOGetDynamicInfo ~= nil and FCOGetIconText ~= nil) or (FCOIS.IsMarked ~= nil and FCOIS.GetDynamicInfo ~= nil and FCOIS.GetIconText ~= nil))
+    hasFCOIS = ( FCOIS ~= nil and ((FCOIsMarked ~= nil and FCOGetDynamicInfo ~= nil and FCOGetIconText ~= nil) or (FCOIS.IsMarked ~= nil and FCOIS.GetDynamicInfo ~= nil and FCOIS.GetIconText ~= nil)))

     if(hasFCOIS) then
         staticIconList = {
diff --git a/InventoryManager.lua b/InventoryManager.lua
index 85df087..edb6270 100644
--- a/InventoryManager.lua
+++ b/InventoryManager.lua
@@ -126,7 +126,8 @@ function InventoryManager:GetItemData(slotId, _inv)

 	data.quality = GetItemLinkQuality(itemLink)
 	data.stolen = IsItemLinkStolen(itemLink)
-
+	data.crafted = IsItemLinkCrafted(itemLink)
+
 	data.unknownself, data.unknownothers = self.CSL:isUnknown(itemLink)
 	return data
 end
diff --git a/Modules/Banking.lua b/Modules/Banking.lua
index 29e0352..5e66eee 100644
--- a/Modules/Banking.lua
+++ b/Modules/Banking.lua
@@ -284,6 +284,10 @@ function InventoryManager:BalanceCurrency(currencyType, minCur, maxCur, curName)
 	local carried = GetCarriedCurrencyAmount(currencyType)
 	local banked = GetBankedCurrencyAmount(currencyType)

+	if minCur < 0 then minCur = 0 end
+
+	if maxCur < 0 then maxCur = 0 end
+
 	local move = 0
 	if(carried < minCur) then
 		move = carried - minCur
diff --git a/Rulesets.lua b/Rulesets.lua
index 4828715..f64a90c 100644
--- a/Rulesets.lua
+++ b/Rulesets.lua
@@ -57,6 +57,10 @@ function IM_Rule:ToString()
 			itemDescription = GetString("SI_ITEMTRAITTYPE", self.traitType) .. " " .. itemDescription
 		end
 	end
+
+	if self.crafted then
+		itemDescription = GetString(IM_RULETXT_CRAFTED) .. " " .. itemDescription
+	end

 	if self.worthless then
 		itemDescription = GetString(IM_RULETXT_WORTHLESS) .. " " .. itemDescription
@@ -173,6 +177,9 @@ function IM_Rule:Filter(data)
 	-- worthless?
 	if self.worthless and data.value ~= 0 then return false end

+	-- crafted?
+	if self.crafted and not data.crafted then return false end
+
 	-- outside wanted quality range?
 	if data.quality < self.minQuality or data.quality > self.maxQuality  then return false end

diff --git a/UI/RuleEdit.lua b/UI/RuleEdit.lua
index 6524281..6285b6e 100644
--- a/UI/RuleEdit.lua
+++ b/UI/RuleEdit.lua
@@ -258,6 +258,18 @@ function RE:GetControls()
 			getFunc = function() return RE.editingRule.worthless end,
 			setFunc = function(value) RE.editingRule.worthless = value end,
 		},
+		{
+			type = "checkbox",
+			name = GetString(IM_RE_CRAFTED),
+			width = "half",
+			getFunc = function() return RE.editingRule.crafted end,
+			setFunc = function(value) RE.editingRule.crafted = value end,
+		},
+		{
+			type = "description",
+			text = "",
+			width = "half",
+		},
 	}
 end

diff --git a/UI/Settings.lua b/UI/Settings.lua
index 1f54ea4..473ceab 100644
--- a/UI/Settings.lua
+++ b/UI/Settings.lua
@@ -18,6 +18,7 @@ function SE:GetControls()
 			max = 100000,
 			getFunc = function() return IM.settings.minGold end,
 			setFunc = function(value) IM.settings.minGold = value end,
+			clampInput = false,
 			width = "half",	--or "half" (optional)
 		},
 		{
@@ -28,6 +29,7 @@ function SE:GetControls()
 			max = 100000,
 			getFunc = function() return IM.settings.maxGold end,
 			setFunc = function(value) IM.settings.maxGold = value end,
+			clampInput = false,
 			width = "half",	--or "half" (optional)
 		},
 		{
@@ -38,6 +40,7 @@ function SE:GetControls()
 			max = 100000,
 			getFunc = function() return IM.settings.minTV end,
 			setFunc = function(value) IM.settings.minTV = value end,
+			clampInput = false,
 			width = "half",	--or "half" (optional)
 		},
 		{
@@ -48,6 +51,7 @@ function SE:GetControls()
 			max = 100000,
 			getFunc = function() return IM.settings.maxTV end,
 			setFunc = function(value) IM.settings.maxTV = value end,
+			clampInput = false,
 			width = "half",	--or "half" (optional)
 		},
 		{
diff --git a/lang/de.lua b/lang/de.lua
index 9e6eee0..3fd7609 100644
--- a/lang/de.lua
+++ b/lang/de.lua
@@ -9,6 +9,7 @@ local lang = {
 	IM_RULETXT_STOLEN			= "gestohlene(s)",
 	IM_RULETXT_WORTHLESS		= "wertlos(es)",
 	IM_RULETXT_JUNKED			= "weggeworfene(s)",
+	IM_RULETXT_CRAFTED			= "hergestellte(s)",
 	IM_RULETXT_QUALITY1			= "mit Qualität <<1>>",
 	IM_RULETXT_QUALITY2			= "mit Qualität von <<1>> bis <<2>>",
 	IM_RULETXT_EXECOUNT 		= "(max. <<1>>-mal)",
@@ -104,6 +105,7 @@ local lang = {
 	IM_RE_MAXQUAL				= "Maximale Qualität",
 	IM_RE_STOLEN				= "Gestohlen",
 	IM_RE_WORTHLESS				= "Wertlos",
+	IM_RE_CRAFTED				= "Hergestellt",
 	IM_RE_EMPTY					= "(leer)",
 	IM_RE_INJUNK 				= "Im Müll",

diff --git a/lang/en.lua b/lang/en.lua
index 5637a8b..20bd194 100644
--- a/lang/en.lua
+++ b/lang/en.lua
@@ -9,6 +9,7 @@ local lang = {
 	IM_RULETXT_STOLEN			= "stolen",
 	IM_RULETXT_WORTHLESS		= "worthless",
 	IM_RULETXT_JUNKED			= "junked",
+	IM_RULETXT_CRAFTED			= "crafted",
 	IM_RULETXT_QUALITY1			= "with quality <<1>>",
 	IM_RULETXT_QUALITY2			= "with quality from <<1>> to <<2>>",
 	IM_RULETXT_EXECOUNT 		= "(max. <<1>> times)",
@@ -104,6 +105,7 @@ local lang = {
 	IM_RE_MAXQUAL				= "Maximum Quality",
 	IM_RE_STOLEN				= "stolen",
 	IM_RE_WORTHLESS				= "worthless",
+	IM_RE_CRAFTED				= "crafted",
 	IM_RE_EMPTY					= "(empty)",
 	IM_RE_INJUNK 				= "In Junk",