diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-04-17 14:54:50 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-04-19 20:14:53 +0100 |
commit | 87ad4d8e7f25210cd28d9f2b372aa00aa3dab929 (patch) | |
tree | ddeeed2ddca984f0999437517bfdca120919ecd2 /builtin/mainmenu/dlg_rename_modpack.lua | |
parent | 36eb823b1cebc92cd7802368ab0bdc5b3679a3cd (diff) | |
download | dragonfireclient-87ad4d8e7f25210cd28d9f2b372aa00aa3dab929.tar.xz |
Add online content repository
Replaces mods and texture pack tabs with a single content tab
Diffstat (limited to 'builtin/mainmenu/dlg_rename_modpack.lua')
-rw-r--r-- | builtin/mainmenu/dlg_rename_modpack.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/builtin/mainmenu/dlg_rename_modpack.lua b/builtin/mainmenu/dlg_rename_modpack.lua index 959c65d9b..2b383993f 100644 --- a/builtin/mainmenu/dlg_rename_modpack.lua +++ b/builtin/mainmenu/dlg_rename_modpack.lua @@ -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 |