mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
Packages system with .otpkg files
When otclient initializes it tries to find all .otpkg files inside the current search paths (./ ./modules ./addons) and then add them to the front of current search paths. This way .otpkg can contains many modules/addons and modifications in a single file that otclient can recognize. otpkg files can be compressed files supported by PhysFS, which are ZIP (.zip) and LZMA (.7z).
This commit is contained in:
@@ -27,7 +27,7 @@ function Skins.init()
|
||||
Skins.installSkins('skins')
|
||||
|
||||
if installedSkins[defaultSkinName] then
|
||||
g_resources.addToSearchPath(getSkinPath(defaultSkinName), 0)
|
||||
g_resources.addSearchPath(getSkinPath(defaultSkinName), 0)
|
||||
end
|
||||
|
||||
local userSkinName = g_settings.get('skin', 'false')
|
||||
@@ -50,9 +50,9 @@ function Skins.init()
|
||||
end
|
||||
|
||||
function Skins.terminate()
|
||||
g_resources.removeFromSearchPath(getSkinPath(defaultSkinName))
|
||||
g_resources.removeSearchPath(getSkinPath(defaultSkinName))
|
||||
if currentSkin then
|
||||
g_resources.removeFromSearchPath(getSkinPath(currentSkin.name))
|
||||
g_resources.removeSearchPath(getSkinPath(currentSkin.name))
|
||||
end
|
||||
|
||||
installedSkins = nil
|
||||
@@ -98,10 +98,12 @@ function Skins.setSkin(name)
|
||||
Skins.loadSkin(defaultSkin)
|
||||
end
|
||||
|
||||
if currentSkin then
|
||||
g_resources.removeFromSearchPath(getSkinPath(currentSkin.name))
|
||||
if currentSkin and currentSkin.name ~= defaultSkinName then
|
||||
g_resources.removeSearchPath(getSkinPath(currentSkin.name))
|
||||
end
|
||||
if skin.name ~= defaultSkinName then
|
||||
g_resources.addSearchPath(getSkinPath(skin.name), true)
|
||||
end
|
||||
g_resources.addToSearchPath(getSkinPath(skin.name), true)
|
||||
|
||||
Skins.loadSkin(skin)
|
||||
currentSkin = skin
|
||||
|
@@ -38,7 +38,7 @@ function UIMessageBox.display(title, message, flags)
|
||||
connect(messagebox, { onEscape = function(self) self:cancel() end })
|
||||
end
|
||||
|
||||
messagebox:lock()
|
||||
--messagebox:lock()
|
||||
|
||||
return messagebox
|
||||
end
|
||||
|
Reference in New Issue
Block a user