We used to create a new ai_info object in the constructor of
playsingle_controller in order to reset it on scenario changes.
Now when the AI manager is a part of game state, resetting the game state
implicitly creates a new ai_info object, and setting the AI info manually
is no longer necessary.
This also ensures that ai_info can't ever be null, fixing #2522.
In the process, I also discovered that ai::registry::init() doesn't do
anything, so I removed it, its declaration, and ai/registry.hpp which
contained nothing except said function declaration.
The following have been enabled. They no longer cause any errors or warnings.
* C4819
* C4355
* C4351
* C4345
The following has been disabled globally and will be handled in individual cases:
* C4996
The following have been moved to the project files (meaning they become global in
their respective projects):
* C4250 (in wesnoth)
* C4244 (in wesnoth, wesnoth-lib, wesnothd, and campaignd)
The following has been left alone since I don't build the unit tests:
* C4702
* Some improvements to the messages
* Don't clobber existing metatables on deprecated subtables
* Fix Lua deprecation messages not even being logged
* Fix deprecation of Lua subtables
* Don't clobber the metatable when deprecating a subtable
* Removed bad openssl include and tuned header search paths
* Xcode project now requires libreadline 7.0 .
Added Fix_Xcode_Dependencies script. Just run it and script take care about all dependencies. No longer need to download Mac Compile Stuff.
Xcode now outputs .app which searches for .dylibs and .frameworks inside Frameworks directory in .app bundle.
* Some fixes and improvements
This commit made with help from @singalen
Previously, MP Staging was using connect_engine::connected_users() to fill in the user list.
However, I noticed that the server was already sending the user list to all clients, including
the host, so I could unify the handling between Staging and Join Game by just using the server
data for both.
I've also added appropriate indicators for host, observer, and self in the list for both dialogs.
Additional host= and observer= status keys are sent by the server for that purpose.
I've also made the server dispatch the player list to the host when a game is created. This is
slightly redundant, since the host is the only player at that point, but it's easier than creating
a user config locally, or using connected_users(), not to mention easier to maintain.
The wesnothd::game::send_user_list function no longer exists early id `description_` is null.
No idea why it did that. It's not even used in the function. Anyway, it needed to be removed in
order for the above change to work.
Speaking of the host's copy of the player list, I haven't touched that. It's still needed for
managing things in the connect_engine. Might simplify things further in the future by delegating
more handling to the server, since it has a lot of the data needed already, but that's a different
project.
This mostly has to do with moving various components into more logical locations instead of
all mushed together in gui/widgets/settings.*pp. To that end, the following changes have been
made:
* The gui2::init function has been moved to its own file in the gui/ toplevel.
* load_settings() has been merged into init().
* All functions and code relating to gui theme definitions have been moved to their own file.
* All code relating to widgets or window static init have been moved to their own file.
* window::update_screen_size has been moved out of the window class and into settings.cpp.
* The unimplemented free-stadnding version of load_widget_definitions has been removed.
* gui_definition::read and gui_defintion::load have been merged into the gui_definition ctor
and greatly simplified.
* Some functions relating to builder_widgets have been renamed for clarity.
* add/remove_single_widget_defintion now access the current gui theme instead of the default.
This looks like it was a mistake made in the original code.
* Since the static registry is now externally linked, the unit tests accessor for window types
has been removed.
* Documentation has been updated. The wikidoc comment for gui_definition has been removed. It
was rather out-of-date and needed to be reworked anyway.
* widget_builder_func_t's signature is now to take a config reference and not a copy, though
REGISRER_WIDGET had already passed register_builder_widget a lambda that took a reference.
* Various other misc cleanups and improvements.