got craglorn locations and tabs done

John Huttley [01-10-17 - 04:55]
got craglorn locations and tabs done
Filename
HistOffline.lua
data/Trial.lua
data/de/de.lua
data/en/en.lua
data/fr/fr.lua
data/keys.lua
data/utility.lua
diff --git a/HistOffline.lua b/HistOffline.lua
index 43a574e..cc6ee1b 100644
--- a/HistOffline.lua
+++ b/HistOffline.lua
@@ -375,7 +375,7 @@ end
 	  end
 	end
   end
-
+
   -- Set up dungeon mode Craglorn Trials
   for _,i in ipairs(Craglorn_Order) do
 		dung.Craglorn[i]= {}
@@ -419,7 +419,7 @@ end
 	dung.Craglorn[i].box:setcell(0,0, L.Location)
 	--Set Line titles
 	for line,key in ipairs(Craglorn_Dat[i].key) do
-		dung.Craglorn[i].box:setcell(line, 0, Craglorn_Names[key])
+		dung.Craglorn[i].box:setcell(line, 0, Craglorn_Names[i][key])
 	end

 	--Create Columns for Chars
@@ -436,10 +436,10 @@ end
 		dung.Craglorn[i].key[key][playerID] = false
 	  end
 	end
-
+
   end
-
-
+
+


   for _,i in ipairs(Pub_Dat.key) do
@@ -560,7 +560,7 @@ end
 			end
 		end

-
+
 		-- Create Pub Dungeon Achievements Box==========================
 		me.Pub_box = iup.matrix {numcol=4, numcol_visible=4,  numlin=5, widthdef=100}
 		for i=1, 4 do  -- Load text
@@ -1211,7 +1211,7 @@ iup.Append(accounts[acc].char_tabs, accounts[acc].log_tab)

 	-- Create Trials  Character Box=======================

-
+
 		dung.Trials.box = iup.matrix {numcol=0,  numlin=#trial2key, widthdef=100}

 		function dung.Trials.box:mousemove_cb(l, c)
@@ -1281,7 +1281,7 @@ iup.Append(accounts[acc].char_tabs, accounts[acc].log_tab)

 		iup.Append(accounts[acc].dung_tabs, dung.Trials.tab)

-		-- Create Craglorn  Tab ============================================
+		-- Create Craglorn  Tab ============================================
 		for _,i in ipairs (Craglorn_Order) do
 			iup.Append(accounts[acc].dung_tabs, dung.Craglorn[i].tab)
 			-- Populate with character data ============================
diff --git a/data/Trial.lua b/data/Trial.lua
index 51dd71e..8e8884d 100644
--- a/data/Trial.lua
+++ b/data/Trial.lua
@@ -45,8 +45,8 @@ Craglorn_Dat["V"].id = {
 [1080] = {L=3, C=1, key ="31"},		-- "Time Trial: Hel Ra Citadel", "Completed the Hel Ra Citadel within a time limit of 33 minutes.",
 [990] = {L=4, C=1, key ="41"},		-- "Aetherian Archive Completed", "Defeat the Celestial Mage, freeing her from the Serpent's control."
 [1081] = {L=5, C=1, key ="51"},		-- "Time Trial: Aetherian Archive", "Completed the Aetherian Archive within a time limit of 33 minutes.",
-[1123] = {L=6, C=1, key ="61"},     -- "Sanctum Ophidia Completed", "Defeat the Celestial Serpent."
-[1124] = {L=7, C=1, key ="71"},     -- "Time Trial: Sanctum Ophidia", "Completed the Sanctum Ophidia within a time limit of 33 minutes.",
+[1123] = {L=6, C=1, key ="61"},		-- "Sanctum Ophidia Completed", "Defeat the Celestial Serpent."
+[1124] = {L=7, C=1, key ="71"},		-- "Time Trial: Sanctum Ophidia", "Completed the Sanctum Ophidia within a time limit of 33 minutes.",
 [992] = {L=8, C=1, key ="81"},		-- "Dragonstar Arena Champion",  "Conquer all challengers and earn the title of Dragonstar Arena Champion!",
 }
 Craglorn_Dat["V"].vet = true
@@ -55,7 +55,7 @@ Craglorn_Dat["V"].key = Craglorn2key["V"]
 Craglorn_Dat["VH"].id = {
 [1136] = {L=1, C=1, key ="11"},		-- "Hel Ra Citadel Difficult Mode","Defeat the Celestial Warrior after enraging him through the destruction of his statue army.",
 [1137] = {L=2, C=1, key ="21"},		-- "Aetherian Archive Difficult Mode" "Defeat the Celestial Mage after taunting her by smashing the Aetherial Orbs."
-[1138] = {L=3, C=1, key ="31"},     -- "Sanctum Ophidia Difficult Mode", Defeat the Celestial Serpent after desecrating the sacred banners of the Scaled Court",
+[1138] = {L=3, C=1, key ="31"},		-- "Sanctum Ophidia Difficult Mode", Defeat the Celestial Serpent after desecrating the sacred banners of the Scaled Court",
 [1140] = {L=4, C=1, key ="41"},		-- "Dragonstar Arena Conqueror", "Conquer all challengers on the increased difficulty version of Dragonstar Arena.",
 }

diff --git a/data/de/de.lua b/data/de/de.lua
index 5cf5ae2..559565c 100644
--- a/data/de/de.lua
+++ b/data/de/de.lua
@@ -74,6 +74,7 @@ DLC_names = {
 		Dungeons = "Verliese",
 		Mode = "Anzeige fuer",
 		Grp_TabName={},
+		Crag_TabName={},
 		Grp = "Gruppen",
 		Pub = "Offene",
 		Vet = "Veteranen",
@@ -102,6 +103,11 @@ L.Grp_TabName["1VH"] = "Mode 1VH"
 L.Grp_TabName["2N"] = "Mode 2N"
 L.Grp_TabName["2V"] = "Mode 2V"
 L.Grp_TabName["2VH"] = "Mode 2VH"
+
+L.Crag_TabName["N"] = "Craglorn Norm"
+L.Crag_TabName["V"] = "Craglorn Vet"
+L.Crag_TabName["VH"] = "Craglorn Hard"
+
 pub_names = {
 --EP
 	["11"]= "Kraehenwald",
diff --git a/data/en/en.lua b/data/en/en.lua
index 92bde0f..1db464f 100644
--- a/data/en/en.lua
+++ b/data/en/en.lua
@@ -101,9 +101,9 @@ L.Grp_TabName["2N"] = "Mode 2N"
 L.Grp_TabName["2V"] = "Mode 2V"
 L.Grp_TabName["2VH"] = "Mode 2VH"

-L.Crag_TabName["N"] = "N"
-L.Crag_TabName["V"] = "Vet"
-L.Crag_TabName["VH"] = "Hard"
+L.Crag_TabName["N"] = "Craglorn Norm"
+L.Crag_TabName["V"] = "Craglorn Vet"
+L.Crag_TabName["VH"] = "Craglorn Hard"

 pub_names = {
 --EP
diff --git a/data/fr/fr.lua b/data/fr/fr.lua
index 90e08bb..f341521 100644
--- a/data/fr/fr.lua
+++ b/data/fr/fr.lua
@@ -70,6 +70,7 @@ DLC_names = {
 		Dungeons = "Dungeons",
 		Mode = "Showing",
 		Grp_TabName={},
+		Crag_TabName={},
 		Grp = "Group",
 		Pub = "Public",
 		Vet = "Veteran",
@@ -99,6 +100,10 @@ L.Grp_TabName["2N"] = "Mode 2N"
 L.Grp_TabName["2V"] = "Mode 2V"
 L.Grp_TabName["2VH"] = "Mode 2VH"

+L.Crag_TabName["N"] = "Craglorn Norm"
+L.Crag_TabName["V"] = "Craglorn Vet"
+L.Crag_TabName["VH"] = "Craglorn Hard"
+
 pub_names = {
 --EP
 	["11"]= "Bois du corbeau",
diff --git a/data/keys.lua b/data/keys.lua
index 62cea60..8e3ad54 100644
--- a/data/keys.lua
+++ b/data/keys.lua
@@ -1,4 +1,4 @@
-
+---Keys  map what we put on a line. they are arrays (ipairs) line going down.
 -- Sequence to key (Pub and grp)
 grp1tokey = {
 --EP
@@ -68,6 +68,10 @@ Craglorn2key["V"] = {
 "21",	-- "Aetherian Archive"
 "31",	-- "Sanctum Ophidia",
 "41", 	-- "Dragonstar Arena",
+"51",	-- "Time Trial: Aetherian Archive", "Completed the Aetherian Archive within a time limit of 33 minutes.",
+"61",	-- "Sanctum Ophidia Completed", "Defeat the Celestial Serpent."
+"71",	-- "Time Trial: Sanctum Ophidia", "Completed the Sanctum Ophidia within a time limit of 33 minutes.",
+"81",	-- "Dragonstar Arena Champion",  "Conquer all challengers and earn the title of Dragonstar Arena Champion!",
 }
 Craglorn2key["VH"] = {
 "11",	-- "Hel Ra Citadel",
diff --git a/data/utility.lua b/data/utility.lua
index 3ef8261..dc6cb99 100644
--- a/data/utility.lua
+++ b/data/utility.lua
@@ -102,6 +102,40 @@ reverse_key = function (Adata)
 	"54",
 	}
 	return a reverse table lkiek this --]]
-
+

 end
+
+box_mousemove_funct = 	function (self, l, c, datfile)
+-- needs datfile to be set for the context
+
+		if l == 0 or c == 0 then
+			detail.title = ""
+			return
+		end
+
+		if datfile == nil then
+			detail.title = "datfile is nil"
+			return
+		end
+
+		local key = datfile.key[l]
+		if key == nil then
+			detail.title= "key is nil"
+			return
+		end
+
+		local ach = datfile.reverse_id[key]
+
+		if ach == nil then
+			detail.title = "No reverse lookup on " .. key
+			return
+		end
+		if Ach_Detail[ach] == nil then
+			detail.title = "No Achievement for " .. ach
+			print (detail.title)
+			return
+		end
+		detail.title = Ach_Detail[ach].description
+
+	end