Commit graph

33042 commits

Author SHA1 Message Date
Jyrki Vesterinen
9110e49760 Allow modifying dead units in more event handlers
Namely attacker_hits, attacker_misses, defender_hits and defender_misses.
2018-05-16 05:13:40 +03:00
Charles Dang
e0beff6615 Rename gettext_boost.cpp to gettext.cpp
Since there isn't another version anymore.
2018-05-16 12:06:48 +11:00
Pentarctagon
fd34fe8497 Don't require SDL2 or OGL for building the servers.
Requiring SDL2 was masking needing to add -lpthread explicitly.
2018-05-15 16:16:09 -05:00
Charles Dang
ba6fa1e46b Convert a few remaining cases of boost::uint32_t to uint32_t 2018-05-16 07:38:47 +11:00
Charles Dang
1097bad28c Revert "Save custom options data in a more concise way"
This reverts commit e3db7cc225. Turns out the
id = value syntax did not work for options in an array since '.' is not a
valid config key name.
2018-05-16 07:21:19 +11:00
Jyrki Vesterinen
258a0e4689 Throw a Lua exception when creating a negative-HP unit in a Lua context
Instead of throwing a WML error. This allows the UMC author to get a stack
trace if the unit creation was triggered from Lua.

Requested by @gfgtdf in a comment of #3042.
2018-05-15 20:23:14 +03:00
Charles Dang
2d600d10dc Wesnothd: minor code cleanup 2018-05-15 21:49:48 +11:00
Charles Dang
9a2d09f97e Wesnothd: formatting cleanup 2018-05-15 21:49:48 +11:00
Charles Dang
b623e7a647 Wesnothd: dropped a giant block of commented-out code
This is a relic from the old pro-Boost ASIO implementation.
2018-05-15 21:49:48 +11:00
Charles Dang
10e43a6642 GUI2/Canvas: simplify clear_shapes logic 2018-05-15 19:03:56 +11:00
Charles Dang
3d73dfdb15 Campaign Difficulty: cleaned up a few things left over from 50a3960
Also a small logic cleanup.
2018-05-15 19:03:40 +11:00
Charles Dang
50a3960abd Removed a bunch of things deprecated at level 3
* Legacy campaign difficulty syntax
* [combo] in [modification]s
* Support for legacy DescriptionWML in the MP Faction Select dialog
2018-05-15 11:53:24 +11:00
Jyrki Vesterinen
15446acb2a Allow modifying dead units in last_breath and die event handlers
Fixes an unintentional API change from commit 3c344e8da5, discussed in
comments of #3042.
2018-05-14 22:07:48 +03:00
Charles Dang
8f93d0a7c6 Saved Game: reame "starting pos" to "starting point" to avoid confusion
The old name was too easy to confuse with a side's map staring position, something
I've done several times.
2018-05-14 14:45:54 +11:00
gfgtdf
e88a73fc2a fix uncaught stoi exception 2018-05-13 16:14:06 +02:00
gfgtdf
fd48bad8d9 wb: fix segfault when ending the game
fixes #3008

This is not the prettiest fix, but in particular for 1.14 stable it's
less risky than some big refactor.
2018-05-13 16:11:35 +02:00
gfgtdf
eaabf1648d wb: fix incorrect handling of skirmisher.
fixes #3014
2018-05-13 16:11:26 +02:00
gfgtdf
6a9e2c260d wb: add a assertion 2018-05-13 16:11:07 +02:00
gfgtdf
5884aa27ea wb: don't clear undo stack when dsu is active
since that might lead to assertion failures&oos later, fixes #3029
2018-05-13 16:09:09 +02:00
gfgtdf
5c278a3936 editor: don't allow bad location id strings
in particular using spaces or commas here results in invalid map files when the map is written to disk. (repoted on the forum)
2018-05-13 16:06:03 +02:00
Charles Dang
0d15c1e19e Formatting cleanup: convert remaining cases of > > to >> 2018-05-14 00:09:23 +11:00
Charles Dang
2c57dc3705 Convert a bunch more C-style casts I missed in 0dc5656 to static_cast 2018-05-14 00:07:27 +11:00
Charles Dang
cc86502700 Fixup ccbb736 2018-05-14 00:03:50 +11:00
Charles Dang
0dc5656c32 Convert C-style casts to static_cast 2018-05-13 22:36:50 +11:00
Charles Dang
36e83e646c Use std::tm instead of plain C tm 2018-05-13 22:28:12 +11:00
Charles Dang
00bea6494f Use std::localtime() instead of plain C localtime() 2018-05-13 22:26:10 +11:00
Charles Dang
d26824901d Use std::time() instead of plain C time() 2018-05-13 22:22:07 +11:00
Charles Dang
ccbb736a18 Use std::time_t instead of plain C time_t 2018-05-13 22:13:33 +11:00
Charles Dang
1e84ec2b94 Added the appropriate check to enable std::filesystem when using GCC 8 2018-05-13 21:46:54 +11:00
Jyrki Vesterinen
91e60267ba MP lobby: don't attempt to restore player list scroll position too early
Fixes error messages in the log when joining the lobby.
2018-05-13 12:16:33 +03:00
Iris Morelle
c8c3625e3a wesnothd: Fix typo introduced recently causing build errors
Fixes commit 2bf4d68c87.
2018-05-13 04:06:23 -04:00
Iris Morelle
ba64a502e1 bi: Refactor report headers generation 2018-05-13 01:45:59 -04:00
Charles Dang
0d1571a0b2 MP Lobby: used "not installed" instead of "missing" 2018-05-13 16:17:09 +11:00
Charles Dang
2bf4d68c87 Catch all exceptions (where possible) as const references
A few catch blocks modify something in their exceptions, so those are kept non-const.
2018-05-13 15:48:14 +11:00
Charles Dang
74f86aea1d Mark wml_exception::show const and formula_ai::handle_exception's argument const 2018-05-13 15:46:31 +11:00
Jyrki Vesterinen
c3d711632e Fix compiler warning about unreferenced variable 2018-05-13 07:32:47 +03:00
Charles Dang
f34db1b8ac MP Lobby: removed "illegal map" error (see #3095)
There's still the "Error while loading the map:" error emitted by the minimap
widget, but this at least curbs the duplicates.
2018-05-13 08:53:56 +11:00
Charles Dang
e0192b1b1f Renamed filesystem_boost.cpp to filesystem.cpp 2018-05-13 00:10:56 +11:00
Charles Dang
231d97c27f Filesystem: added (currently incomplete) support for using std::filesystem
Not usable until I figure out how to convert the return value of std::filesystem::last_write_time
to time_t, but this lays the groundwork.
2018-05-13 00:06:19 +11:00
Jyrki Vesterinen
a3658473c9 MP lobby: fix player list scrolling to top when it changes 2018-05-12 09:51:44 +03:00
Charles Dang
36c0b6b648 MP Lobby: removed "Registered Users Only" from settings list in info tooltip
This isn't really relevant anymore since everyone is registered on the official server.
2018-05-12 15:33:30 +11:00
Charles Dang
c20eab0a5e MP Lobby: sort mods list alphabetically and color "missing" text 2018-05-12 15:33:29 +11:00
Charles Dang
ee90182886 Actions/Create: formatting cleanup 2018-05-12 14:30:22 +11:00
Pentarctagon
7a3fb8815b Fix missing SDLMain.mm. 2018-05-11 11:22:20 -05:00
Pentarctagon
f5d74cd5ed Fix building with osx+cmake on travis. 2018-05-11 11:22:20 -05:00
Charles Dang
f279ad5fc0 Whiteboard: avoid the use of a deprecated C++17 function
shared_ptr::unique() is equivalent to use_count() == 1. A few of these checks should probably
be > 1 to account for 0, but this is a direct logical translation.
2018-05-11 16:10:56 +11:00
Charles Dang
1c575f59fa Work around some weird compiler bug with VS using C++17
Without this, I get the error "syntax error: '<'" and a reference to the function's
opening bracket... No idea why. It build fine on VS 15.7.1 with C++14.
2018-05-11 16:08:42 +11:00
Charles Dang
0f9a0fac5e Filesystem/Boost: don't import boost::fileystem::path class to global namespace
This makes it a *lot* clearer that we're using the bfs class and not some function
or class defined elsewhere in our code.
2018-05-11 12:08:56 +11:00
Charles Dang
c643b765dd Filesystem/Boost: range-for 2018-05-11 11:54:37 +11:00
Charles Dang
32111ae5e9 Filesystem/Boost: made use of std::make_unique 2018-05-11 11:54:36 +11:00