luxury furnisher

git [04-21-18 - 10:24]
luxury furnisher
Filename
FurnitureCatalogue/FurnitureCatalogue.txt
FurnitureCatalogue/data/EventItems.lua
FurnitureCatalogue/data/Homestead/H_LuxuryFurnisher.lua
FurnitureCatalogue/data/LuxuryFurnisher.lua
FurnitureCatalogue/data/MiscItemSources.lua
FurnitureCatalogue/libs/LibCustomMenu/LibCustomMenu.lua
FurnitureCatalogue/locale/en.lua
diff --git a/FurnitureCatalogue/FurnitureCatalogue.txt b/FurnitureCatalogue/FurnitureCatalogue.txt
index cf12e50..296655c 100644
--- a/FurnitureCatalogue/FurnitureCatalogue.txt
+++ b/FurnitureCatalogue/FurnitureCatalogue.txt
@@ -1,6 +1,6 @@
 ## Title: FurnitureCatalogue
 ## Author: manavortex
-## Version: 2.2.12
+## Version: 2.2.13
 ## APIVersion: 100022
 ## SavedVariables: FurnitureCatalogue_Settings
 ## OptionalDependsOn: pChat
diff --git a/FurnitureCatalogue/data/EventItems.lua b/FurnitureCatalogue/data/EventItems.lua
index 75a2cb0..e4480e5 100644
--- a/FurnitureCatalogue/data/EventItems.lua
+++ b/FurnitureCatalogue/data/EventItems.lua
@@ -50,16 +50,16 @@ FurC.EventItems[FURC_REACH] = {
 			[130338] = true, 	-- Witches Bones, Offering",
 			[131434] = true, 	-- Witch's Festival, Cursed Totem,
 			[132154] = true, 	-- Witch's Totem, Bog",
-			[130302] = "occasionally found in wood nodes", 	-- Shrub, Burnt Brush"
-			[130298] = "occasionally found in wood nodes",	-- Branch, Curved Laurel
-			[130296] = "occasionally found in wood nodes",	-- Branch, Sturdy Laurel
-			[130295] = "occasionally found in wood nodes",	-- Branch, Sturdy Burnt
-			[130293] = "occasionally found in wood nodes",	-- Branch, Forked Burnt
-			[130293] = "occasionally found in wood nodes",	-- Branch, Curved Burnt
-			[130301] = "occasionally found in wood nodes",	-- Saplings, Burnt Sparse
-			[130299] = "occasionally found in wood nodes",	-- Saplings, Burnt Cluster
-			[130300] = "occasionally found in wood nodes",	-- Saplings, Burnt Tall
-			[130297] = "occasionally found in wood nodes",	-- Branch, Forked Laurel
+			[130302] = GetString(SI_FURC_WW), 	-- Shrub, Burnt Brush"
+			[130298] = GetString(SI_FURC_WW),	-- Branch, Curved Laurel
+			[130296] = GetString(SI_FURC_WW),	-- Branch, Sturdy Laurel
+			[130295] = GetString(SI_FURC_WW),	-- Branch, Sturdy Burnt
+			[130293] = GetString(SI_FURC_WW),	-- Branch, Forked Burnt
+			[130293] = GetString(SI_FURC_WW),	-- Branch, Curved Burnt
+			[130301] = GetString(SI_FURC_WW),	-- Saplings, Burnt Sparse
+			[130299] = GetString(SI_FURC_WW),	-- Saplings, Burnt Cluster
+			[130300] = GetString(SI_FURC_WW),	-- Saplings, Burnt Tall
+			[130297] = GetString(SI_FURC_WW),	-- Branch, Forked Laurel


 		}
diff --git a/FurnitureCatalogue/data/Homestead/H_LuxuryFurnisher.lua b/FurnitureCatalogue/data/Homestead/H_LuxuryFurnisher.lua
index 37c0470..817a2e1 100644
--- a/FurnitureCatalogue/data/Homestead/H_LuxuryFurnisher.lua
+++ b/FurnitureCatalogue/data/Homestead/H_LuxuryFurnisher.lua
@@ -20,19 +20,6 @@ FurC.LuxuryFurnisher[FURC_HOMESTEAD] = {
 		itemDate	= "2017-05-12",
 	},

-	[120826] = {	-- Iron Cross
-		itemPrice 	= 10000,
-		itemDate	= "2017-05-05",
-	},
-	[120825] = {	-- Iron Cross, Large
-		itemPrice 	= 25000,
-		itemDate	= "2017-05-05",
-	},
-	[120827] = {	-- Iron Maiden, Chained
-		itemPrice 	= 50000,
-		itemDate	= "2017-05-05",
-	},
-

 	[120803] = {	-- Hews Bane Bed, Royal
 		itemPrice 	= 20000,
diff --git a/FurnitureCatalogue/data/LuxuryFurnisher.lua b/FurnitureCatalogue/data/LuxuryFurnisher.lua
index eecf7fb..2aa8c74 100644
--- a/FurnitureCatalogue/data/LuxuryFurnisher.lua
+++ b/FurnitureCatalogue/data/LuxuryFurnisher.lua
@@ -1,9 +1,29 @@
 FurC.LuxuryFurnisher = FurC.LuxuryFurnisher or {}
 FurC.LuxuryFurnisher[FURC_DRAGONS] = {

+	[134833] = {	-- Gibbet, Hanging Hooked
+		itemPrice 	= 75000,
+		itemDate	= "2018-04-21",
+	},
+
+	[120826] = {	-- Iron Cross
+		itemPrice 	= 10000,
+		itemDate	= "2017-04-21",
+	},
+	[120825] = {	-- Iron Cross, Large
+		itemPrice 	= 25000,
+		itemDate	= "2017-04-21",
+	},
+	[120827] = {	-- Iron Maiden, Chained
+		itemPrice 	= 20000,
+		itemDate	= "2017-04-21",
+	},
+
+
+
 	[134832] = {	-- Basin of the Divines
-		itemPrice 	= 15000,
-		itemDate	= "2018-04-07",
+		itemPrice 	= 35000,
+		itemDate	= "2018-04-14",
 	},
     [120823] = {	-- Sigil Stand
 		itemPrice 	= 15000,
@@ -29,7 +49,7 @@ FurC.LuxuryFurnisher[FURC_DRAGONS] = {

     [120823] = {	-- Sigil Stand
 		itemPrice 	= 15000,
-		itemDate	= "2018-04-14",
+		itemDate	= "2018-04-07",
 	},
 	[120815] = {	-- Sigil, Akatosh
 		itemPrice 	= 20000,
diff --git a/FurnitureCatalogue/data/MiscItemSources.lua b/FurnitureCatalogue/data/MiscItemSources.lua
index c2761be..2726693 100644
--- a/FurnitureCatalogue/data/MiscItemSources.lua
+++ b/FurnitureCatalogue/data/MiscItemSources.lua
@@ -185,6 +185,8 @@ FurC.MiscItemSources 	= {
 			[125543] = GetString(SI_FURC_PLANTS), 					-- Fern, Ashen
 			[125633] = GetString(SI_FURC_PLANTS), 					-- Plants, Hanging Pitcher Pair

+            [130280] = GetString(SI_FURC_WW), 					    -- Sapling, Petrified Ashen
+

             [126592] = GetString(SI_FURC_PLANTS), 					-- Plants, Hanging Pitcher Pair

diff --git a/FurnitureCatalogue/libs/LibCustomMenu/LibCustomMenu.lua b/FurnitureCatalogue/libs/LibCustomMenu/LibCustomMenu.lua
index b4a003d..2164065 100644
--- a/FurnitureCatalogue/libs/LibCustomMenu/LibCustomMenu.lua
+++ b/FurnitureCatalogue/libs/LibCustomMenu/LibCustomMenu.lua
@@ -2,7 +2,7 @@
 -- thanks to: baertram & circonian

 -- Register with LibStub
-local MAJOR, MINOR = "LibCustomMenu", 5
+local MAJOR, MINOR = "LibCustomMenu", 6.4
 local lib, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 if not lib then return end -- the same or newer version of this lib is already loaded into memory

@@ -477,6 +477,57 @@ local function DividerFactory(pool)
 	return control
 end

+---- Hook points for context menu -----
+
+local function HookContextMenu()
+	local category, registry, inventorySlot, slotActions, entered
+	local function Reset()
+		category, registry, inventorySlot, slotActions = 0, nil, nil, nil
+	end
+	local function RemoveMouseOverKeybinds()
+		if entered then
+			entered = false
+			lib.keybindRegistry:FireCallbacks("Exit")
+		end
+		Reset()
+	end
+	local function addCategory()
+		category = category + 1
+		registry:FireCallbacks(category, inventorySlot, slotActions)
+	end
+	local function AddSlots(...)
+		Reset()
+		inventorySlot, slotActions = ...
+		if slotActions.m_contextMenuMode then
+			registry = lib.contextMenuRegistry
+		else
+			entered = true
+			registry = lib.keybindRegistry
+		end
+	end
+	local function InsertToMenu()
+		if category < 4 and inventorySlot then
+			addCategory()
+		end
+	end
+	local function AppendToMenu()
+		if registry then
+			if inventorySlot then
+				while category <= 6 do addCategory() end
+			end
+			Reset()
+		end
+	end
+	Reset()
+
+	ZO_PreHook("ZO_InventorySlot_RemoveMouseOverKeybinds", RemoveMouseOverKeybinds)
+	ZO_PreHook("ZO_InventorySlot_OnMouseExit", RemoveMouseOverKeybinds)
+	ZO_PreHook("ZO_InventorySlot_DiscoverSlotActionsFromActionList", AddSlots)
+	ZO_PreHook(ZO_InventorySlotActions, "AddSlotAction", InsertToMenu)
+	ZO_PreHook(ZO_InventorySlotActions, "Show", AppendToMenu)
+	ZO_PreHook(ZO_InventorySlotActions, "GetPrimaryActionName", AppendToMenu)
+end
+
 ----- Public API -----

 function AddCustomMenuItem(mytext, myfunction, itemType, myFont, normalColor, highlightColor, itemYPad, horizontalAlignment)
@@ -552,6 +603,20 @@ local function HookAddSlotAction()
 	end
 end

+function lib:RegisterContextMenu(func, category, ...)
+	category = zo_clamp(category or self.CATEGORY_LATE, self.CATEGORY_EARLY, self.CATEGORY_LATE)
+	self.contextMenuRegistry:RegisterCallback(category, func, ...)
+end
+
+function lib:RegisterKeyStripEnter(func, category, ...)
+	category = zo_clamp(category or self.CATEGORY_LATE, self.CATEGORY_EARLY, self.CATEGORY_LATE)
+	self.keybindRegistry:RegisterCallback(category, func, ...)
+end
+
+function lib:RegisterKeyStripExit(func, ...)
+	self.keybindRegistry:RegisterCallback("Exit", func, ...)
+end
+
 ---- Init -----

 local function OnAddonLoaded(event, name)
@@ -564,7 +629,18 @@ local function OnAddonLoaded(event, name)
 	lib.submenu = Submenu:New("LibCustomMenuSubmenu")
 	HookClearMenu()
 	HookAddSlotAction()
+	HookContextMenu()
 end

+lib.contextMenuRegistry = lib.contextMenuRegistry or ZO_CallbackObject:New()
+lib.keybindRegistry = lib.keybindRegistry or ZO_CallbackObject:New()
+
+lib.CATEGORY_EARLY = 1
+lib.CATEGORY_PRIMARY = 2
+lib.CATEGORY_SECONDARY = 3
+lib.CATEGORY_TERTIARY = 4
+lib.CATEGORY_QUATERNARY = 5
+lib.CATEGORY_LATE = 6
+
 EVENT_MANAGER:UnregisterForEvent(MAJOR, EVENT_ADD_ON_LOADED)
 EVENT_MANAGER:RegisterForEvent(MAJOR, EVENT_ADD_ON_LOADED, OnAddonLoaded)
diff --git a/FurnitureCatalogue/locale/en.lua b/FurnitureCatalogue/locale/en.lua
index c6aa4f8..d7bc6ec 100644
--- a/FurnitureCatalogue/locale/en.lua
+++ b/FurnitureCatalogue/locale/en.lua
@@ -220,6 +220,7 @@ local strings = {
     SI_FURC_CROWNSTORESOURCE				        = "Crown Store ",
     SI_FURC_CANBEFISHED				                = "can be fished",
     SI_FURC_HARVEST				                    = "from harvesting nodes",
+    SI_FURC_WW				                        = "occasionally found in wood nodes",
     SI_FURC_PLANTS						            = "from harvesting plants",
     SI_FURC_SCAMBOX						            = "Crown Crates",
     SI_FURC_AUTOMATON						        = "from automatons",