Each [teleport] tag should have exactly one each of [source],
[target] and [filter]. Missing any of those is caught immediately
above the new conditional block, so this makes having two or more
of any of them be treated the same.
The log should maybe be made more visible, but it's a case that
can already be detected by schema validation, so validate it
there instead.
The code in teleport.cpp uses assert() in the cases that the
newly-added code in this commit catches. That's bug 8175, and
it's probably still reachable for units with teleport abilities,
so this doesn't close that bug.
* doesn't clutter unit help tree when a unit variation is displayed
* when displaying a unit variation in the help, it displays the links
below the unit image at the same line as when displaying the base unit
patch from #6011
Just removing transparency from all images on the top bar and side bar causes other issues, particularly with the unit sprite and the clock icon alignment.
Fixes#8335
Previously it could happen that removing an object applies the status healing,
in particular of the default AMLAs (which are meant to only heal the unit once).
Change the Lua implementation to directly call the
non-deprecated function, this is related to 9daa10a9f2.
Clean up the C++ header files by removing the declarations of
functions that were removed in 3c8de46771.
Use [endlevel]end_credits=no in the test scenario (trigger it
by moving to hex 9,3). If you debug with :next_level without
triggering the moveto, "The End" will show; trigger the moveto
first, and it won't show the credits.
It's better to be defensive with those default values,
especially now that the mp lobby code can automatically
download addons, having require_modification set to true
isn't inconvenient for the users either.
(The issue that the added comment is about isn't something
that was added in this commit)
There are still other places in the code that call unit_placed so there might be some cases left where unit_placed don't prevent undoing, but most of them are nonundoable anyways.
This avoids issues if the events being executed add new handlers, since adding a new handler needs to sort the list according to the event priority.
Fixes#8157
Fixes the display of topic headings, including unit names, in right to left
languages (Arabic and Hebrew).
The GUI1 menu code is only kept to support one UI feature, the help browser.
However, the code supported multiple columns and multiple things in each
column; to do the latter it handled each column as a string with embedded
separators. To support the help GUI, all that's needed is for each row to have
an indent, an icon, and a text field. Traces of the multiple-column support are
still in the code, but the drawing code is simplified.
The logic for working out whether mouse clicks are on the icon or the text has
moved from the subclass to the main menu class, as it's a subset of the logic
for drawing the UI.
In LTR languages, this looks almost identical.
In RTL languages, the book icons now appear in the right place, and the text
placement is reasonable.
Remove some special cases from the drawing code, because menu::draw_row
was previously also used for drawing the headings.
As scale_images was never called, adjust_image_bounds was a no-op.
This is separate from the main dead code removal commit because it touches
active code paths.
The GUI1 menu code is only kept to support one UI feature, the help browser.
More specifically, the left-hand pane that looks like a treeview.
Remove the code for sorting the list in the UI. The help articles are ordered
by category, and there isn't a UI control for the user to sort them into a
different order.
Remove erase_item(), which wasn't called from anywhere.
Remove clear_item(), recalculate_pos() and assert_pos(). These three were
only called by the sorting code and erase_item().
If case insensitive handling is wanted here then it needs to show all matches not just an arbitrary first one.
Since this forwards to searchlog which properly matches case insensitively anyway that does not seem particularly useful though.
This not only fixes the error in the GUI2 widget __dir metamethod,
but also makes the system swallow any errors in said metamethod.
A Lua warning is output if such an error arises.
C++20 makes aggregate initialization more restrictive. Any user-defined, rather than just use-provided,
constructor is forbidden for an aggregate class, including defaulted ones.
Avoids two to four function calls on each SDL_MouseWheelEvent.
Also update code comment and changelog entry based on @vgaming's report
of issue #3362 being fixed.
Slightly improves commit ab4001d. Tested again with SDL 2.0.14 and
2.28.5.
This makes iterators based on this class to meet LegacyInputIterator requirements, allowing them to be used with STL algorithms such as MSVC's `std::find_if`.
Previously, the mod parser returned a raw to-heap pointer. Once added to a mod queue, it would then
be owned by a shared_ptr (overkill). This makes it so the mod executors are managed by unique_ptrs
for their entire lifetime.