I want to make s simple Cartographer module that would keep track of the different FlightMasters. So I copied Cartographer_ExtractGas, fiddled with it a bit and it seemed to be working (it wrote one note to the Cartographer_FlightMaster. I fiddled some more and (a long time after I stopped fiddling) I realised the Cartographer_FlightMaster.lua was no longer updated with the notes, but the Cartographer.lua was.
Now I've compared the code with Cartographer_ExtractGas, Cartographer_Mailboxes, and some others and the differences are minimal. Still, I guess, I'm doing something wrong.
This appears to be all the code involved with the database.
function mod:OnInitialize()
-- general options stuff
self.db = Cartographer:AcquireDBNamespace("FlightMaster")
Cartographer:RegisterDefaults("FlightMaster", "profile", {
iconAlpha = 1,
iconScale = 1,
minicons = true,
})
if not Cartographer_FlightMasterDB then
Cartographer_FlightMasterDB = {}
end
end
function mod:OnEnable()
if Cartographer_Notes then
Cartographer_Notes:RegisterIcon('FlightMaster', {text = L["Flight Master"],
path = "Interface\\TaxiFrame\\UI-Taxi-Icon-Green"
}
)
Cartographer_Notes:RegisterNotesDatabase('FlightMaster', Cartographer_FlightMasterDB, self)
else
Cartographer:ToggleModuleActive(self, false)
end
self:RegisterEvent("TAXIMAP_OPENED", function() self:SetNote() end, 2)
end
function mod:SetNote()
local x, y = GetPlayerMapPosition("player")
if x == 0 and y == 0 then return end
local npcName, _ = UnitName("target")
local zone = GetRealZoneText()
-- check if we have an existing note, if not add one
if not Cartographer_Notes:GetNearbyNote(zone, x, y, 0.10, 'FlightMaster') then
Cartographer_Notes:SetNote(zone, x, y, 'FlightMaster', L["Flight Master"],'title', npcName)
end
end
Means you will be saving it in the Cartographer DB and not your own. Now I suggest you give up on this idea and just use HandyNotes since Cartographer is on life support.
Well since Cartographer3 doesn't have icons I'm sure its a complex issue caused by Cartographer3 allowing you to zoom and some other mod creating icons that are scaled to the worldmaps size.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Now I've compared the code with Cartographer_ExtractGas, Cartographer_Mailboxes, and some others and the differences are minimal. Still, I guess, I'm doing something wrong.
This appears to be all the code involved with the database.
Any suggestions are welcome.
Means you will be saving it in the Cartographer DB and not your own. Now I suggest you give up on this idea and just use HandyNotes since Cartographer is on life support.
So, how come those other addons save their data in their own file (they seem to be using the same code)?
So, how should I code it? (Rather than telling me to use yet again something else...)
So, why is Cartographer on life support?
Right?
The only thing that gets written there is a Version label...
ck has already made a Cartographer 3.0 which isn't compatible with the current trunk version.
Any idea when it will be released? Or where to find it, if it has been released already?
It's on CurseForge.
Grr, but has he fixed the icon scaling issue??
<3 being zoomed all the way in and having the icon for the flight master being half the size of the zone :\