Thread: 1.6 update
View Single Post
02/28/15, 10:58 PM   #51
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Little things I'll add in my Addons :

First.. versioning, we all know that Firefox 3.6 was better than IE6/7/8 and VLC stayed too long as a 0.x software. Are you using svn/git revs?

Plus we got a good anchor to link our addon versioning : ESO Updates
So for me, 0.1, 0.2, 0.10.1.a-2-r12 -> Justice-r1, Justice -r2, Justice-r3, ImperialCity-r1, etc.
It's also a great help to me because not all my addons got same original versioning.
We're a lot to handle an addon not originaly made by ourselves

As an exemple, the most downloaded addon Skyshard is at v1.7.8 and the most outdated popular addon, TreasureMaps (outdated since May 2014), is v1.95 ... - _ -

Agree or Not !

Then a little snippet of code I'll add inside my addons, especially if your addons is very downloaded :


Lua Code:
  1. function pChat.onPlayerActivated()
  2.    
  3.     pChat.outdatedWarning()
  4.     -- some code
  5.  
  6. end
  7.  
  8. function pChat.outdatedWarning()
  9.  
  10.     if GetAPIVersion() ~= "100011" then
  11.         if not pChat.opts.outdatedflag then
  12.             -- pChat.opts is my ZO_SavedVars
  13.             CHAT_SYSTEM:AddMessage("Hello, it's " .. pChat.name .. ". It seems that you have not updated this Addon since few times. Please consider visit www.esoui.com to update your addon, Thank you.")
  14.             pChat.opts.outdatedflag = true
  15.         end
  16.     else
  17.         pChat.opts.outdatedflag = false
  18.     end
  19.  
  20. end
  21.  
  22. EVENT_MANAGER:RegisterForEvent(pChat.name, EVENT_PLAYER_ACTIVATED, pChat.onPlayerActivated)

It will show a message to encourage user to update when 100012 will pop (~ 6 Months)
Then, I'll change the raw value to the new one, etc
  Reply With Quote