77620 Commits

Author SHA1 Message Date
newfrenchy83
73b18717d3 fix invalide initialisation of preprocess_file in wml_equivalence 2020-12-05 14:15:31 -06:00
newfrenchy83
ba3d2ea989 update test.cpp in codeblock projectfiles 2020-12-05 14:12:41 -06:00
loonycyborg
c1ad27a0c4 Fix compile error in forum_user_handler due to mission asio #include 2020-12-05 17:07:59 +03:00
Charles Dang
bf1078c25e Fixed some typos 2020-12-06 00:41:06 +11:00
Charles Dang
b0426a4b36 Cleaned up boost::asio includes
No need to include the whole massive boost/asio.hpp header when not everything in it is needed.
2020-12-05 23:24:59 +11:00
Nils Kneuper
f1b9df1caf updated Portuguese (Brazil) translation 2020-12-05 12:51:16 +01:00
Charles Dang
50ed04319d FIlesystem: used scoped enums 2020-12-05 22:03:01 +11:00
Elvish_Hunter
351f7cafcc wmllint: added support for custom conditional tags with magic comments 2020-12-05 11:03:40 +01:00
Pentarctagon
ba89526cec
Put these checks in the same place. 2020-12-04 17:21:59 -06:00
Charles Dang
e9252bd9f2 Default to jpg screenshots by default 2020-12-05 09:31:04 +11:00
Charles Dang
6adc9ab76f Bump SDL_Image dependency to 2.0.2 and enable jpg screenshots unconditionally 2020-12-05 09:30:17 +11:00
Iris Morelle
237c9c34dd wml/preprocessor: Reduce code duplication in preprocessor conditionals
The code handling #if(n)def and #if(n)have is largely the same in both
the normal and the negated paths, making two code paths redundant. This
commit unifies each pair as it should have been done from the beginning.

This commit also alters the implementation of #if(n)ver very slightly so
we do a single char check instead of comparing against a whole string a
second time (we definitely don't need to compare the full thing).
2020-12-04 15:13:04 -03:00
Iris Morelle
acc8dc400d gettext: We don't need the entirety of Boost.Locale
This may seem unimportant, but the full thing is actually pretty big and
very few places use it.

(Yes, gettext.cpp needs it.)
2020-12-04 14:14:56 -03:00
Iris Morelle
5ab41ee9f9 fs: Un-inline non-trivial blacklist_pattern_list methods
This allows us to drop the hard dependency on <algorithm>, <functional>,
and serialization/string_utils.hpp from filesystem.hpp, which should
make the latter less of a heavyweight include in places that otherwise
don't need those headers.

There are no performance concerns here because the class as a whole is
rarely used in general and never in performance-sensitive code.

This commit also addresses a few side-effects of other files
piggybacking on the filesystem.hpp dependencies.
2020-12-04 13:45:31 -03:00
Iris Morelle
48bfa7abb8 image: Drop get/set_team_colors() functions
These are dead code. set_team_colors() is used in a couple of places as
well as a unit test, but get_team_colors() is never used and neither is
the actual variable behind both. The documentation alluded to it being
used by the ~TC() image path function, but in reality that uses the team
API instead (team::get_side_color_range()).

This does raise a concern however -- the unit test that did use
set_team_colors() used it with trivial and predictable input, so it
wasn't actually testing it. Not sure how we would go about properly
testing ~TC() -- the image path function tests don't currently test
any single image mod's output correctness.
2020-12-04 12:47:24 -03:00
Pentarctagon
48b5db9672
Only need errors. 2020-12-04 08:56:18 -06:00
Pentarctagon
fff15b9bd1
Fixup. 2020-12-04 08:54:54 -06:00
Pentarctagon
f23ea9e563
Make notification smaller. 2020-12-04 08:54:03 -06:00
Pentarctagon
a7bc07d5ee
Don't send notification for failed PRs. 2020-12-04 08:37:24 -06:00
kabachuha
f687be92bd update changelog 2020-12-04 16:30:55 +03:00
kabachuha
f84cfde76f remove doubled checks for game membership
If the player is a part of the game, their ptr is valid, so the is_member call is useless.
2020-12-04 14:17:45 +01:00
kabachuha
af579c6bf1 add '/roll N' command to games and game lobbies
Adds '/roll N' command which gets a random number between 1 and N and prints it as "$username rolled a die [1 - $N] and got $value." to the game creation lobby chat or just to the sender otherwise (so not to flood the main chat).

The roll handler uses a uniform distribution generator, however with an additional mt rng from std library instead of the built-in wesnoth rng as the uniform distribution generator can use only a specially formatted rng engine.
2020-12-04 14:17:45 +01:00
Steve Cotton
3bc5badbf3 Move get_orb_image() to the only .cpp file that calls it
Removes orb_status.hpp from an include-chain that lead to picture.hpp, however
that's unimportant. While orb_status.hpp was the first path from display.hpp to
picture.hpp, display.hpp later includes picture.hpp directly.
2020-12-04 13:10:41 +01:00
Charles Dang
460d7368eb GUI2/Window: used a scoped enum for status 2020-12-04 22:30:07 +11:00
Martin Hrubý (hrubymar10)
2673db12e4
Fix Xcode project 2020-12-04 11:44:37 +01:00
Charles Dang
1bfa81f50c GUI2: dropped some constructors marked deprecated
The common pattern is to pass the widget's builder to the ctor.
2020-12-04 20:34:22 +11:00
Pentarctagon
ff360d7d95 Don't show redundent details on push vs pull request. 2020-12-04 00:20:10 -06:00
Charles Dang
3b69456dd5 GUI2/Size Lock: pass builder_widget reference directly to finalize 2020-12-04 16:22:30 +11:00
Iris Morelle
9de5c60a72 image: Drop redundant include
Absolutely nothing here uses SDL 2 out in the open.
2020-12-04 02:19:47 -03:00
Iris Morelle
2f80397bd6 image: Doxygen documentation
Mostly formatting and wording improvements. Also added a longer
description for the namespace explaining IPFs, image formats and the
image cache briefly.
2020-12-04 02:19:47 -03:00
Iris Morelle
7d0e586eac image: Formatting
No code changes here.
2020-12-04 02:19:47 -03:00
Charles Dang
6e2f3e099e Removed utils/functional.hpp 2020-12-04 15:30:46 +11:00
Charles Dang
30c7a747ab Explicitly specify std::placeholders namespace for all bind placeholders
Apparently, even on Boost 1.73 without Boost placeholders specialized as is_placeholder, they were somehow
getting used in the global namespace. Would explain all the "Boost placeholders in the global namespace is
deprecated" warnings I was getting after 23d1db043f9f8266c77c6270ed4ef3eafbc0cf67.

When testing with BOOST_BIND_NO_PLACEHOLDERS, even though I had `using namespace std::placeholders` in utils/functional.hpp,
compilation still failed in places. This confirms even more that Boost global placeholders were being used. Honestly,
it was simplest just to specify std::placeholders for everything. This also means we can remove the hack in utils/functional.hpp
designed to allow Boost placeholders to work with `std::bind`.
2020-12-04 15:28:15 +11:00
Charles Dang
472fba4e76 GUI2/Window: used a scoped enum for show_mode 2020-12-04 13:52:14 +11:00
Iris Morelle
4db2abcc9c addon/info: Simplify operator= methods
These methods are actually the compiler's defaults. We do need to keep
them around in some capacity because of the explicitly defined default
constructors, so just explicitly default them instead of keeping extra
redundant code around.
2020-12-03 23:49:53 -03:00
Iris Morelle
85b6daa9c9 campaignd: Drop plain text passphrase migration
Closes #5080.
2020-12-03 23:49:53 -03:00
Iris Morelle
f7e8d3770f addon/state: Remove unused enum types
These were part of the GUI1 Add-ons Manager implementation.
2020-12-03 23:49:53 -03:00
Charles Dang
ab770d1cba GUI2/Network Transmission: rethrow any exceptions from the poller in the main thread
This is the same method used by the loading screen. Basically, connection::poll could throw and that exception
wasn't caught in the worker. Instead, it got stored in the std::future object, but was never accessed and therefor
never propagated.
2020-12-04 13:14:33 +11:00
Charles Dang
ba1dbe56e3 VS: removed 32 bit target from wesnothlib and wesnothd
Was already removed from wesnoth, campaignd, and liblua.
2020-12-04 13:14:33 +11:00
Pentarctagon
257f1810af Add Discord notification when build fails. 2020-12-03 18:52:49 -06:00
Charles Dang
23d1db043f
Removed patched boost::bind (#5339)
This seemed to be a patch for older compilers (GCC 4.8/4.9, see 3c56630b54)
which we no longer support.
2020-12-04 11:45:16 +11:00
Charles Dang
2371b8af60 GUI2: marked builders' virtual build() function overrides as such 2020-12-04 10:09:11 +11:00
Elvish_Hunter
e7c96a2619 Changelog entry 2020-12-03 21:58:57 +01:00
Elvish_Hunter
1fd4111cb9 Merge branch 'master' of github.com:wesnoth/wesnoth 2020-12-03 21:40:17 +01:00
Elvish_Hunter
785bd018e6 wmllint: prevent a crash if CLEAR_VARIABLE and its arguments aren't on the same line 2020-12-03 21:33:49 +01:00
Elvish_Hunter
845887dfa6 wmllint: prevent a crash if an [attack] tag without the corresponding [/attack] is found 2020-12-03 21:12:21 +01:00
Elvish_Hunter
a5207027fe wmllint: don't quit when finding a mask= key not referencing a .mask file
Fixes #5324
2020-12-03 21:01:15 +01:00
Elvish_Hunter
5e4ba6c01b wmllint: fix a crash if advances_to= is placed before id= in [unit_type]
This was supposed to be a part of the fix for #4102, but for some reason it never got committed.
2020-12-03 20:55:12 +01:00
Pentarctagon
c7643e0785
Fix macOS CI. 2020-12-03 11:48:17 -06:00
Charles Dang
7bdd72886d GUI2/Window: don't create raw window pointers 2020-12-04 01:01:32 +11:00