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.
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.
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)`.
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.
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.
I did notice this seemed able to arise after 555d8b667d6f6401fbfe8f8ce01be14c8b2f5ddd and/or 0571fefda3fa93a30f74e17a52f53a43710d4fe5,
but these have never really been issues to worry about.
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.
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.
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.
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
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.
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.
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.
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/**
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
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.