Ticket #2807: replayWithoutModsErrorMessage_v1.diff

File replayWithoutModsErrorMessage_v1.diff, 1.3 KB (added by Arno Hemelhof, 8 years ago)

Displays an error message when you try to view a replay without specifying any mods

  • binaries/data/mods/public/gui/credits/texts/programming.json

     
    2424            {"nick": "Alan", "name": "Alan Kemp"},
    2525            {"nick": "aBothe", "name": "Alexander Bothe"},
    2626            {"nick": "alpha123", "name": "Peter P. Cannici"},
     27            {"nick": "ArnH", "name": "Arno Hemelhof"},
    2728            {"nick": "Aurium", "name": "Aurélio Heckert"},
    2829            {"nick": "badmadblacksad", "name": "Martin F"},
    2930            {"name": "Mikołaj \"Bajter\" Korcz"},
  • source/main.cpp

     
    453453    // run non-visual simulation replay if requested
    454454    if (isReplay)
    455455    {
     456        // make sure there is a mod specified.
     457        // We won't find the files needed for the simulation otherwise.
     458        if (!args.Has("mod"))
     459        {
     460            debug_printf("ERROR: At least one mod should be specified! None were detected!\nIf you intended to use the official mod, do so by adding the argument '-mod=public'.\n");
     461            return;
     462        }
    456463        Paths paths(args);
    457464        g_VFS = CreateVfs(20 * MiB);
    458465        g_VFS->Mount(L"cache/", paths.Cache(), VFS_MOUNT_ARCHIVABLE);