77174 Commits

Author SHA1 Message Date
kabachuha
eb04570430 Split addons meta from the server config
Redid campaignd's storage architecture so add-on metadata is stored separate from the server configuration (and not duplicated in the individual full packs).

The update packs has not been implemented yet.

Tested on my pet server.
2020-10-15 10:39:19 -03:00
Nils Kneuper
ab5244e906 updated Czech translation 2020-10-15 12:47:55 +02:00
Nils Kneuper
64aab80459 updated Portuguese (Brazil) translation 2020-10-15 12:45:19 +02:00
Pentarctagon
75ce7161ee
Only build on pushes to PRs or the master branch.
Currently a push to a branch on the main repository that also has a PR open results in two separate travis builds being run - one for the branch and one for the PR.
2020-10-15 01:27:51 -05:00
V N
74bd0dca54 Fix tip for Oasis healing 2020-10-15 05:44:07 +02:00
Celtic Minstrel
988bf973e9
Merge pull request #5198 from wesnoth/thread_safe_logging
Thread-safe logging

Closes #5209
2020-10-14 23:30:02 -04:00
Pentarctagon
5cab8f2780
Add boost version increment for wesnothd+database support builds. 2020-10-14 19:41:19 -05:00
Pentarctagon
467e4312b9 Add support for executing async queries.
Making the logging correctly handle multiple threads writing to the same stream at the same time will be handled separately later.
2020-10-14 19:38:49 -05:00
Steve Cotton
8b1c6cf59d Another go at refactoring distributor.cpp (builds and runs successfully)
This is part-way though a refactor, but I'm not committing myself to completing
it; publishing for the comments and discussion.

This solves PR #5198's compile errors about undefined references, but the
solution here is to expand the templates into the multiple hardcoded copies
block starting with `switch(events_.sdl_button_down_event)`.
2020-10-14 08:50:03 -04:00
Celtic Minstrel
a1f44d8f64 Implement thread-safety in the logging system
This chooses a method that minimizes the need to alter the way log messages are written.
Only a few places that did unusual things with the logger needed to be updated.
2020-10-14 08:49:52 -04:00
IceTyp
90e979a7fd
Changed experience requirement for some monster units
Changed experience of Cave Bear to 100 since the Cave Bear is L2 and has no advancements.
Changed experience of Great Icemonax to 100
Changed experience of Giant Stoat to 25 since this unit is L0 and has no advancements.
Give Tusklet the Gorer as advancement since Tusklet (L0) and Gorer (L1) are of the same unit line.
Changed experience of Gorer to 50 since the Gorer is L1 and has no advancements.
Changed experience of Giant Ant to 25 since the Giant Ant is L0 and has no advancements.
2020-10-13 10:08:58 -05:00
Charles Dang
c6bda4f936 GUI2/Distributor: silence an unhandled event warning
I did notice this seemed able to arise after 555d8b667d6f6401fbfe8f8ce01be14c8b2f5ddd and/or 0571fefda3fa93a30f74e17a52f53a43710d4fe5,
but these have never really been issues to worry about.
2020-10-14 01:41:38 +11:00
Charles Dang
209b525f67 Consistent overrides 2020-10-14 01:40:43 +11:00
Steve Cotton
d7f6d8646b Remove ancient commented-out code in the event distributor
These have been unused since their introduction in 2009.
2020-10-13 15:30:01 +02:00
Charles Dang
ca84e724ad GUI2/Dispatcher: code formatting 2020-10-13 23:16:14 +11:00
Charles Dang
d43ef02088 Replace stray uses of Uin8 with uint8_t 2020-10-13 23:12:14 +11:00
Charles Dang
5b71e1b55c GUI2/Dispatcher: simplified callback function aliases with an alias template
This guarantees all events have the same initial four parameters. Also improved documentation.
2020-10-13 23:12:09 +11:00
Gregory A Lundberg
af323dcb98 More missing override specifiers. 2020-10-13 22:17:55 +11:00
Charles Dang
0571fefda3 GUI2: finished refactoring out usage of boost::mpl
dispatcher::has_event called the private find() function, which after a whole bunch of
jumping around essentially checked that the signal queue for the given event was not
empty. This was a run-time op, yet the code was set up using SFINAE in order to for
has_handler::oper() to call the event_signal function corresponding to the event's queue
(ie, the mouse queue for a mouse-type event).

Since this code was written before the era of constexpr, event type validation was done
using boost::mpl, which, in this case, resulted in a monstrous amalgamation of build-time
template specialization for a run-time check. I'm not certain, but I believe it might
have resulted in an specialization of find() (or at least, implementation::find()) for
every single event type (each member of the ui_event enum).

This converts the code to a purely run-time check and throws out all the template stuff.
It also removes the relevant event_signal overload dealing with events in a set. The
version dealing with function types is preserved as it's used in the fire_event()
implementation and is a fairly standard usecase of SFINAE.

The has_handler class has also been converted to a static function since it's no longer
needed for template specializations in find().

And finally, is_raw_event had to be renamed to is_raw_event_event to allow simple name
completion in IMPLEMENT_RUNTIME_EVENT_SIGNAL_CHECK. I could have also renamed the raw event
queue to signal_raw_queue but I figured keeping the name as signal_raw_event_queue made
its purpose clearer.
2020-10-13 22:17:18 +11:00
Charles Dang
0069942e2a Merge branch 'master' of github.com:wesnoth/wesnoth 2020-10-13 21:16:31 +11:00
Charles Dang
555d8b667d GUI2: reimplemented [dis]connect_signal SFINAE using constexpr functions
This replaces the use of the boost::mpl::set lists. It replaces those damn things with simple
constexpr functions that check the template parameter against an accepted list for each event
type. This is a *lot* simpler.

These helpers are also used in the runtime checks in dispatcher::fire.

I've had to leave the mpl sets in, though, since I can't figure out how to convert the last
place where they're used. The presence of a type is required for SFINAE in
dispatcher_implementation::event_signal, and I can't figure out a new design that avoids the
need for the template parameters.
2020-10-13 21:07:15 +11:00
Celtic Minstrel
1bae9d7aca
Update changelog.md 2020-10-12 15:40:51 -04:00
Celtic Minstrel
6a27473c11
Merge pull request #5188 from wesnoth/sota_zombie_trans
Refactor translatable strings for the SotA zombie recruit dialog
2020-10-12 15:38:54 -04:00
Celtic Minstrel
24d8a249fa Fix [set_variable][join] failing on boolean values 2020-10-12 15:37:37 -04:00
Celtic Minstrel
f6dc83375c SotA: Don't use split on translatable strings
It should be easier for the translators if each string is a separate translatable string. That way, they don't even need to worry about taking care with commas.
2020-10-12 15:37:36 -04:00
Elvish_Hunter
2d599170e3 Changelog entry 2020-10-12 21:06:01 +02:00
Elvish_Hunter
bfcbe279a2 [harm_unit]: replaced .__cfg.level with .level in unit objects 2020-10-12 20:57:21 +02:00
Elvish_Hunter
61f7fe4749 [harm_unit]: fixed damage calculation for 1.15.x liminal alignment 2020-10-12 20:53:22 +02:00
Steve Cotton
958c82d086 Stop the labeler removing labels
The sync-labels option was expected to accept "true" or "false" with "false"
being the default.  However, these are currently being converted to boolean
using the Ecmascript `!` operator, which converts both of those strings to
True.  Pass the empty string instead to get the value False.

https://github.com/actions/labeler/issues/104
2020-10-12 12:13:42 +02:00
Steve Cotton
838a3b0c45 Ensure units' orbs are red in linger mode (fixes #5187) 2020-10-12 02:22:09 +02:00
Charles Dang
7fd4c37c64
Merge pull request #5203 from gwhitney/update_editor_cfg
Update editor cfg file to reflect earlier changes in scaling
2020-10-11 14:57:29 +11:00
Glen Whitney
6d935302a7 Update editor cfg file to reflect earlier changes in scaling
Commit 43de778 made all themes scale from their base dimensions rather
  than from an arbitrary hard-coded 1024x768 pixel size. As a result, the
  800x600 layout for the editor needs its main map explicitly sized --
  the 843-pixel width no longer fits in 800x600, and it isn't being scaled
  down from 1024. (But once it is explicitly set for the 800x600 layout,
  it will scale up for pixel widths between 800 and 1024). This commit
  adds such an explicit sizing, analogous to the one found in default.cfg.

  Resolves #5193.
2020-10-10 20:53:19 -07:00
Charles Dang
26054d194a Titles should not have periods 2020-10-11 04:46:22 +11:00
Charles Dang
42a2491f17
Merge pull request #5201 from Vultraz/clean_up_mp_workflow
MP: cleaned up mp workflow code
2020-10-11 04:37:39 +11:00
Steve Cotton
0936d6c21a Update changelog for #5202 2020-10-10 17:40:55 +02:00
Steve Cotton
01424cc853 Check which glyphs are in each font, instead of using a list hardcoded in WML
This is a "it's known to be broken, so let's rip it out and put in a minimal
replacement" change. Updated raw pointers to smart pointers just because,
updated the docs a bit, and ended up with a big change.

Fixes the most visible part of #5194, where Chinese needed DroidSansFallbackFull
to be loaded before DroidSansJapanese. The removed code in
`char_block_map::insert` and `char_block_map::compress` had a bug that
triggered when one font had a contiguous range of codepoints that was a
superset of several ranges in another font - this meant it treated the first
font containing U+4E00 as having the whole CJK Unified Ideographs block.

Remove the now-unused font codepoints WML. There is no schema change for this,
it seems the data/hardwired/fonts.cfg file isn't checked by the validation.

Optimise calling set_font_list with the same list (but possibly reordered), by
reusing the already-loaded fonts.
2020-10-10 17:36:10 +02:00
Charles Dang
d2bc8e264f
Merge pull request #5202 from stevecotton/font_reload_on_lang_change
Reload the fonts (both GUI1 and GUI2) when changing language
2020-10-11 00:10:15 +11:00
Steve Cotton
0099080a3f Reload the fonts (both GUI1 and GUI2) when changing language
Getting fonts in the correct order is important for CJK (Chinese, Japanese,
Korean), as the same codepoint may have different images even between
DroidSansJapanese and DroidSansFallbackFull (see discussion in issue #5194).

This method of calling load_font_config() to reload the fonts is already used
during startup - see the two calls to it in src/wesnoth.cpp. This commit should
ensure that, if starting the game in a given language works properly, then
changing to that language without restarting also works properly.
2020-10-10 14:26:58 +02:00
Charles Dang
f4c1a2c1af Why were these pointers? 2020-10-10 18:32:05 +11:00
Charles Dang
52f447dc52 MP: cleaned up mp workflow code 2020-10-10 16:57:43 +11:00
Artem Khrapov
bb237f34ae
Add the 'Add-ons' tag to the pull-request labeler. (#5199)
Added support for the `Add-ons` tag to the pull-request labeler.
File changes in the following directories will be marked as related to the addons system:
  - src/server/campaignd/**
  - src/addon/**
  - src/gui/dialogs/addon/**
2020-10-09 16:22:32 +02:00
Steve Cotton
8b236620dd Hint about the editor's shift+click and ctrl+click
This changes the legend at the bottom of the screen from
	FG: Savannah/Forest (Forest,) | BG: Green Grass/Grassland (Flat)
to
	Left-click: Savannah/Forest (Forest, ) | Right-click: Green Grass/Grassland (Flat)
	Shift + left-click: paint overlay layer only | Ctrl + click: copy terrain
or (with a non-overlay selected)
	Left-click: Desert Sands/Desert (Sand) | Right-click: Green Grass/Grassland (Flat)
	Shift + left-click: paint base layer only | Ctrl + click: copy terrain
2020-10-09 15:57:21 +02:00
Pentarctagon
12f05a0387
Update changelog. 2020-10-09 00:46:29 -05:00
Charles Dang
6b89bf86a7 Removed trailing tabs and whitespaces from C++ source
[ci skip]

I ran the same command from 9b7b1751fdda.

Excludes:
* lua/
* spirit_po/
2020-10-09 14:14:38 +11:00
gfgtdf
5a24414154 Update play_controller.cpp 2020-10-08 20:11:50 -05:00
gfgtdf
f599c77783 Add 'Delay Advancements [modification]
Depsite being a [modification] this is actuall implemented
in the C++ code the [modification] just sets a flag.

This is meant as an alterntive to the preset advancement
type of mod, i want to play around with it a bit in 1.15
maybe we will remove it later.

The problbme this is supposed to fix is that advancemnts
are done randomly during the enemeies turn. It has a few
advantages over the preset advancemnt approach:
1) It can easily handle amlas and normal advancement
2) It doesn't need special code to handle the case that
   A unit advances multiple times.
3) It doesn't break in case that other wml code changed
   The advancements  of a unit after the preselected advancement was chosen
4) The user never needs to think about an advancement of
   a unit that might not even advance

It also has a disadvantage: it changes the rules of the
game quite a bit, in partiucar if the units heals form
an adcancement (which us usally the case), since now
with this 'healing the unit on advancement by retaliation'
during the enemies turn can no longer happen. I still
think its wirth to think about this and test it though.
2020-10-08 20:11:50 -05:00
Charles Dang
af344d21a4
Merge pull request #5196 from Vultraz/remove_registered_users_only
Removed Registered Users Only game config option (resolves #4980)
2020-10-09 11:32:08 +11:00
Nils Kneuper
2364e6e6cb updated Japanese translation 2020-10-09 01:03:21 +02:00
Nils Kneuper
2034e50fd5 updated Japanese translation 2020-10-09 01:00:44 +02:00
Charles Dang
e0ea858db9 Fixup 2020-10-08 23:56:46 +11:00