Commit graph

33271 commits

Author SHA1 Message Date
Steve Cotton
5a1a8663a1 Allow translatable strings to display carets to the user (#4359)
Treat "editor^The overlays '^Uf' and '^Ufi' are deprecated because ..."
as a having translation hint "editor", and show "The overlays ..." to the
user. This disallows using carets inside the translation hint itself.

Code already reviewed in the discussion in #4359.
2019-10-06 23:55:38 +02:00
pentarctagon
c0843fe1a6 Fix the MP lobby reloaded indicator always saying the game isn't reloaded.
Currently, the value of `game["savegame"]` is one of `mp_game_settings::SAVED_GAME_MODE`.  However, the `to_bool()` function doesn't recognize any of those values as being true, so a game is always shown in the MP lobby as not being a reload, even if it actually is.
2019-10-06 17:31:20 +02:00
gfgtdf
873752943f fix [modify_side] controller=ai for the current side 2019-10-05 16:27:04 +02:00
Celtic Minstrel
d090f91bce Alter the special notes syntax in EffectWML so that the note macros can be reused in that context 2019-10-04 23:49:05 -04:00
pentarctagon
f05f811d6c Rename [unit_type_fix] to [modify_unit_type] for clarity. 2019-10-04 11:17:41 -05:00
Steve Cotton
3b36ada41e
Improve the terrain code's encapsulation (#4411)
Change terrain_type_data's documentation and some methods to avoid exposing
implementation details, for example renaming try_merge_terrains to is_known.

Move the code to load all the [terrain_types] in to the terrain_type_data
class's own .cpp file, and out of terrain.cpp.

Add documentation about "underlying", and why worst(best(a,b),c,d) terrains don't work
The commented-out code for merging pluses and minuses in the middle of an alias
was commented out in 1.5's d2edbe118a, but the
concept of pluses and minuses in the middle of an alias seems broken anyway
(see comments added to merge_alias_lists in this commit).

Descriptions are t_strings, avoid converting them to std::string and back.
2019-10-03 14:30:04 +02:00
josteph
c72f1dc07a Abilities: Revert an unintentional change of the behavior of affect_allies.
Fixes #4257
2019-10-01 19:33:24 +00:00
josteph
5bbc7a6c7c save_index: Move a space out of a translatable string.
The string _("replay") is already used elsewhere, so this prevents two kinds of bugs from
happening:

- Translating _("replay") and _(" replay") differently
- Translating _(" replay") without the leading space

14 po files got this wrong in one way or another.
2019-09-30 17:58:42 +00:00
josteph
e6848502e0 Sidebar: Do not show the ten-thousands-of-a-percent digit.
Before this commit, a probability of 0.67% was shown as 0.67%.
Now it is shown as 0.7%.
(That's not a typo. I'm talking about a chance of 67 permyriad.)

Reproducible in the test scenario by having the Wolf Rider attack the
unit to its south.
2019-09-30 15:08:28 +00:00
josteph
2efddd1ac7 Partly revert "Lua: make side.flag and side.flag_icon writable"
It wasn't working, see https://github.com/wesnoth/wesnoth/issues/4396#issuecomment-536325394

This partly reverts commit 9bd717c723.
2019-09-29 18:38:56 +00:00
Wedge009
5ed64df5fb Use the initials already translated through those defined in data/gui/window/preferences/02_hotkeys.cfg. 2019-09-30 04:07:05 +10:00
Wedge009
150d8c198d Replace hot-key markers with initials
Suggested in #1152 and mitigates #1499.
2019-09-30 04:07:05 +10:00
josteph
9bd717c723 Lua: make side.flag and side.flag_icon writable
Fixes #4396
2019-09-29 13:42:45 +00:00
loonycyborg
4c74977227 Remove check for boost.thread from buildsystems since it's not used anymore 2019-09-28 14:21:04 +03:00
loonycyborg
46ceee9cf9 Remove forgotten gobject placeholder in cmake 2019-09-28 14:21:04 +03:00
pentarctagon
2cd4273192 Use BIT(1) for fields with only 2 possible non-NULL values. 2019-09-28 09:27:20 +02:00
pentarctagon
7cb6482b32 Store in the database whether the game is a reload or not. 2019-09-28 09:27:20 +02:00
josteph
9c7d5986c1 Clarify a po comment for #4366. 2019-09-27 17:01:47 +00:00
josteph
1dccd57b43 Side color tooltip: Use typographical quotes. 2019-09-26 18:37:43 +00:00
josteph
c9ba3ee18f unit_recruit: Add tooltip explaining the gray 2019-09-26 16:07:44 +00:00
josteph
83148c923a unit_recall: Add tooltip explaining the gray 2019-09-26 16:07:44 +00:00
josteph
065f639dff recall: When checking whether the recall list is empty, account for whiteboard.
This makes it so if you try to recall and your recall list is empty when
accounting for the whiteboard, you get the "There are no troops" error
rather than the "You currently can't recall" error below it.
2019-09-26 16:07:44 +00:00
josteph
f54405cf51 unit_recall: Take whiteboard into account in gold calculations
Copied from unit_recruit.
2019-09-26 16:07:44 +00:00
josteph
cb07373251 unit_recruit: Show unrecruitable units in gray, rather than red
Matches new unit_recall behavior
2019-09-26 16:07:44 +00:00
josteph
26a710d6fb unit_recall: Move the image path back to the cfg file 2019-09-26 16:07:44 +00:00
josteph
7c8492d97a unit_recall: Allow filtering unrecallable units using the textbox 2019-09-26 16:07:44 +00:00
josteph
a7fc184ccd unit_recall: Show unrecallable units grayed out.
Part of issue #1282.
2019-09-26 16:07:44 +00:00
josteph
c89b644a64 New font::span_color overload. 2019-09-26 16:07:44 +00:00
josteph
ad0867fa42 Add color names to the Status Table, sidebar and top bar
For colorblind MP players

Fixes #1217
2019-09-26 15:58:02 +00:00
josteph
e306af9ae4 Attack Dialog: Show the name_inactive of an inactive weapon special.
Fixes #4352
2019-09-26 15:54:29 +00:00
pentarctagon
c24dbf271b Fix [leave_game] being ignored by clients during linger.
This affects the stopgame command and :kick, for example.

Fixes #4370
2019-09-25 14:57:59 -05:00
Wedge009
98a1b299fe Try to clarify that these commands are for Replay point-of-view.
* Resolves #1152
2019-09-25 13:49:05 +10:00
Iris Morelle
ca71057e7f fs: Drop filesystem::init() and Windows XP-specific code in it
The function's only purpose so far is to initialize a function pointer
to a kernel32.dll export (GetFinalPathNameByHandleW) that isn't present
on versions before Windows Vista. However, this development branch
explicitly bumps the minimum build target to Windows 7, rendering the
code redundant.

This also gets rid of a rather bothersome GCC warning involving the
FARPROC pointer cast used to store the result of GetProcAddress().
2019-09-24 06:49:55 -03:00
Wedge009
d4b3c9b407 Wrap the SDL render batch hint with SDL version conditional. 2019-09-24 16:59:44 +10:00
Wedge009
6436f90249 Disable SDL default render batches behaviour.
* Rendering in batches is default behaviour as of SDL 2.0.10 but causes rendering issues in Wesnoth.
* Fixes #4237
* Fixes #4245
* Not sure if #4309 may benefit as well
2019-09-24 16:14:47 +10:00
Steve Cotton
5dcd2d301d
Clean up some Cppcheck warnings by passing args as const refs (#4364) 2019-09-20 09:34:19 +02:00
josteph
bbf43bd4a7 Restore two of the three deprecation warnings, and upgrade them to DEP_LEVEL::REMOVED. 2019-09-18 22:48:53 -04:00
Celtic Minstrel
7c07cc71c0 Remove support for legacy menu markup 2019-09-18 22:48:53 -04:00
josteph
8867aab43f Hide the Suppose Dead hotkey from the preferences 2019-09-18 14:05:58 +00:00
josteph
4c0a012b5b unit_preview_pane: Make the unit description button open the help on the right variation
Fixes #4142
2019-09-17 12:46:11 +00:00
josteph
d26c2a2290 Draw ellipses and bars during draw/sheath animations
Issue #1527
2019-09-16 22:16:02 +00:00
josteph
3ce9069d87 Document game_config::team_rgb_name 2019-09-16 20:49:49 +00:00
pentarctagon
67bcc6e51b
Add wildcards to "moderator". 2019-09-16 15:30:21 -05:00
josteph
13e40841fe help: Show topic id in debug log
Fixes #4353
2019-09-16 18:12:17 +00:00
Wedge009
fececabd67 Add a note regarding imbue() and hard-coded locales.
[ci skip]
2019-09-16 16:53:36 +10:00
Wedge009
117f92edbc Disable use of std::put_time in strftime()
Fixes #1709
2019-09-16 16:25:34 +10:00
Steve Cotton
af91654e26 Fix the build
Explicitly use t_str() to avoid an ambiguous construction from
7bee8ee157, which made GCC9 error out because it
could alternatively use t_string::t_string(const string &).

Resolve the merge conflict from 26d1ca7a7d
2019-09-15 22:55:05 +02:00
Celtic Minstrel
7bee8ee157 Add special note support in [unit] and [effect]. 2019-09-15 13:19:17 -04:00
josteph
2543fc67a2 Enable chat in SP and local MP.
Fixes #1111.

Quoting the issue:

> The implications would be, e.g., that you could chat (to yourself, i.e. "for the record", i.e. for the replay) in SP mode, thus making notes in the chatlog about the gameplay.
2019-09-15 06:27:33 +00:00
pentarctagon
2eccbab970 Add UI button to stop a game.
This adds a button along side the kick/kickban/ban buttons to stop the game the selected user is in.

Fixes #3635
2019-09-14 11:10:05 -05:00