Commit graph

33042 commits

Author SHA1 Message Date
gfgtdf
08bb6a4e96 fixup 'fix game freezes on droiding when using dsu #3453'
fixes https://github.com/wesnoth/wesnoth/issues/3486
2018-08-22 15:05:50 +02:00
gfgtdf
6781fe17ca show add-on loading times on --log-debug=config 2018-08-22 15:05:27 +02:00
gfgtdf
cbf078a030 fix editor cannot add starting location for > 9 players.
previously attempting to place a starting location for side 10 or higher would result in a "invalid location id" error.
2018-08-22 15:04:33 +02:00
Severin Glöckner
12369a2fa4 Capitalize Pango
[ci skip]
2018-08-20 05:07:31 +02:00
Severin Glöckner
6998885cc1 clarify that pango markup is the cause
changed as proposed by soliton
2018-08-20 04:56:50 +02:00
josteph
a3047f37d3 Fix crash after hitting enter when no units match the recall list filter
Fixes #3475
2018-08-17 17:41:59 -05:00
Iris Morelle
36cf8c8d70 gui2/game_load: Constrain leader sprites to 72x72 using image path functions
Fixes #3474.
2018-08-17 15:45:20 -03:00
Martin Hrubý
50301f84e3 Fix building with Xcode 10 (#3460)
Resolves #3458.
2018-08-16 15:06:00 +03:00
Pentarctagon
0f5899b163 Fixes track titles not being set from WML.
The current implementation of the [music] tag sets the title after adding the track, however the title field was read only.  This makes the field writable.
2018-08-14 01:57:26 -05:00
gfgtdf
09c56ef2fe move [terrain_mask] to lua
and implement it using wesnoth.terrain_mask.

This also fixes an issue where [terrain_mask] would not remove
removed villages from the teams villages list after [terrain_mask].

This also adds an alignment parameter to [terrain_mask].
2018-08-13 15:25:41 +02:00
gfgtdf
6cd9de1202 fix villages after terrain_mask 2018-08-13 15:24:23 +02:00
gfgtdf
a3367ee848 add wesnoth.terrain_mask lua function
`[terrain_mask]` had multiple unexpected behviours, see for example #3364
in parituclar `wesnoth.wml_actions.terrain_mask { x =2, y=2, mask="Ww"}`
will change the tile at (1,2) instead of (2,2), so instead of reusing
the old terrain mask code i wrote a new function that behaves as one
would expect. `wesnoth.terrain_mask` does not have a `border=` parameter
but a `is_odd` parameter that specifies that a map is in the odd format
 __    __
/00\__/20\__
\__/10\__/30\
/01\__/21\__/
\__/11\__/31\
/02\__/22\__/
\__/  \__/

instead of the even map format
    __    __
 __/10\__/30\
/00\__/20\__/
\__/11\__/31\
/01\__/21\__/
\__/12\__/32\
   \__/  \__/

(Monospaced font required to see ascii images.)

The lua function also has a lua interfacte, meaning it does not take wml
tables but normal lua tables making it easier to use from lua code.
2018-08-13 15:23:30 +02:00
gfgtdf
8d6524c6e2 deploy string_view 2018-08-13 15:22:54 +02:00
gfgtdf
9bb601e2da add debug info 2018-08-13 15:21:41 +02:00
gfgtdf
e90f0fce13 remove outdated code
substr cannot throw bad_lexical_cast
2018-08-13 15:21:32 +02:00
gfgtdf
1646a7b906 fix game freezes on droiding when using dsu #3453 2018-08-13 14:03:14 +02:00
gfgtdf
7e2dc296ba boost::ptr_vector -> std::vector<unique_ptr>
boost::ptr_vector has some nice features, but vector<unique_ptr> is still
easier to use for most people basicially becasue people know it better.
Also boost::ptr_vector does not support move ctors and also does not
use std::unique_ptr, probably because it tries to stay compatible with
c++03 so one has to use 'ptr_vector::auto_type' with it instead which
has a different interface than std::unique_ptr
2018-08-13 14:02:50 +02:00
gfgtdf
f03e3e8d6d fix 'start game' locked when other players abort flg dialog #3452 2018-08-13 14:00:57 +02:00
gfgtdf
bd16aeec02 improve wesnoth version warning 3
suggested by soliton
2018-08-13 14:00:56 +02:00
gfgtdf
9a3917dc35 fix missing map previews in the lobby
regression from 'fix require_scenario & require_era'
2018-08-13 14:00:56 +02:00
gfgtdf
7e0d63d7c3 fix segfault in wesnothd
broken in commit 'preserve traslatable strings in simple_wml.'
2018-08-13 14:00:55 +02:00
gfgtdf
c685031d1c fix oos when undoing after ally chat 2
for extra safety we add code to ensure undo=no for [speak] commands to the client aswell, this is not really needed as i just added a code that sets undo=yes to the server code, but it's an advantage to be able to safely connect to older servers aswell.
2018-08-13 14:00:55 +02:00
gfgtdf
02bed5c033 fix oos when undoing after ally chat
previously the server would send [speak] commands that had no undo=no attributes so that the game would remove the speak command from the replay instead of the actual undoable action when undoing an action.
2018-08-13 14:00:55 +02:00
gfgtdf
7bf37a1e64 fix game crashing on 'reset replay'
fixes #3439
2018-08-13 14:00:55 +02:00
Martin Hrubý (hrubymar10)
b6507cbbf2
We no longer support OS X Lion - remove legacy code 2018-08-12 22:27:08 +02:00
Martin Hrubý
4282ee3fdc Rewrite macOS version detection (#3448)
This new implementation works more reliably, avoids spawning subshells, and is faster.
2018-08-11 14:38:09 +03:00
Martin Hrubý (hrubymar10)
8114ec213f Use standart fonts.conf in macOS packages 2018-08-10 20:18:40 +02:00
Martin Hrubý (hrubymar10)
4e6ffed7a5 Fix macOS specific warning "Class SDLApplication is implemented in both ..." 2018-08-10 13:21:56 +02:00
Martin Hrubý (hrubymar10)
19db23437a Fix indentation 2018-08-09 23:32:41 +02:00
Martin Hrubý
0711e24d8e Better macOS version report 2018-08-09 23:23:13 +02:00
Jyrki Vesterinen
395eaf5251 Use localized chat room names (#2709)
Turns out that a t_string doesn't automatically obtain the correct
translated value. Thus, I'll simply get it by calling
translation::dsgettext() directly. I also changed the translated string to
be used in the tab label as well.
2018-08-07 21:13:50 +03:00
Jyrki Vesterinen
1eec7ef8d9 Make chat room names localizable (#2709) 2018-08-07 20:13:09 +03:00
josteph
ef71d0efcb Addon Manager: Unabbreviate "asc" and "desc".
@jyrkive https://github.com/wesnoth/wesnoth/pull/3418#issuecomment-410433850
2018-08-04 12:47:55 +03:00
josteph
569e1d85a5 Addon Manager: Don't use "ascending" and "descending" to describe how dates are sorted. 2018-08-04 12:47:50 +03:00
josteph
f293c7cb32 GUI: Fix check for no usable weapons.
Fixes #3424.
2018-08-03 15:43:48 +03:00
Jyrki Vesterinen
46bec21fa3 Fix: halo (if any) remains when wesnoth.put_recall_unit() is used
Based on the suggested fix in #3425. Closes #3425.
2018-08-03 12:02:53 +03:00
josteph
55e4147213 debug: Give feedback for :droid.
#2819
2018-07-31 22:59:14 +02:00
josteph
0f520ad8a6 debug: Fix ":droid" always toggling droid on/off even when given two arguments (":droid <side> off"). 2018-07-31 22:59:04 +02:00
gfgtdf
90fb50d70f improve wesnoth version warning further 2018-07-31 22:58:36 +02:00
gfgtdf
ba18e17e43 improve wesnoth version warning. 2018-07-31 22:58:28 +02:00
gfgtdf
610e4f2969 add server notifications about outdated wesnoth versions. 2018-07-31 22:58:18 +02:00
gfgtdf
f84d79e033 fix skip replay being active in later scenarios
in mp campaigns.
2018-07-31 22:58:09 +02:00
gfgtdf
eec8b674de fix require_scenario & require_era
previously both were broken:
1) 'require_scenario' was only checked if the scenario was installed
which obviously doesn't make any sense at all.
2) 'require_scenario' was read from the local scenario data instead from
the remote scenario.
3) 'require_era' was only checked when the scenario was not installed,
so people who do have an outated version of the era installed could not
join bacause it assumed require_era=yes in that case.
4) the server tried to read 'require_scenario' from the wrong wml node,
'require_scenario' is an attribute of [scenario] and not of savefile
toplevel.
2018-07-31 22:58:00 +02:00
gfgtdf
15c59037d3 mplobby: add debug info 2018-07-31 22:57:51 +02:00
gfgtdf
367aec2bb2 don't process a corrupted gamelist_diff further
fixes #3017, assuming that the error is actually casued by the
'process_gamelist_diff failed'

As process_gamelist_diff simply returns after getting an error its quite
likeley that the gamelist is then in a  corrupted state so we stop
processing it until we get a fresh gamelist.
2018-07-31 22:57:38 +02:00
gfgtdf
edc57d2388 add comment 2018-07-31 22:57:26 +02:00
gfgtdf
eb23ac5646 preserve traslatable strings in simple_wml.
previously it would happen that for example an attribute like
`side_name=_"female^Footpads"` in side would get its translatable mark (_)
removed after the game has started. This meant that observers that enterd
the game after it started would see the literal string "female^Footpads"
in the status side overview window.

The new code marks all translatable simple_wml attributes to make sure their
translatable mark is preserved along with their textdomain. It can still
happen though that attributes will appear in the the wrong textdomain area
after simple_wml processing though because in some cases note::output
might skip over textdomain markers. It is still not as bad as string like
"female^Footpads" appearing in the ui though.

An alterntive appraoch to fix this issue would be to carefully make sure
not to change any atributes of wml tags that can also contain translatable
attributes, which would probably imply not editing the wml objects received
by the client at all and instead storing the new information (in particular
side information like is_local=yes/no) in a seperate wml object. (that would
then be sended to the clients along with the original scenario wml objects.)

fixes #1420
2018-07-31 22:57:16 +02:00
gfgtdf
c4aacbe31f don't use std::pair
instead we use a custom struct. std::pair is bad becasue you never know
what "first" or "second" mean.
2018-07-31 22:57:06 +02:00
gfgtdf
44734570dd fix attacks beein wrongly disabled
as said in the comment, that get_special_bool might return the wrong value, as since 5f58cd7c6d the bc_vector no longer contains disabled attacks we can just remove this code.

fixes #3324
2018-07-31 22:56:53 +02:00
gfgtdf
97b5612691 ignore [delay] during preload,prestart and initial lua.
as the ingame ui is not shown yet, [delay] would only result in showing a black screen,

Also in the case of initial lua it might result in crashes because of the threaded loadingscren, or simply because parts of the ui are not initialized yet.
2018-07-31 22:56:41 +02:00