@@ -425,18 +425,23 @@ local function getWorldModlist(detailed)
425425 path = tostring (path .value )
426426 -- skip vanilla "mods"
427427 if not path :startswith (INSTALLED_MODS_PATH ) then goto continue end
428- local id = scriptmanager .get_mod_id_and_version (path )
429- if not id then goto continue end
430- mods [id ] = {handled = true }
428+ local id , version , name , steam_id = scriptmanager .get_mod_id_and_version (path )
429+ if not id or not version then goto continue end
430+ mods [id ]= {handled = true , name = name , version = version , steam_id = steam_id }
431431 scriptmanager .add_mod_paths (mod_paths , id , path , ' .' )
432432 :: continue::
433433 end
434434 local modlist = {}
435435 for _ ,mod in ipairs (mod_paths ) do
436+ printall_recurse (mods )
436437 if detailed then
437- table.insert (modlist ,(' %s %s (%s)' ):format (mod .name , mod .version , mod .id ))
438+ local url
439+ if mods [mod .id ].steam_id then
440+ url = ' https://steamcommunity.com/sharedfiles/filedetails/?id=' .. mods [mod .id ].steam_id
441+ end
442+ table.insert (modlist ,(' %s %s (%s): %s' ):format (mods [mod .id ].name or mod .id , mods [mod .id ].version or ' ' , mod .id , url or ' ' ))
438443 else
439- table.insert (modlist ,mod .name )
444+ table.insert (modlist ,mods [ mod .id ]. name or mod . id )
440445 end
441446 end
442447 return modlist
@@ -464,7 +469,7 @@ function ModlistMenu:init()
464469 },
465470 widgets .HotkeyLabel {
466471 view_id = ' copy' ,
467- frame = {t = 1 , r = 1 },
472+ frame = {t = 2 , r = 1 },
468473 label = ' Copy list to clipboard' ,
469474 text_pen = COLOR_YELLOW ,
470475 auto_width = true ,
0 commit comments