Commit graph

33271 commits

Author SHA1 Message Date
josteph
d26076d59a Fix upkeep report tooltip 2019-09-14 07:58:12 +00:00
josteph
a42a256ca0 fixup! Clarify descriptions of income and upkeep. 2019-09-14 07:58:12 +00:00
josteph
0a0b70c5a9 Clarify descriptions of income and upkeep. 2019-09-14 07:58:12 +00:00
pentarctagon
ae73e5cd15
Forbid the "moderator" username by default as well. 2019-09-13 14:08:36 -05:00
gfgtdf
cad013c4de fix UB in story_viewer
previously the first image timer would not be cleared when the user restarted
the part, which in particular caused UB if the story_viewer was closed
before all timers have finished.

fixes #3838 fixes #3837
2019-09-13 19:01:38 +02:00
Martin Hrubý
1b24c3ab8e Fix game crash when user click on Cancel while connecting to add-ons server from multiplayer lobby
Fixes issue #3859

(cherry picked from commit 856183067f)
2019-09-13 18:42:42 +10:00
pentarctagon
14c0272948 Add optional reason when using the stopgame command.
So now: `/query stopgame <nick> [<reason>]`. The reason is displayed to the players of the game on the savegame prompt dialog.
2019-09-13 09:32:20 +02:00
Celtic Minstrel
15f431785a Add [special_note] tag in [unit_type] as a neater way of specifying special notes for the unit's description 2019-09-12 08:51:05 -04:00
josteph
90f69b0494 Add/Extend help for :theme, :create, :unit, :create, :gold, :throw (#2500) 2019-09-11 11:08:27 +00:00
Steve Cotton
9792af39b8 Trigger an L4 deprecation message for [terrain_type]vision_alias=
The feature was never added, a deprecation message saying that it's been
removed is the closest option to the situation. While terrain.cpp itself
supports vision_alias, it was never added to the calculations in movetype.cpp,
therefore it never affected units' vision. It's also not shown in the help
about the terrain.

This doesn't affect the features of units having vision costs different to
movement costs, or of units having a different number of vision points to
movement points, both of which are still supported.

While I'd encourage anyone who wants to implement vision_alias to do so, at the
moment I feel that the still-supported features in the same area haven't been
explored yet, and that vision_alias isn't going to developed before 1.16.0 is
released.
2019-09-10 06:42:21 +02:00
josteph
536cf01d15 wesnothd: Change :give_control error message 2019-09-09 12:57:01 +00:00
Jyrki Vesterinen
1b7f9a3ef8 Fix #4307: possible crash in attack prediction with high number of strikes
If a unit has an attack with ability to poison/slow and a high number of
strikes (24 in the provided test case), the calculated probability of the
other unit being hit and therefore poisoned/slowed could exceed 100 % due to
floating point rounding errors. It caused an assertion failure if the AI
simulated another fight for the target unit afterwards.

Fixed by limiting the probability of being hit to 100 %.
2019-09-08 12:40:36 +03:00
Martin Hrubý (hrubymar10)
6f468a3757
Migrate links to https if available
Closes #3343
2019-09-08 07:53:28 +02:00
josteph
d513c499f1 SUF: Fix infinite recursion in [hides][filter_self][filter_vision]
Fixes #1389
2019-09-07 12:55:49 +00:00
gfgtdf
74c2398f67 heal units on recall list at scenario end
more importantly, it also removes objects with duration=scenario
2019-09-05 15:05:19 +02:00
pentarctagon
6921fe1bb8 Fixes the droid command's options not all being optional.
Now, if no action is provided and the current side's controller or proxy controller is the AI, the side is changed to fully human control (same as `:droid <side> off`). If no action is provided and neither the controller or proxy controller of the current side are controlled by the AI, then the controller is set to human and the proxy controller set to AI(same as `:droid <side> on`).

Fixes #4308
2019-09-05 10:16:15 +02:00
pentarctagon
c8976432af Add a MP mod command to stop a game.
This command is of the form "/query stopgame <nick>".  wesnothd then retrieves the id of the game that person is in and calls delete_game(<id>).
2019-09-05 08:58:07 +02:00
Celtic Minstrel
5ac95eae08 Add --output option to redirect diff/patch output to a file of your choice 2019-08-30 23:23:10 -04:00
Celtic Minstrel
d4c6f1e5f0 Add a command-line interface to the WML diff functionalityNote that this is only useful for WML documents that do not require preprocessing. 2019-08-30 23:23:10 -04:00
Steve Cotton
1c123fb3fa Allow '1-infinity' in ranges, and tighten the schema's validation of ranges
Fixes #4253.

The schema's validation of ranges now rejects negative numbers, because the C++
code doesn't support them (both before and after this commit):
* utils::parse_range("-7") will return {0,0}, because std::stoi("") throws invalid_argument.
* src/map/location.cpp will parse it as -7, but that will never match an on-map coordinate
2019-08-29 22:28:22 +02:00
Steve Cotton
ba4f3a70b6 Use multiple lines for help, and add translation notes
This removes all of the "do not translate part^string part" strings, replacing
them with more help in English and a place for translators to explain what the
untranslatable "all" means. For commands where the usage has notes about the
arguments, this embeds the \n in the strings passed to register_command; that
seems a reasonable balance between usability and effort to implement it.

Cherry-picking between 1.14 and 1.15: In 1.14.x, the "droid" command only has
options "on" and "off". The "full" option was only added in 1.15.
2019-08-29 19:17:47 +02:00
Wedge009
2ed6803aef Remove trailing white-space.
[ci skip]
2019-08-27 13:41:01 +10:00
Wedge009
9dd6f70c98 Change game_created event sound to join.wav on @stevecotton's suggestion. 2019-08-27 13:41:01 +10:00
Wedge009
e4e260709a Address comments against #3246 in order to resolve #2016.
* Remove unused notify_mode.NOTIFY_COUNT.
* Remove obsolete comment against mp_ui_alerts::items.
* Remove unused is_lobby parameter in mp_ui_alerts::game_created().
* Synchronise game_created sound in game_config.cfg with game_config.cpp.

(cherry picked from commit abaa77f7c6)
2019-08-27 13:41:01 +10:00
ville
169cff9ec7 Adds a preference item for a sound being played and desktop notifications in the lobby when a new game is created.
Remove unnecessary blank lines and debugging comments

- Adds a preferences entry in the multiplayer/alerts menu so sounds and desktop notifications can be toggled.

Reformat a few points for consistency

Have desktop notification show name and scenario of new game

Have desktop notification show name and scenario of new game

Update desktop notifications to use VGETTEXT for translations

(cherry picked from commit af71dbf1b1)
(cherry picked from commit a2d9943286)
2019-08-27 13:41:01 +10:00
gfgtdf
c4ffade49a fix #1492 replays not saved in campaigns
previously the clint woudl send a [update_game] to the
server before sending [store_next_scenario] whcih set
game::started_ to false and this disabled game::save_replay()

Now we instead set started_ to false after save_replay() is called

I also don't really see the point of calling update_side_data()
and describe_slots() before the new level data is available so i just
removed these calls. (the call to game::update_game())
2019-08-26 22:45:55 +02:00
pentarctagon
b14a4b1bb3
Rename db_group_table -> db_user_group_table since it's more accurate. 2019-08-26 12:41:39 -05:00
gfgtdf
66fb021a6f
Merge pull request #4088 from gfgtdf/fix_remove_overlay
wml changes for overlays= change

* move loyal overlays to the loyal trait
* other wml improvments.

Fix [remove_object] for effects that change ellipse
2019-08-25 22:33:16 +02:00
pentarctagon
3be0f751cc Remove non-functional methods from player.hpp.
Attempting to call them results in an error during linking, for example:
undefined reference to `wesnothd::player::set_game(wesnothd::game*)'
2019-08-25 11:18:46 -05:00
gfgtdf
f4e7f417e4 reset ellipse on unit advancing
same reason as for the overlays= change, in particular this fixes
remove_object of objects that set ellipses.
2019-08-24 22:21:25 +02:00
gfgtdf
398ba56f77 formatting 2019-08-24 22:19:58 +02:00
pentarctagon
7a0759a268 Print an error message when the mp_mod_group is not a valid int.
Fixes #4266
2019-08-24 19:52:55 +02:00
gfgtdf
8a33ad0bf1 fix #4256 wesnoth.require with relative paths
now wesnoth.require is able to detect when the same file is
required two times using different names (like a/../a/b.lua
a/b.lua) and will only execute it once.

for this a new function wesnoth.canonical_path was added
2019-08-24 18:52:14 +02:00
Gunter Labes
10d3e39455
Set uft8 also on reconnects 2019-08-22 16:40:59 +02:00
loonycyborg
43546e455f Redundancy fix 2019-08-22 14:34:27 +03:00
loonycyborg
661048d4a9 wesnothd: restore functionality to notify users in games about lobby joins
needed to let clients in games know when users in their friend list log
on
2019-08-22 14:11:11 +03:00
Pentarctagon
282efeae86 Remove client-side nickserv command functionality. 2019-08-22 10:41:51 +02:00
Pentarctagon
72e203844e Fix unused variable warning. 2019-08-22 10:41:51 +02:00
Pentarctagon
b1e92206f5 Remove the tracking of the last user handler clean.
The information isn't used, and the method is never actually called.
2019-08-22 10:41:51 +02:00
Pentarctagon
25f1537003 Remove the user_handler's clean_up() method.
It doesn't do anything.
2019-08-22 10:41:51 +02:00
Pentarctagon
eef0c34b0e Removes unused/unimplemented nickserv functionality.
Commands removed:
* register
* set
* details
* drop
2019-08-22 10:41:51 +02:00
Pentarctagon
0870d1bc89 Remove unused email-related functions. 2019-08-22 10:41:51 +02:00
Pentarctagon
4a93de4b00 Remove uh_name_ variable.
This is unneeded, as the only user handler is the forum/db handler.
2019-08-22 10:41:51 +02:00
Pentarctagon
77fc455b0b Remove sample_user_handler.
While I understand the reason it's here, it's been over a decade, no other user handlers have been added, and there's no indication any others will be added. Therefore, it doesn't seem like there's much of a reason to keep this code around.
2019-08-22 10:41:51 +02:00
newfrenchy83
f668e0b0ab resolve color active/inactive colors similars
This is an resolve to https://github.com/wesnoth/wesnoth/issues/4094 issue.
2019-08-21 12:01:24 +10:00
Charles Dang
e761acbaa4 GUI2/Loading Screen: renamed singleton member 2019-08-20 00:56:48 +11:00
Charles Dang
63f0f04535 Post-release version bump 2019-08-20 00:56:10 +11:00
Charles Dang
ae39d31f7e Pre-release version bump 2019-08-19 23:44:45 +11:00
newfrenchy83
95a941b923 resolveHttT, Konrad's portrait is not used after he is lvl 2 (bug #4248)
pr #4250

resolves https://github.com/wesnoth/wesnoth/issues/4248 which was broken before in  66a282a96b
2019-08-18 15:49:47 +02:00
Steve Cotton
012069440e If text is too long to render, fall back to line-by-line (fixes: #3265)
This still requires a huge surface to render all of the text on to,
but is an easier fix than redesigning the credits screen.

This removes the only caller of utils::vertical_split, which is why
that utility function is also removed.
2019-08-18 07:03:59 +02:00