Files @ r24498:e9114d9ab04a
Branch filter:

Location: cpp/openttd-patchpack/source/src/core/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(
    alloc_func.cpp
    alloc_func.hpp
    alloc_type.hpp
    backup_type.hpp
    bitmath_func.cpp
    bitmath_func.hpp
    endian_func.hpp
    endian_type.hpp
    enum_type.hpp
    geometry_func.cpp
    geometry_func.hpp
    geometry_type.hpp
    kdtree.hpp
    math_func.cpp
    math_func.hpp
    mem_func.hpp
    multimap.hpp
    overflowsafe_type.hpp
    pool_func.cpp
    pool_func.hpp
    pool_type.hpp
    random_func.cpp
    random_func.hpp
    smallmap_type.hpp
    smallmatrix_type.hpp
    smallstack_type.hpp
    smallvec_type.hpp
    string_compare_type.hpp
)