Files
florian.berthold 4a65f00aca
release / release (push) Successful in 3s
vendor: Libs/ from coa-ace3 + LibBabble-Zone / LibWindow; pin TOC version
Upstream Mapster relies on the CurseForge packager to fetch its libs
at release time; the raw repo has no Libs/ folder, so the freshly-
imported addon failed to load (LibStub missing).

- Vendored canonical Ace3 from coa-ace3 (11 libs Mapster's TOC loads:
  LibStub, CallbackHandler-1.0, AceAddon-3.0, AceEvent-3.0, AceHook-3.0,
  AceDB-3.0, AceDBOptions-3.0, AceLocale-3.0, AceGUI-3.0, AceConsole-3.0,
  AceConfig-3.0). This brings the CoA-compat FileDataID / BlizOptionsGroup
  parent-guard / Settings.* fallback / AceDB falsy-defaults patches.
- LibBabble-Zone-3.0 and LibWindow-1.1 vendored from the working PTR
  install (not part of Ace3).
- TOC: replaced @project-version@ CurseForge placeholder with the real
  release string 1.3.9-coa.2 so the in-game About panel reads correctly.

Mapster source itself was clean against the PORTING.md checklist
(no FDID calls, no retail-only globals, no Minimap mask trap, no CLEU
arg mismatch) — expected, since 1.3.9 was the WotLK-era release.
2026-05-25 13:11:21 +02:00

31 lines
1.3 KiB
Lua

-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
local LibStub = _G[LIBSTUB_MAJOR]
if not LibStub or LibStub.minor < LIBSTUB_MINOR then
LibStub = LibStub or {libs = {}, minors = {} }
_G[LIBSTUB_MAJOR] = LibStub
LibStub.minor = LIBSTUB_MINOR
function LibStub:NewLibrary(major, minor)
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
minor = assert(tonumber(string.match(minor, "%d+")), "Minor version must either be a number or contain a number.")
local oldminor = self.minors[major]
if oldminor and oldminor >= minor then return nil end
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
return self.libs[major], oldminor
end
function LibStub:GetLibrary(major, silent)
if not self.libs[major] and not silent then
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
end
return self.libs[major], self.minors[major]
end
function LibStub:IterateLibraries() return pairs(self.libs) end
setmetatable(LibStub, { __call = LibStub.GetLibrary })
end