1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-26 18:21:04 +00:00

Add online content repository

Replaces mods and texture pack tabs with a single content tab
This commit is contained in:
rubenwardy 2018-04-17 14:54:50 +01:00
parent 36eb823b1c
commit 87ad4d8e7f
No known key found for this signature in database
GPG key ID: A1E29D52FF81513C
46 changed files with 1696 additions and 860 deletions

View file

@ -18,8 +18,8 @@
--------------------------------------------------------------------------------
local function rename_modpack_formspec(dialogdata)
dialogdata.mod = modmgr.global_mods:get_list()[dialogdata.selected]
dialogdata.mod = pkgmgr.global_mods:get_list()[dialogdata.selected]
local retval =
"size[11.5,4.5,true]" ..
@ -29,7 +29,7 @@ local function rename_modpack_formspec(dialogdata)
fgettext("Accept") .. "]" ..
"button[5.75,3.5;2.5,0.5;dlg_rename_modpack_cancel;"..
fgettext("Cancel") .. "]"
return retval
end
@ -39,14 +39,14 @@ local function rename_modpack_buttonhandler(this, fields)
local oldpath = core.get_modpath() .. DIR_DELIM .. this.data.mod.name
local targetpath = core.get_modpath() .. DIR_DELIM .. fields["te_modpack_name"]
core.copy_dir(oldpath,targetpath,false)
modmgr.refresh_globals()
modmgr.selected_mod = modmgr.global_mods:get_current_index(
modmgr.global_mods:raw_index_by_uid(fields["te_modpack_name"]))
pkgmgr.refresh_globals()
pkgmgr.selected_mod = pkgmgr.global_mods:get_current_index(
pkgmgr.global_mods:raw_index_by_uid(fields["te_modpack_name"]))
this:delete()
return true
end
if fields["dlg_rename_modpack_cancel"] then
this:delete()
return true