Files @ r24498:e9114d9ab04a
Branch filter:

Location: cpp/openttd-patchpack/source/src/saveload/CMakeLists.txt

Patric Stout
Fix #6468: don't store version of AIs-started-via-console in name

You can do: "startai myai.3", which starts version 3 of "myai".
This is very useful for testing save/load code between different
versions of your AI.

However, when using this syntax, the AI got saved as "myai.3" as
name of the AI, instead of "myai". This caused several problems,
like indicating to the user the AI could not be found, but still
load the AI. But in all cases, the AI never got the chance to
load the saved data, making the whole reason this exists pointless.

By splitting the name and version already in the console command,
the code becomes simpler and AIs started this way now follow the
normal flow after initialization.
add_files(
    afterload.cpp
    ai_sl.cpp
    airport_sl.cpp
    animated_tile_sl.cpp
    autoreplace_sl.cpp
    cargomonitor_sl.cpp
    cargopacket_sl.cpp
    cheat_sl.cpp
    company_sl.cpp
    depot_sl.cpp
    economy_sl.cpp
    engine_sl.cpp
    game_sl.cpp
    gamelog_sl.cpp
    goal_sl.cpp
    group_sl.cpp
    industry_sl.cpp
    labelmaps_sl.cpp
    linkgraph_sl.cpp
    map_sl.cpp
    misc_sl.cpp
    newgrf_sl.cpp
    newgrf_sl.h
    object_sl.cpp
    oldloader.cpp
    oldloader.h
    oldloader_sl.cpp
    order_sl.cpp
    saveload.cpp
    saveload.h
    saveload_filter.h
    saveload_internal.h
    signs_sl.cpp
    station_sl.cpp
    storage_sl.cpp
    strings_sl.cpp
    story_sl.cpp
    subsidy_sl.cpp
    town_sl.cpp
    vehicle_sl.cpp
    waypoint_sl.cpp
)