New version format for '/details', added '/details version' to an easy copy and paste

This commit is contained in:
Tercio Jose
2022-10-04 18:31:53 -03:00
parent aa143dcf6e
commit 54510ee298
4 changed files with 62 additions and 30 deletions
+22 -2
View File
@@ -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 _