New version format for '/details', added '/details version' to an easy copy and paste
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
## SavedVariables: _detalhes_global
|
||||
## SavedVariablesPerCharacter: _detalhes_database
|
||||
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibGraph-2.0
|
||||
## Version: #@project-version@
|
||||
|
||||
#@no-lib-strip@
|
||||
Libs\libs.xml
|
||||
#@end-no-lib-strip@
|
||||
|
||||
@@ -15,17 +15,37 @@
|
||||
_detalhes.APIVersion = _detalhes.realversion --core version
|
||||
_detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" --simple stirng to show to players
|
||||
|
||||
_detalhes.acounter = 1 --in case of a second release with the same .build_counter
|
||||
_detalhes.curseforgeVersion = GetAddOnMetadata("Details", "Version")
|
||||
|
||||
function _detalhes:GetCoreVersion()
|
||||
return _detalhes.realversion
|
||||
end
|
||||
|
||||
_detalhes.BFACORE = 131 --core version on BFA launch
|
||||
_detalhes.SHADOWLANDSCORE = 143 --core version on Shadowlands launch
|
||||
--
|
||||
_detalhes.dragonflight_beta_version = 36
|
||||
|
||||
Details = _detalhes
|
||||
|
||||
local gameVersionPrefix = "Unknown Game Version - You're probably using a Details! not compatible with this version of the Game"
|
||||
--these are the game versions currently compatible with this Details! versions
|
||||
if (DetailsFramework.IsWotLKWow() or DetailsFramework.IsShadowlandsWow() or DetailsFramework.IsDragonflight()) then
|
||||
gameVersionPrefix = "WSD"
|
||||
end
|
||||
|
||||
Details.gameVersionPrefix = gameVersionPrefix
|
||||
|
||||
function Details.GetVersionString()
|
||||
local alphaId = _detalhes.curseforgeVersion:match("%-(%d+)%-")
|
||||
if (not alphaId) then
|
||||
--this is a release version
|
||||
alphaId = "R1"
|
||||
else
|
||||
alphaId = "A" .. alphaId
|
||||
end
|
||||
return Details.gameVersionPrefix .. Details.build_counter .. "." .. Details.acounter .. "." .. alphaId .. "(" .. Details.game_version .. ")"
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> initialization stuff
|
||||
local _
|
||||
|
||||
@@ -1649,3 +1649,37 @@ function _detalhes:FormatBackground (f)
|
||||
f.__background:SetHorizTile (true)
|
||||
f.__background:SetAllPoints()
|
||||
end
|
||||
|
||||
|
||||
function Details.ShowCopyValueFrame(textToShow)
|
||||
if (not DetailsCopyValueFrame) then
|
||||
local frame = CreateFrame("frame", "DetailsCopyValueFrame", UIParent)
|
||||
frame:SetSize(160, 20)
|
||||
frame:SetPoint("center", UIParent, "center", 0, 0)
|
||||
DetailsFramework:ApplyStandardBackdrop(frame)
|
||||
tinsert(UISpecialFrames, "DetailsCopyValueFrame")
|
||||
|
||||
frame.editBox = CreateFrame("editbox", nil, frame)
|
||||
frame.editBox:SetPoint ("topleft", frame, "topleft")
|
||||
frame.editBox:SetAutoFocus(false)
|
||||
frame.editBox:SetFontObject("GameFontHighlightSmall")
|
||||
frame.editBox:SetAllPoints()
|
||||
frame.editBox:SetJustifyH("center")
|
||||
frame.editBox:EnableMouse(true)
|
||||
|
||||
frame.editBox:SetScript("OnEnterPressed", function()
|
||||
frame.editBox:ClearFocus()
|
||||
frame:Hide()
|
||||
end)
|
||||
|
||||
frame.editBox:SetScript("OnEscapePressed", function()
|
||||
frame.editBox:ClearFocus()
|
||||
frame:Hide()
|
||||
end)
|
||||
end
|
||||
|
||||
DetailsCopyValueFrame:Show()
|
||||
DetailsCopyValueFrame.editBox:SetText(textToShow or "")
|
||||
DetailsCopyValueFrame.editBox:SetFocus()
|
||||
DetailsCopyValueFrame.editBox:HighlightText()
|
||||
end
|
||||
+4
-28
@@ -863,6 +863,9 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
_detalhes:ApplyProfile (profile, false)
|
||||
|
||||
elseif (msg == "version") then
|
||||
Details.ShowCopyValueFrame(Details.GetVersionString())
|
||||
|
||||
elseif (msg == "users" or msg == "version" or msg == "versioncheck") then
|
||||
Details.SendHighFive()
|
||||
|
||||
@@ -1676,41 +1679,14 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
end
|
||||
|
||||
print("|", msg)
|
||||
|
||||
print (" ")
|
||||
--local v = _detalhes.game_version .. "." .. (_detalhes.build_counter >= _detalhes.alpha_build_counter and _detalhes.build_counter or _detalhes.alpha_build_counter)
|
||||
--print (Loc ["STRING_DETAILS1"] .. "" .. v .. " [|cFFFFFF00CORE: " .. _detalhes.realversion .. "|r] " .. Loc ["STRING_COMMAND_LIST"] .. ":")
|
||||
|
||||
--print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_NEW"] .. "|r: " .. Loc ["STRING_SLASH_NEW_DESC"])
|
||||
print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_SHOW"] .. " " .. Loc ["STRING_SLASH_HIDE"] .. " " .. Loc ["STRING_SLASH_TOGGLE"] .. "|r|cfffcffb0 <" .. Loc ["STRING_WINDOW_NUMBER"] .. ">|r: " .. Loc ["STRING_SLASH_SHOWHIDETOGGLE_DESC"])
|
||||
--print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_ENABLE"] .. " " .. Loc ["STRING_SLASH_DISABLE"] .. "|r: " .. Loc ["STRING_SLASH_CAPTURE_DESC"])
|
||||
print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_RESET"] .. "|r: " .. Loc ["STRING_SLASH_RESET_DESC"])
|
||||
print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_OPTIONS"] .. "|r|cfffcffb0 <" .. Loc ["STRING_WINDOW_NUMBER"] .. ">|r: " .. Loc ["STRING_SLASH_OPTIONS_DESC"])
|
||||
print ("|cffffaeae/details|r |cffffff33" .. "API" .. "|r: " .. Loc ["STRING_SLASH_API_DESC"])
|
||||
--print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_CHANGES"] .. "|r: " .. Loc ["STRING_SLASH_CHANGES_DESC"])
|
||||
--print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_WIPECONFIG"] .. "|r: " .. Loc ["STRING_SLASH_WIPECONFIG_DESC"])
|
||||
print ("|cffffaeae/details|r |cffffff33" .. "me" .. "|r: open the player breakdown for you.") --localize-me
|
||||
print ("|cffffaeae/details|r |cffffff33" .. "spells" .. "|r: list of spells already saw.") --localize-me
|
||||
|
||||
--print ("|cffffaeae/details " .. Loc ["STRING_SLASH_WORLDBOSS"] .. "|r: " .. Loc ["STRING_SLASH_WORLDBOSS_DESC"])
|
||||
print (" ")
|
||||
|
||||
if (DetailsFramework.IsWotLKWow()) then
|
||||
--wraft of the lich kind classic, the retail version of details should work on lich king, so let's print here the retail build counter
|
||||
print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00DETAILS! VERSION|r: |cFFFFAA00W" .. _detalhes.build_counter)
|
||||
print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00GAME VERSION|r: |cFFFFAA00" .. _detalhes.game_version)
|
||||
|
||||
else
|
||||
--retail
|
||||
local v = _detalhes.game_version .. "." .. (_detalhes.build_counter >= _detalhes.alpha_build_counter and _detalhes.build_counter or _detalhes.alpha_build_counter)
|
||||
print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00DETAILS! VERSION|r: |cFFFFAA00R" .. (_detalhes.build_counter >= _detalhes.alpha_build_counter and _detalhes.build_counter or _detalhes.alpha_build_counter))
|
||||
print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00GAME VERSION|r: |cFFFFAA00" .. _detalhes.game_version)
|
||||
end
|
||||
|
||||
if (DetailsFramework.IsDragonflight()) then
|
||||
print("Dragonflight BETA VERSION:", _detalhes.dragonflight_beta_version)
|
||||
end
|
||||
print("|cFFFFFF00DETAILS! VERSION|r:|cFFFFAA00" .. " " .. Details.GetVersionString())
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user