deactivateMod
Definition
-- @/lua/ge/extensions/core/modmanager.lua:834
local function deactivateMod(modname, preventStateChange)
if not mods[modname] then
log('I', 'deactivateMod', 'mod not existing ' .. tostring(modname))
return
end
local filename = mods[modname].fullpath
if FS:isMounted(filename) then
FS:unmount(filename)
end
local mountedFilesChange = nil
local mountPoint = ""
if mods[modname].mountPoint then
mountPoint = mods[modname].mountPoint
end
mountedFilesChange = _getModFsNotifFileList(modname,"deleted")
mods[modname].active = false
extensions.hook('onModDeactivated', deepcopy(mods[modname]))
if mountedFilesChange then
_G.onFileChanged(mountedFilesChange) --main.lua
end
if not preventStateChange then --
stateChanged()
end
end
Callers
@/ui/modules/automation/automation.js
if (vm.localData.active) {
bngApi.engineLua('core_modmanager.deactivateMod("' + vm.localData.modname + '")')
} else {
@/ui/modules/modmanager/modmanager.js
if (mod.active) {
bngApi.engineLua('core_modmanager.deactivateMod("' + mod.modname + '")')
} else {
if ($scope.mod.active) {
bngApi.engineLua('core_modmanager.deactivateMod("' + $scope.mod.modname + '")')
} else {
@/lua/ge/extensions/core/modmanager.lua
for modname, v in pairs(mods) do
M.deactivateMod(modname, true)
end
if name then
deactivateMod(name)
else
guihooks.trigger('modmanagerError', "Didn't found replacement for this mod : "..v.name)
deactivateMod(v.name)
else
@/ui/modules/repository/repository.js
if (vm.localData.active) {
bngApi.engineLua('core_modmanager.deactivateMod("' + vm.localData.modname + '")')
} else {