Merge remote-tracking branch 'josteph/forward-port-some-of-the-174'

* josteph/forward-port-some-of-the-174:
  don't call invalidate_layout() unless needed
  Convert a bunch more C-style casts I missed in 0dc5656 to static_cast
  fixup  don't show travis notifications from forks (cherry picked from commit 55bc62f442)
  don't show travis notifications from forks (cherry picked from commit d6ab780ce9)
  fix out of bonunds check
  Lua: Invalidate layout in set_dialog_value()
  Fix includes
  Implement iOS version detection
  Game Load: Use child_or_empty().
  Themes: Fix the observers icon being hidden under the minimap
  Game Load: Restore the ability to select 1.12.6 savegames in the list
  Fix CMake build on macOS
  NR S8: compatibility commit to make the new companions from scratch if we don't have them stored
  Partially revert "Additional village variations (#3342)"
  DM: Add last breath dialog for Zorlan
  DM: Generalize death message so it works when Delfador is young and old
  gui2/unit_recall: Change Recall button back to its correct label
  Updated changelog in Xcode
  Add WML unit test for unupgradable (#3336)
  gui2/unit_recall: Fix i18n issues
  DM: add some TODOs
  iOS: finger scrolling in controls.
  iOS document directories. Might use these on other platforms as well.
  .gitignore for CLion
  German multiplayer translation: fixes
  German translation: reword era descriptions
  German translation: fix a string
  Statistics Dialog: merge unit name and count labels
  add / remove some comments
  Tutorial Part2: Give the player a canche to undo his move
  UtBS 5: changes to scenario locations (#3104)
  Update changelog in macOS package
  SotA: transform bats already after the 5th scenario
  TRoW: revert workaround for #2912
  Changelog entry for the #2912 work around
  TRoW: Increase Rithrandil's workaround portrait height to 700
  TRoW: IPF-downscale Rithrandil's portrait, as a workaround to #2912
  Add missing deprecation messages for deprecated macros
  Northern Rebirth S02_01: keep side 8 leader from wandering off too far
  changelog: remove AToTB AI entry
  wesnothd: prevent another instance of crash from owner not in player_connections
  Increased in-game chat size. This makes it render more smoothly
  Minor tweaks to classic theme (thanks enclave for doing this)
  Update RELEASE_NOTES (cherry picked from commit e2a2a85f16)
  Update changelog for custom AI for AToTB S2
  TRoW: revert changes, to avoid a potential OOS
  Re-apply patches to fix issues #2844 and #2846 in SotA
  Clear RELEASE_NOTES
  Repair 66ab35f in the upwards direction
  Add changelog for 1.14.0
  add placeholer links to appdata file
  Hide Editor help section
  UtBS: readd do_not_list
  UtBS: wmlindent pass
  Fix MP label for #2855
  Fixup 601c67d970
  UtBS: Re-added compatibility code to load old saves using the new elves
  Swap count and name columns in statistics (fixes #2893)
  Revert string changes in SotA for 1.14 RC 3 - gold
  AI recruitment: use unit-specific recall cost
  AI recruitment: fix units on recall list interfering with recruiting
  Fixup f7ab008 before GCC complains about an unused parameter >_<
  Help: disabled parsing error popup
  LoW: Fix translation error in conjunct list (fixes #2833) (#2834)
  Fix pofix
  Changelog entry for recent SotA fixes
  Pofix entry for fc6c3ac04b
  Pofix entry for b86a2968fe
  Pofix entry for ab9f29a7a4
  Fix HP label in longer languages
  Help: removed sort_sections key with invalid value
  less redraw_everything calls when receiving [change_controller]
  fix gui2 dialog disappearing after [change_controller]
  Use a fallback for when the player name is not known in debug notifications
This commit is contained in:
josteph 2018-10-30 00:07:10 +00:00
commit f1a5bd09e8
65 changed files with 1136 additions and 3404 deletions

7
.gitignore vendored
View file

@ -35,7 +35,7 @@ projectfiles/Xcode/**/Wesnoth.dmgCanvas
projectfiles/Xcode/**/*.mode1v3
projectfiles/Xcode/**/*.pbxuser
projectfiles/Xcode/**/xcuserdata
projectfiles/Xcode/**/project.xcworkspace
projectfiles/Xcode/**/*.xcworkspace
# CodeBlocks
projectfiles/**/.clang
@ -68,6 +68,11 @@ src/**/*.vcproj
.vscode
/.vs
# CLion
/.idea
cmake-build-debug
cmake-build-release
# eclipse
.settings
!utils/umc_dev/org.wesnoth*/.settings/

View file

@ -47,7 +47,8 @@ notifications:
email: false
irc:
channels:
- "chat.freenode.net#wesnoth-dev"
# "chat.freenode.net#wesnoth-dev"
- secure: "HwCgH1VmpYbfv4giKIGkATkWc6o1+HXH827JXwxDnwFGZrLyf+1t4mHC6OaTMOFkZvT7qhSfIe80GeiRkg2x14ZpUE9XYewUUOSq7dRJlk2KLWlGRf5fZFHZVEdDOPdTdJjCLGqddY+4sMjqMlrtgIOxbPSXKLPTJLBhEEr8ZqE="
template:
- "\x02%{repository}\x0f#\x0312%{build_number}\x0f (\x0307%{branch}\x0f - \x02%{commit}\x0f : \x0303%{author}\x0f): \x02%{message}\x0f"
- "Build details : \x0302%{build_url}\x0f"

View file

@ -26,14 +26,11 @@ CHANGES
[rawarn="Deprecations and breaking changes"]
[list]
[*][set_menu_item] no longer fires repeatedly if the player holds the hotkey (bug #1711). If you were relying on repeated firing, add repeat_on_hold=yes to [default_hotkey].
[*][tt]ai.synced_command[/tt] was removed
[/list]
[/rawarn]
[rasection="New Lua/WML features"]
[list]
[*]Add-on creators can now specify a comma-separated list of tags in the .pbl file, which are used by the Add-ons Manager when filtering add-ons by typing key words into the Filter box. This may be used to make it easier for people to find add-ons, e.g. by including their acronym among the tags. See [wiki]PblWML[/wiki] for details.
[/list]
[/rasection]
@ -41,7 +38,7 @@ CHANGES
KNOWN BUGS
==========
[raissue="Newly introduced in 1.13.x"]
[raissue="Newly introduced in 1.14.x"]
[b]General bugs:[/b]
[list]
@ -57,7 +54,6 @@ KNOWN BUGS
[b]General bugs:[/b]
[list]
[*]The game can crash when planning recruits in Planning Mode.
[/list]
[b]Bugs specific to Microsoft Windows:[/b]

View file

@ -458,6 +458,17 @@
[/message]
[/event]
[event]
name=last breath
[filter]
id=Zorlan
[/filter]
[message]
speaker=Zorlan
message=_ "Argh! It can't be, beaten by these swine!"
[/message]
[/event]
[event]
name=enemies defeated
[endlevel]

View file

@ -263,57 +263,27 @@ Chapter Three"
[/not]
[/filter]
[/store_unit]
[switch]
variable=l3_store_{NAME}.length
[case]
value=0
[set_variable]
name=left_behind_{NAME}
value= _ "some experienced warriors" # wmllint: ignore
[/set_variable]
[/case]
[case]
value=1
[set_variable]
name=left_behind_{NAME}
value=$l3_store_{NAME}[0].name
[/set_variable]
[/case]
[else]
{VARIABLE l3_length $l3_store_{NAME}.length}
{VARIABLE_OP l3_length sub 1}
[for]
array=l3_store_{NAME}
# for-case, what a great anti-pattern
[do]
[switch]
variable=i
[case]
value=0
[set_variable]
name=left_behind_{NAME}
value=$l3_store_{NAME}[$i].name
[/set_variable]
[/case]
[case]
value=$l3_length
[set_variable]
name=left_behind_{NAME}
value= _ "$left_behind_{NAME} and $l3_store_{NAME}[$i].name" # wmllint: ignore
[/set_variable]
[/case]
[else]
[set_variable]
name=left_behind_{NAME}
value= _ "$left_behind_{NAME}|, $l3_store_{NAME}[$i].name" # wmllint: ignore
[/set_variable]
[/else]
[/switch]
[/do]
[/for]
{CLEAR_VARIABLE l3_length}
[/else]
[/switch]
[lua]
code=<<
local args = (...)
local units = wml.child_array(args, "units")
local empty_str = args.empty
local var = args.variable
for i = 1, #units do
units[i] = units[i].name
end
wml.variables[var] = wesnoth.format_conjunct_list(empty_str, units)
>>
[args]
empty= _ "some experienced warriors" # wmllint: ignore
variable=left_behind_{NAME}
[insert_tag]
name=units
variable=l3_store_{NAME}
[/insert_tag]
[/args]
[/lua]
#enddef
{LEAVE_BEHIND_L3 kalenz 1}

View file

@ -314,6 +314,20 @@
[/message]
[/event]
# Keep Mal Tath from grabbing the southern-most village and ending up on
# the tiny castle in the south during the first two turns
[event]
name=side 8 turn 1 refresh, side 8 turn 2 refresh
first_time_only=no
[modify_unit]
[filter]
id=Mal Tath
[/filter]
moves=4
[/modify_unit]
[/event]
# Find Camerin event
[event]
name=capture

View file

@ -212,17 +212,84 @@
id=Elenia
[/recall]
[recall]
id=Stalrag
[/recall]
[if]
[have_unit]
id=Stalrag
search_recall_list=yes
[/have_unit]
[then]
[recall]
id=Stalrag
[/recall]
[/then]
[else]
[unit]
type=Dwarvish Lord
id=Stalrag
name= _ "Stalrag"
profile=portraits/Stalrag.png
x,y=15,2
side=1
[modifications]
{TRAIT_LOYAL}
{TRAIT_HEALTHY}
[/modifications]
{IS_LOYAL}
[/unit]
[/else]
[/if]
[recall]
id="Ro'Arthian"
[/recall]
[if]
[have_unit]
id="Ro'Arthian"
search_recall_list=yes
[/have_unit]
[then]
[recall]
id="Ro'Arthian"
[/recall]
[/then]
[else]
[unit]
type=Ancient Lich
id="Ro'Arthian"
name= _ "RoArthian"
profile=portraits/Arthian.png
x,y=15,2
side=1
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_HERO}
[/unit]
[/else]
[/if]
[recall]
id="Ro'Sothian"
[/recall]
[if]
[have_unit]
id="Ro'Sothian"
search_recall_list=yes
[/have_unit]
[then]
[recall]
id="Ro'Sothian"
[/recall]
[/then]
[else]
[unit]
type=Lich
id="Ro'Sothian"
name= _ "RoSothian"
profile=portraits/Ro_Sothian.png
x,y=15,2
side=1
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_HERO}
[/unit]
[/else]
[/if]
[objectives]
side=1

View file

@ -117,6 +117,8 @@ I was so sure I had the answer! I was wrong. I wanted to believe that I was imag
# *************************** PRESTART ***************************
{SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT}
[event]
name=prestart

View file

@ -137,6 +137,8 @@ The tunnel at the back of the cave narrowed and ran on for quite some time. Patc
[/redraw]
#enddef
{SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT}
[event]
name=start

View file

@ -88,6 +88,8 @@ Rastaban seems like an acceptable ally. He is quite different from the stodgy te
# *************************** PRESTART ***************************
{SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT}
[event]
name=prestart

View file

@ -85,6 +85,9 @@ My primary objective was met, and I had been able to press a number of ghosts in
#endif
# *************************** PRESTART ***************************
{SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT}
[event]
name=prestart

View file

@ -28,6 +28,8 @@ I never would have been able to escape the trees without ghosts. They had proven
gold=0
[/side]
{SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT}
[event]
name=prestart

View file

@ -1023,3 +1023,40 @@
[/command]
[/set_menu_item]
#enddef
# this is inserted in some scenarios to clear SotA Bats from older saves
# it needs to be in all scenarios which use SIDE_1_ARDONNA, otherwise the player
# may be able to recruit normal and SotA bats, or be able to recruit bats when
# he plays someone who should not be able to do so
#define SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT
# SotA bats were necessary for the ship where they were drawn behind the
# rigging, but not in later scenarios.
[event]
name=prestart
# First, we'll make sure newly recruited ones will be correct
[disallow_recruit]
side=1
type=Vampire Bat SotA
[/disallow_recruit]
[allow_recruit]
side=1
type=Vampire Bat
[/allow_recruit]
# Now the type of all bats on the recall list is changed
[lua]
code = <<
for i, u in ipairs(wesnoth.get_recall_units { type = 'Vampire Bat SotA, Blood Bat SotA, Dread Bat SotA' }) do
if u.type == 'Vampire Bat SotA' then
u:transform('Vampire Bat')
elseif u.type == 'Blood Bat SotA' then
u:transform('Blood Bat')
elseif u.type == 'Dread Bat SotA' then
u:transform('Dread Bat')
end
end
>>
[/lua]
[/event]
#enddef

View file

@ -7,8 +7,8 @@
image="units/wesfolk-outcast-masked.png"
hitpoints=33
[abilities]
{ABILITY_LEADERSHIP}
{ABILITY_DISTRACT}
{ABILITY_LEADERSHIP}
[/abilities]
movement_type=elusivefoot
movement=7

View file

@ -148,6 +148,47 @@
[/about]
[/campaign]
# Compatibility code for saves using the new elves from 1.13.13 or earlier
#textdomain wesnoth
[+language]
EASY_NEW= _ "Easy"
NORMAL_NEW= _ "Medium"
HARD_NEW= _ "Hard"
[/language]
#textdomain wesnoth-utbs
#ifdef CAMPAIGN_UNDER_THE_BURNING_SUNS
#ifdef EASY_NEW
#define EASY
#enddef
#define UTBSNEW
#enddef
#endif
#ifdef NORMAL_NEW
#define NORMAL
#enddef
#define UTBSNEW
#enddef
#endif
#ifdef HARD_NEW
#define HARD
#enddef
#define UTBSNEW
#enddef
#endif
#ifdef UTBSNEW
# Need to re-load this for ON_DIFFICULTY to not break due to a missing
# EASY/NORMAL/HARD symbol
{core/macros/utils.cfg}
#endif
#endif
#ifdef CAMPAIGN_UNDER_THE_BURNING_SUNS
[binary_path]

View file

@ -1715,6 +1715,11 @@
x,y=28,24
side=4
[/capture_village]
[capture_village]
x,y=35,27
side=4
[/capture_village]
[capture_village]
x,y=35,27

View file

@ -9,6 +9,7 @@
movement=4
experience=150
level=3
do_not_list=yes
description= _ "Divine Incarnations are said to be the closest thing to a gods actual presence in this world. They can be both awe-inspiring and terrifying."+{SPECIAL_NOTES}+{SPECIAL_NOTES_ARCANE}+{SPECIAL_NOTES_MAGICAL}
[attack]
damage=9

View file

@ -622,6 +622,8 @@
[disallow_end_turn][/disallow_end_turn]
# works around the situation that the player can't do anything anymore
# if he disobeys orders - inserts [allow_end_turn][/allow_end_turn]
{ALLOW_END_TURN_AFTER_ATTACK}
{CLEAR_PRINT}

View file

@ -619,6 +619,9 @@ A full list of abilities and weapons specials, along with traits, may be found i
[/message]
{UNDO_REMINDER}
# cancel an eventually started attack to still allow undoing after the warning
[cancel_action][/cancel_action]
[/event]
# Remind them to keep back

View file

@ -1,7 +1,11 @@
#textdomain wesnoth-help
[help]
[toplevel]
#ifdef __INCOMPLETE_EDITOR_HELP__
sections=introduction,gameplay,units,abilities_section,traits_section,weapon_specials,eras_section,terrains_section,schedule,addons,editor,commands,encyclopedia
#else
sections=introduction,gameplay,units,abilities_section,traits_section,weapon_specials,eras_section,terrains_section,schedule,addons,commands,encyclopedia
#endif
topics=license
[/toplevel]
@ -61,7 +65,6 @@
id=eras_section
title= _ "Eras"
sections_generator=eras
sort_sections=generated
sort_topics=yes
topics=..eras_section
[/section]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -95,28 +95,34 @@
_"<small>(early finish bonus)</small>"#enddef
#define EARLY_FINISH_BONUS_NOTE
#deprecated 1 This is now automatically generated and not required.
_"Early finish bonus."#enddef
#define NO_EARLY_FINISH_BONUS_NOTE
#deprecated 1 This is now automatically generated and not required.
_"No early finish bonus."#enddef
#define NO_GOLD_CARRYOVER_NOTE
#deprecated 1 This is now automatically generated and not required.
_"No gold carried over to the next scenario."#enddef
#define NEW_GOLD_CARRYOVER_NOTE_100
#deprecated 1 This is now automatically generated and not required.
_"
100% of finishing gold carried over to the next scenario."#enddef
#define NEW_GOLD_CARRYOVER_NOTE_40
#deprecated 1 This is now automatically generated and not required.
_"
40% of finishing gold carried over to the next scenario."#enddef
#define NEW_GOLD_CARRYOVER_NOTE_20
#deprecated 1 This is now automatically generated and not required.
_"
20% of finishing gold carried over to the next scenario."#enddef
#define MISSILE_FRAME_FIREBALL
# Deprecated; use MISSILE_FRAME_FIREBALL_XY X_OFFSET Y_OFFSET instead
#Deprecated 2 1.15 Use MISSILE_FRAME_FIREBALL_XY instead
{MISSILE_FRAME_FIREBALL_XY 0 0}
#enddef
@ -136,6 +142,7 @@ _"No gold carried over to the next scenario."#enddef
#enddef
#define STORY_PART_SPEECH BACKGROUND_IMAGE SPEAKER_VALUE SPEECH_VALUE
#deprecated 1
[part]
story={CAPTION {SPEAKER_VALUE}} + {SPEECH_VALUE}
[background_layer]
@ -146,6 +153,7 @@ _"No gold carried over to the next scenario."#enddef
#enddef
#define LOYAL_UNDEAD_UNIT SIDE TYPE X Y
#deprecated 1 Use LOYAL_UNIT instead
# Create a unit with the Undead and Loyal traits.
[unit]
type={TYPE}
@ -161,7 +169,7 @@ _"No gold carried over to the next scenario."#enddef
#enddef
#define ON_SIGHTING ID SIGHTING_SIDE SIGHTED_FILTER ACTION_WML
#deprecated 1 Use an [event]name=sighted instead.
#deprecated 2 Use an [event]name=sighted instead.
# NOTE: As of version 1.11, this macro is unnecessary, since sighted
# events now work as intended.
#
@ -349,12 +357,15 @@ _"No gold carried over to the next scenario."#enddef
#enddef
#define MENU_IMG_TXT IMAGE TEXT
#deprecated 3 1.15 Use the new [difficulty] tag instead for campaign difficulties, or the label/description keys for message options.
"&"+{IMAGE}+"="+{TEXT}#enddef
#define MENU_IMG_TXT2 IMAGE FIRST_TEXT_VALUE SECOND_TEXT_VALUE
#deprecated 3 1.15 Use the new [difficulty] tag instead for campaign difficulties, or the label/description keys for message options.
"&"+{IMAGE}+"="+{FIRST_TEXT_VALUE}+"="+{SECOND_TEXT_VALUE}#enddef
#define MAKE_AI_SIDE_PERSISTENT SIDE
#deprecated 2 1.15 Just put the persistent key in [side] directly
#Macro to make a ai controlled side persistent.
#Needs to be placed below the side definition.
[+side]
@ -392,6 +403,7 @@ _"No gold carried over to the next scenario."#enddef
# wmlindent: closer "{NEXT "
#define DRAKE_FLYING_ANIM STANDING_IMAGE FLYING_IMAGE
#deprecated 2
[standing_anim]
start_time=0
[filter]

View file

@ -287,7 +287,7 @@ C*,K*,X*,Q*,W*,Ai,M*,*^V*,*^B*,_off^_usr#enddef
#Crude villages (grassland)
{NEW:VILLAGE_TOD *^Vc village/hut}
{NEW:VILLAGE_TOD *^Vca village/hut-snow}
{NEW:VILLAGE *^Vca village/hut-snow}
{NEW:VILLAGE_TOD *^Vl village/log-cabin}
{NEW:VILLAGE *^Vla village/log-cabin-snow}

View file

@ -55,7 +55,6 @@
[unit_type]
id=Soulless
name= _ "Soulless"
# No profile variations for now
profile=portraits/undead/soulless.png
race=undead
{TRAIT_FEARLESS_MUSTHAVE}

View file

@ -55,7 +55,6 @@
[unit_type]
id=Walking Corpse
name= _ "Walking Corpse"
# No profile variations for now
profile=portraits/undead/walking-corpse.png
race=undead
{TRAIT_FEARLESS_MUSTHAVE}

View file

@ -63,22 +63,19 @@
# This white color is used for most texts.
#define GUI__FONT_COLOR_ENABLED__DEFAULT
#arg ALPHA
255#endarg
"215, 215, 215, {ALPHA}"
#enddef
255 #endarg
"215, 215, 215, {ALPHA}" #enddef
# This gray color is used for most text when the widget is disabled.
#define GUI__FONT_COLOR_DISABLED__DEFAULT
#arg ALPHA
255#endarg
"128, 128, 128, {ALPHA}"
#enddef
255 #endarg
"128, 128, 128, {ALPHA}" #enddef
#define GUI__FONT_COLOR_DISABLED_DARK__DEFAULT
#arg ALPHA
255#endarg
"96, 96, 96, {ALPHA}"
#enddef
255 #endarg
"96, 96, 96, {ALPHA}" #enddef
# This gold color is used for the
# - title labels

View file

@ -0,0 +1,131 @@
# This unit test defines a WML object based implementation of the "unupgradable" ability
# https://github.com/ProditorMagnus/Ageless-for-1-14/blob/52c1eaf31722bb58046a1b459d4f29daa8d88487/data/general_data/weapon_specials/unupgradable.cfg
# and checks that it works. What is being tested here is that
# [swarm] with swarm_attacks_max=swarm_attacks_min prevents strike changes
# - through [attacks]
# - through [effect] increase_attacks
{GENERIC_UNIT_TEST "swarm_disables_upgrades" (
[event]
name=start
[modify_unit]
[filter]
[/filter]
max_hitpoints=100
hitpoints=100
attacks_left=1
[/modify_unit]
[object]
silent=yes
[effect]
apply_to=attack
[set_specials]
mode=append
[swarm]
swarm_attacks_max=1
swarm_attacks_min=1
[/swarm]
[attacks]
value=10
[/attacks]
[attacks]
add=13
[/attacks]
[damage]
value=1
[/damage]
[chance_to_hit]
value=100
[/chance_to_hit]
[/set_specials]
[/effect]
[filter]
id=bob
[/filter]
[/object]
[object]
silent=yes
[effect]
apply_to=attack
[set_specials]
mode=append
[attacks]
value=10
[/attacks]
[damage]
value=1
[/damage]
[chance_to_hit]
value=100
[/chance_to_hit]
[/set_specials]
[/effect]
[filter]
id=alice
[/filter]
[/object]
[object]
silent=yes
[filter]
id=bob
[/filter]
[effect]
apply_to=attack
increase_attacks=12
[/effect]
[/object]
[store_unit]
[filter]
id=alice
[/filter]
variable=a
kill=yes
[/store_unit]
[store_unit]
[filter]
id=bob
[/filter]
variable=b
[/store_unit]
[unstore_unit]
variable=a
find_vacant=yes
x,y=$b.x,$b.y
[/unstore_unit]
[store_unit]
[filter]
id=alice
[/filter]
variable=a
[/store_unit]
[do_command]
[attack]
weapon=0
defender_weapon=0
[source]
x,y=$a.x,$a.y
[/source]
[destination]
x,y=$b.x,$b.y
[/destination]
[/attack]
[/do_command]
[store_unit]
[filter]
id=alice
[/filter]
variable=a
[/store_unit]
[store_unit]
[filter]
id=bob
[/filter]
variable=b
[/store_unit]
{ASSERT ({VARIABLE_CONDITIONAL a.hitpoints equals 99})}
{ASSERT ({VARIABLE_CONDITIONAL b.hitpoints equals 90})}
{SUCCEED}
[/event]
)}

View file

@ -13,13 +13,13 @@
description= _ "The classic, pre-1.12 theme"
#define DEFAULT_FONT_NORMAL
14 #enddef
16 #enddef
#define DEFAULT_FONT_SMALL
12 #enddef
14 #enddef
#define DEFAULT_FONT_TINY
10 #enddef
12 #enddef
#define DEFAULT_FONT_REALLYTINY
9 #enddef
10 #enddef
[resolution]
id=1024x768
@ -36,7 +36,7 @@
id=top-panel
image=themes/legacy/top-bg.png
ref=screen
rect="=,=,=,+26"
rect="=,=,=,+27"
xanchor=top
yanchor=fixed
[/panel]

View file

@ -142,7 +142,7 @@
font_size={DEFAULT_FONT_TINY}
text= _ "HP"
ref=unit-box-topright
rect="+4,=-1,+30,+14"
rect="+4,=-1,+60,+14"
xanchor=right
yanchor=fixed
[/label]
@ -150,7 +150,7 @@
id=label-xp
font_size={DEFAULT_FONT_TINY}
text= _ "XP"
rect="=,+14,+60,+14"
rect="=,+14,+70,+14"
xanchor=right
yanchor=fixed
[/label]
@ -351,6 +351,7 @@
[observers]
id=observers
font_size={DEFAULT_FONT_SMALL}
ref=battery-box-topright
rect="+5,=,+16,+{DEFAULT_FONT_SMALL_HEIGHT}"
xanchor=right
yanchor=fixed

View file

@ -64,19 +64,19 @@
</description>
<screenshots>
<screenshot type="default">
<image type="source" width="1280" height="768">https://www.wesnoth.org/images/sshots/wesnoth-1.13.2-1.jpg</image>
<image type="source">https://www.wesnoth.org/images/sshots/wesnoth-1.14.0-1.jpg</image>
</screenshot>
<screenshot>
<image type="source" width="1280" height="768">https://www.wesnoth.org/images/sshots/wesnoth-1.13.2-4.jpg</image>
<image type="source">https://www.wesnoth.org/images/sshots/wesnoth-1.14.0-2.jpg</image>
</screenshot>
<screenshot>
<image type="source" width="1280" height="768">https://www.wesnoth.org/images/sshots/wesnoth-1.13.6-4.jpg</image>
<image type="source">https://www.wesnoth.org/images/sshots/wesnoth-1.14.0-3.jpg</image>
</screenshot>
<screenshot>
<image type="source" width="1280" height="768">https://www.wesnoth.org/images/sshots/wesnoth-1.13.7-2.jpg</image>
<image type="source">https://www.wesnoth.org/images/sshots/wesnoth-1.14.0-4.jpg</image>
</screenshot>
<screenshot>
<image type="source" width="1280" height="768">https://www.wesnoth.org/images/sshots/wesnoth-1.13.6-1.jpg</image>
<image type="source">https://www.wesnoth.org/images/sshots/wesnoth-1.14.0-5.jpg</image>
</screenshot>
</screenshots>
<categories>

View file

@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: Battle for Wesnoth 1.14\n"
"Report-Msgid-Bugs-To: http://bugs.wesnoth.org/\n"
"POT-Creation-Date: 2018-05-26 12:04 UTC\n"
"PO-Revision-Date: 2018-06-04 02:38+0200\n"
"PO-Revision-Date: 2018-07-05 06:43+0200\n"
"Last-Translator: Aaron Winter <winter.aaron93@gmail.com>\n"
"Language-Team: irc://irc.freenode.net/#wesnoth-de\n"
"Language: de_DE\n"
@ -19,7 +19,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.0.7\n"
"X-Generator: Poedit 2.0.8\n"
#. [generic_multiplayer]: id=user_map
#: data/multiplayer/_main.cfg:8
@ -57,9 +57,9 @@ msgid ""
"units available for recruit. Consists of six factions. Not considered "
"balanced."
msgstr ""
"Eine Epoche mit hochstufigen Einheiten: Heerführer der dritten Stufe und "
"rekrutierbare Einheiten der Stufen eins und zwei. Sie besteht aus sechs "
"Fraktionen und gilt als unausgeglichen."
"Eine Epoche mit hochstufigen Einheiten: Die Heerführer sind auf der dritten "
"Stufe und rekrutierbare Einheiten auf den Stufen eins und zwei. Diese Epoche "
"besteht aus sechs Fraktionen und gilt als unausgeglichen."
#. [era]: id=era_dunefolk
#: data/multiplayer/eras.cfg:83
@ -76,12 +76,12 @@ msgid ""
"This era is still under development, so please be sure to report any "
"problems that arise."
msgstr ""
"Eine Epoche mit einer zusätzlichen Fraktion zu den 5 Hauptfraktion der "
"Standard Epoche. Das Dünenvolk nutzt sein Geländevorteil bedacht aus und "
"Eine Epoche mit einer zusätzlichen Fraktion zu den sechs Fraktion der "
"Standardepoche. Das Dünenvolk nutzt sein Geländevorteil bedacht aus und "
"führt koordinierte Schläge bei Sonnenaufgang oder Sonnenuntergang durch.\n"
"\n"
"Diese Epoche ist noch in Entwicklung, bitte kontaktieren sie die Entwickler, "
"falls irgendwelche Probleme auftreten sollten."
"Diese Epoche ist noch in Entwicklung und nicht so ausgeglichen wie die "
"Standardepoche."
#. [era]: id=era_dunefolk_heroes
#: data/multiplayer/eras.cfg:94
@ -98,12 +98,11 @@ msgid ""
"This era is still under development, so please be sure to report any "
"problems that arise."
msgstr ""
"Eine Epoche mit einer zusätzlichen Fraktion zu den 5 Hauptfraktion der Zeit "
"der Helden Epoche. Das Dünenvolk nutzt sein Geländevorteil bedacht aus und "
"führt koordinierte Schläge bei Sonnenaufgang oder Sonnenuntergang durch.\n"
"Eine Epoche mit einer zusätzlichen Fraktion zu den sechs Fraktion der "
"Heldenepoche. Das Dünenvolk nutzt sein Geländevorteil bedacht aus und führt "
"koordinierte Schläge bei Sonnenaufgang oder Sonnenuntergang durch.\n"
"\n"
"Diese Epoche ist noch in Entwicklung, bitte kontaktieren sie die Entwickler, "
"falls irgendwelche Probleme auftreten sollten."
"Diese Epoche ist noch in Entwicklung und wie die Heldenepoche unausgeglichen."
#. [lua]: f
#: data/multiplayer/eras.lua:61
@ -362,7 +361,7 @@ msgstr ""
"sie wieder auf, der Allschlund verschlingt und speiht wieder aus. "
"Vielleicht, wenn ihre Macht wächst, wird Sulla sich eines Tages befreien. "
"Doch so lange wird sie sich ergötzen an den Schlachten der Sterblichen, die "
"vom Unglück des Allschlundes erfasst werden. Von Doc Paterson. "
"vom Unglück des Allschlundes erfasst werden. Von Doc Paterson."
#. [side]
#: data/multiplayer/scenarios/2p_Aethermaw.cfg:22
@ -1275,7 +1274,7 @@ msgstr ""
#. [slider]: id=enemey_gold_factor
#: data/multiplayer/scenarios/2p_Dark_Forecast.cfg:253
msgid "Changes the gold worth of the enemy spawns by a certain percentage"
msgstr "Ändert den Goldwert der Gegner um einen Prozentsatz."
msgstr "Ändert den Goldwert der Gegner um einen bestimmten Prozentsatz."
#. [lua]: final_spawn
#: data/multiplayer/scenarios/2p_Dark_Forecast.lua:313
@ -1910,8 +1909,8 @@ msgid ""
"The tile in the centre, which contains the casket of the titular "
"necromancer, is always covered in pitch black fog."
msgstr ""
"Das Feld in der Mitte auf welchem der Sarg von dem Nekromanten befindet, ist "
"immer mit einem tiefschwarzen Neben umhüllt."
"Das Feld in der Mitte, auf welchem sich der Sarg des Nekromanten befindet, "
"ist immer von einem tiefschwarzen Nebel umhüllt."
#. [multiplayer]: id=multiplayer_Weldyn_Channel
#: data/multiplayer/scenarios/2p_Weldyn_Channel.cfg:5
@ -1967,8 +1966,7 @@ msgstr ""
#: data/multiplayer/scenarios/3p_Alirok_Marsh.cfg:6
msgid "Three players come head to head on this water-cut battlefield."
msgstr ""
"Drei Spieler treten auf dieser durch Wasser getrennten Karte gegeneinander "
"an."
"Drei Spieler treten auf dieser von Wasser getrennten Karte gegeneinander an."
#. [multiplayer]: id=multiplayer_Island_of_the_Horatii
#: data/multiplayer/scenarios/3p_Island_of_the_Horatii.cfg:5
@ -1982,7 +1980,7 @@ msgid ""
"free for all map."
msgstr ""
"Die zentrale Insel zu kontrollieren ist häufig der Schlüssel zum Sieg auf "
"dieser alle gegen alle Karte für 3 Spieler."
"dieser Alle-gegen-Alle Karte für 3 Spieler."
#. [multiplayer]: id=multiplayer_3p_Morituri
#: data/multiplayer/scenarios/3p_Morituri.cfg:5
@ -2145,7 +2143,7 @@ msgstr ""
"Verhältnisse auf dieser Karte ist sinnvolles Platzieren sowie gutes "
"Manövrieren Eurer Einheiten von entscheidender Bedeutung. Vorgesehene "
"Allianzen sind 1&amp;4 gegen 2&amp;3 (Nordosten gegen Südwesten).\n"
"Empfohlene Einstellung: 75 Goldstücke Startkapital"
"Empfohlene Einstellung: 75 Goldstücke Startkapital."
#. [side]
#: data/multiplayer/scenarios/4p_Isars_Cross.cfg:20
@ -2336,7 +2334,7 @@ msgstr ""
"4 verfeindete Heerführer wollen die zentral gelegene Burg erobern. Doch die "
"Bewohner dieser Region sind bereit, sie bis zum Letzten zu verteidigen.\n"
"Empfohlene Einstellung: Für FFA oder 4 gegen 1 sollte die Goldmenge für den "
"mittleren Spieler angepasst werden, 75 Goldstücke für die übrigen Spieler"
"mittleren Spieler angepasst werden, 75 Goldstücke für die übrigen Spieler."
#. [side]
#: data/multiplayer/scenarios/5p_Auction-X.cfg:69
@ -2531,7 +2529,7 @@ msgstr ""
"im Kampf um die 33 Dörfer an. Wer sich in diesem schwierigen Gelände "
"verläuft, kann schnell vom Feinde eingekesselt und besiegt werden. Überlegt "
"Euch also gut, wie Ihr vorgeht.\n"
"Empfohlene Einstellung: 100 Gold als Startkapital"
"Empfohlene Einstellung: 100 Gold als Startkapital."
#. [multiplayer]: id=multiplayer_Volcano
#: data/multiplayer/scenarios/6p_Volcano.cfg:7
@ -2566,7 +2564,7 @@ msgstr ""
"überrennt. Um Nord gegen Süd zu spielen, solltet ihr 1, 4, 5 gegen 2, 3, 6 "
"antreten lassen. Es mag jedoch interessant sein, es einmal mit 1, 4, 6 oder "
"1,3, 6 zu probieren.\n"
"Empfohlene Einstellung: 150 Gold als Startkapital"
"Empfohlene Einstellung: 150 Gold als Startkapital."
#. [multiplayer]: id=multiplayer_8p_Mokena_Prairie
#: data/multiplayer/scenarios/8p_Mokena_Prairie.cfg:5

View file

@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: Battle for Wesnoth 1.12\n"
"Report-Msgid-Bugs-To: http://bugs.wesnoth.org/\n"
"POT-Creation-Date: 2018-04-15 04:34 UTC\n"
"PO-Revision-Date: 2018-06-15 22:16-0000\n"
"PO-Revision-Date: 2018-07-03 04:15+0200\n"
"Last-Translator: German translation team <irc://irc.freenode.net/#wesnoth-"
"de>\n"
"Language-Team: irc://irc.freenode.net/#wesnoth-de\n"
@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.5.7\n"
"X-Generator: Poedit 2.0.8\n"
#. [campaign]: id=The_South_Guard
#: data/campaigns/The_South_Guard/_main.cfg:9
@ -1852,7 +1852,7 @@ msgstr ""
"nicht mehr los ... Selbst der gescheite Meister erlag der Einflüsterung des "
"Bösen — und nun führt ER sie an! Erst war das ja zuträglich, dann ist der "
"Alte jedoch dem Wahn verfallen und griff auch uns an. Niemand ist mehr vor "
"dem mehr sicher!"
"dem sicher!"
#. [message]: speaker=Ethiliel
#: data/campaigns/The_South_Guard/scenarios/05_Choice_In_The_Fog.cfg:468
@ -1926,8 +1926,8 @@ msgstr ""
msgid "You will pay for taking Mebrin from us! If he is harmed..."
msgstr ""
"Mit DEINEM Leben wirst du immerhin für die Entführung Mebrins zahlen! Wenn "
"er verletzt ist, dann … <small>(<i>ballt außer sich die Hand zur Faust</i>)"
"</small>"
"er verletzt ist, dann … <small>(<i>ballt außer sich die Hand zur Faust</"
"i>)</small>"
#. [objective]: condition=win
#: data/campaigns/The_South_Guard/scenarios/05_Choice_In_The_Fog.cfg:527

File diff suppressed because it is too large Load diff

View file

@ -114,6 +114,9 @@ if(X11_FOUND)
set(game-external-libs ${game-external-libs} ${X11_LIBRARIES})
endif(X11_FOUND)
if(APPLE)
set(game-external-libs ${game-external-libs} "-framework IOKit")
endif(APPLE)
########### Set Library mode ###############
if(ENABLE_SHARED_LIBRARIES)

View file

@ -139,7 +139,7 @@ void move_unit_spectator::set_unit(const unit_map::const_iterator &u)
game_events::pump_result_t get_village(const map_location& loc, int side, bool *action_timebonus, bool fire_event)
{
std::vector<team> &teams = resources::gameboard->teams();
team *t = unsigned(side - 1) < teams.size() ? &teams[side - 1] : nullptr;
team *t = static_cast<unsigned>(side - 1) < teams.size() ? &teams[side - 1] : nullptr;
if (t && t->owns_village(loc)) {
return game_events::pump_result_t();
}

View file

@ -185,7 +185,7 @@ bool simulated_synced_command(){
// Helper functions.
void helper_check_village(const map_location& loc, int side){
std::vector<team> &teams = resources::gameboard->teams();
team *t = unsigned(side - 1) < teams.size() ? &teams[side - 1] : nullptr;
team *t = static_cast<unsigned>(side - 1) < teams.size() ? &teams[side - 1] : nullptr;
if(t && t->owns_village(loc)){
return;
}

View file

@ -70,9 +70,9 @@ std::string format_version(unsigned a, unsigned b, unsigned c)
std::string format_version(const SDL_version& v)
{
return formatter() << unsigned(v.major) << '.'
<< unsigned(v.minor) << '.'
<< unsigned(v.patch);
return formatter() << static_cast<unsigned>(v.major) << '.'
<< static_cast<unsigned>(v.minor) << '.'
<< static_cast<unsigned>(v.patch);
}
#ifndef __APPLE__

View file

@ -22,38 +22,44 @@
#define __IPHONEOS__ (__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000)
#endif
#if defined(__IPHONEOS__)
//TODO: Implement iOS version detection
#else
#import <Foundation/Foundation.h>
#if defined(__IPHONEOS__)
#import <UIKit/UIKit.h>
#endif
namespace desktop {
namespace apple {
std::string os_version() {
namespace apple {
std::string os_version() {
//
// Standard Apple version
//
std::string version_string = "";
NSArray *version_array = [[[NSProcessInfo processInfo] operatingSystemVersionString] componentsSeparatedByString:@" "];
#if defined(__IPHONEOS__)
//TODO: Implement iOS version detection
std::string version_string = "iOS ";
#else
std::string version_string = "Apple";
NSArray *version_array = [[[NSProcessInfo processInfo] operatingSystemVersionString] componentsSeparatedByString:@" "];
const version_info version_info([[version_array objectAtIndex:1] UTF8String]);
if (version_info.major_version() == 10 && version_info.minor_version() < 12) {
version_string += " OS X ";
} else {
version_string += " macOS ";
}
version_string += [[version_array objectAtIndex:1] UTF8String];
version_string += " (";
version_string += [[version_array objectAtIndex:3] UTF8String];
return version_string;
#endif
const version_info version_info([[version_array objectAtIndex:1] UTF8String]);
if (version_info.major_version() == 10 && version_info.minor_version() < 12) {
version_string = "Apple OS X ";
} else {
version_string = "Apple macOS ";
}
} // end namespace apple
#endif
version_string += [[version_array objectAtIndex:1] UTF8String];
version_string += " (";
version_string += [[version_array objectAtIndex:3] UTF8String];
return version_string;
}
} // end namespace apple
} // end namespace desktop
#endif //end __APPLE__

View file

@ -104,7 +104,7 @@ void display_chat_manager::add_chat_message(const std::time_t& time, const std::
try {
// We've had a joker who send an invalid utf-8 message to crash clients
// so now catch the exception and ignore the message.
msg = my_disp_.video().faked() ? "" : font::word_wrap_text(msg,font::SIZE_NORMAL,my_disp_.map_outside_area().w*3/4);
msg = my_disp_.video().faked() ? "" : font::word_wrap_text(msg,font::SIZE_15,my_disp_.map_outside_area().w*3/4);
} catch (utf8::invalid_utf8_exception&) {
ERR_NG << "Invalid utf-8 found, chat message is ignored." << std::endl;
return;

View file

@ -1368,7 +1368,7 @@ formula_function_expression::formula_function_expression(const std::string& name
, star_arg_(-1)
{
for(std::size_t n = 0; n != arg_names_.size(); ++n) {
if(arg_names_.empty() == false && arg_names_[n].back() == '*') {
if(arg_names_[n].empty() == false && arg_names_[n].back() == '*') {
arg_names_[n].resize(arg_names_[n].size() - 1);
star_arg_ = n;
break;

View file

@ -675,7 +675,7 @@ static void flood_name(const map_location& start, const std::string& name, std::
for(n = 0; n < 6; n++) {
//we do not care for tiles outside the middle part
//cast to unsigned to skip x < 0 || y < 0 as well.
if(unsigned(adj[n].x) >= width / 3 || unsigned(adj[n].y) >= height / 3) {
if(static_cast<unsigned>(adj[n].x) >= width / 3 || static_cast<unsigned>(adj[n].y) >= height / 3) {
continue;
}

View file

@ -22,8 +22,7 @@
#pragma once
#include "gui/widgets/helper.hpp"
#include <SDL_rect.h>
#include "sdl/point.hpp"
namespace gui2
{

View file

@ -182,7 +182,7 @@ void drop_down_menu::pre_show(window& window)
}
}
if(selected_item_ >= 0 && unsigned(selected_item_) < list.get_item_count()) {
if(selected_item_ >= 0 && static_cast<unsigned>(selected_item_) < list.get_item_count()) {
list.select_row(selected_item_);
}

View file

@ -73,7 +73,7 @@ void editor_generate_map::do_generator_selected(window& window)
listbox& list = find_widget<listbox>(&window, "generators_list", false);
const int current = list.get_selected_row();
if(current == -1 || unsigned(current) > map_generators_.size()) {
if(current == -1 || static_cast<unsigned>(current) > map_generators_.size()) {
return; // shouldn't happen!
}

View file

@ -565,17 +565,17 @@ void file_dialog::sync_bookmarks_bar(window& window)
if(it == bookmark_paths_.rend()) {
if(current_bookmark_ >= 0) {
bookmarks_bar.select_row(unsigned(current_bookmark_), false);
bookmarks_bar.select_row(static_cast<unsigned>(current_bookmark_), false);
}
current_bookmark_ = -1;
} else {
const int new_selection = static_cast<int>(std::distance(bookmark_paths_.begin(), it.base()) - 1);
if(new_selection != current_bookmark_) {
assert(unsigned(new_selection) < bookmarks_bar.get_item_count());
assert(static_cast<unsigned>(new_selection) < bookmarks_bar.get_item_count());
if(current_bookmark_ >= 0) {
bookmarks_bar.select_row(unsigned(current_bookmark_), false);
bookmarks_bar.select_row(static_cast<unsigned>(current_bookmark_), false);
}
bookmarks_bar.select_row(unsigned(new_selection), true);
bookmarks_bar.select_row(static_cast<unsigned>(new_selection), true);
current_bookmark_ = new_selection;
}
}
@ -627,13 +627,13 @@ void file_dialog::on_bookmark_selected(window& window)
if(current_bookmark_ >= 0) {
// Don't allow the user to deselect the selected bookmark. That wouldn't
// make any sense.
bookmarks_bar.select_row(unsigned(current_bookmark_));
bookmarks_bar.select_row(static_cast<unsigned>(current_bookmark_));
}
return;
}
assert(unsigned(new_selection) < bookmark_paths_.size());
assert(static_cast<unsigned>(new_selection) < bookmark_paths_.size());
current_bookmark_ = new_selection;
set_path(bookmark_paths_[new_selection]);
refresh_fileview(window);

View file

@ -234,10 +234,13 @@ void show_help(const section &toplevel_sec,
CVideo::delay(10);
}
}
catch (parse_error& e) {
catch (parse_error& /*e*/) {
// Disabled due to issue #2587
#if 0
std::stringstream msg;
msg << _("Parse error when parsing help text: ") << "'" << e.message << "'";
gui2::show_transient_message("", msg.str());
#endif
}
}

View file

@ -561,7 +561,7 @@ surface o_modification::operator()(const surface& src) const
g = (*beg) >> 8;
b = (*beg);
alpha = std::min<unsigned>(unsigned(fxpmult(alpha,amount)), 255);
alpha = std::min<unsigned>(static_cast<unsigned>(fxpmult(alpha,amount)), 255);
*beg = (alpha << 24) + (r << 16) + (g << 8) + b;
}

View file

@ -191,14 +191,21 @@ turn_info::PROCESS_DATA_RESULT turn_info::process_network_data(const config& cfg
resources::controller->on_not_observer();
}
auto disp_set_team = [](int side_index) {
const bool side_changed = static_cast<int>(display::get_singleton()->viewing_team()) != side_index;
display::get_singleton()->set_team(side_index);
if(side_changed) {
display::get_singleton()->redraw_everything();
display::get_singleton()->recalculate_minimap();
video2::trigger_full_redraw();
}
};
if (resources::gameboard->is_observer() || (resources::gameboard->teams())[display::get_singleton()->playing_team()].is_local_human()) {
display::get_singleton()->set_team(display::get_singleton()->playing_team());
display::get_singleton()->redraw_everything();
display::get_singleton()->recalculate_minimap();
disp_set_team(display::get_singleton()->playing_team());
} else if (tm.is_local_human()) {
display::get_singleton()->set_team(side - 1);
display::get_singleton()->redraw_everything();
display::get_singleton()->recalculate_minimap();
disp_set_team(side - 1);
}
resources::whiteboard->on_change_controller(side,tm);

View file

@ -373,7 +373,7 @@ void extract_summary_from_config(config& cfg_save, config& cfg_summary)
cfg_summary["difficulty"] = cfg_save["difficulty"];
cfg_summary["random_mode"] = cfg_save["random_mode"];
cfg_summary["active_mods"] = cfg_save.child("multiplayer")["active_mods"];
cfg_summary["active_mods"] = cfg_save.child_or_empty("multiplayer")["active_mods"];
cfg_summary["campaign"] = cfg_save["campaign"];
cfg_summary["version"] = cfg_save["version"];
cfg_summary["corrupt"] = "";

View file

@ -2280,7 +2280,7 @@ int game_lua_kernel::intf_put_recall_unit(lua_State *L)
lua_unit *lu = nullptr;
unit_ptr u = unit_ptr();
int side = lua_tointeger(L, 2);
if (unsigned(side) > teams().size()) side = 0;
if (static_cast<unsigned>(side) > teams().size()) side = 0;
if(luaW_isunit(L, 1)) {
lu = luaW_checkunit_ref(L, 1);

View file

@ -491,6 +491,7 @@ int intf_set_dialog_value(lua_State* L)
selectable->set_value(luaL_checkinteger(L, 1) -1);
}
} else if (gui2::text_box* text_box = dynamic_cast<gui2::text_box*>(w)) {
w->get_window()->invalidate_layout();
const t_string& text = luaW_checktstring(L, 1);
text_box->set_value(text.str());
} else if (gui2::slider* slider = dynamic_cast<gui2::slider*>(w)) {
@ -527,6 +528,7 @@ int intf_set_dialog_value(lua_State* L)
}
}
} else if(gui2::unit_preview_pane* unit_preview_pane = dynamic_cast<gui2::unit_preview_pane*>(w)) {
w->get_window()->invalidate_layout();
if(const unit_type* ut = luaW_tounittype(L, 1)) {
unit_preview_pane->set_displayed_type(*ut);
} else if(unit* u = luaW_tounit(L, 1)) {
@ -561,6 +563,7 @@ int intf_set_dialog_value(lua_State* L)
}
}
} else {
w->get_window()->invalidate_layout();
t_string v = luaW_checktstring(L, 1);
gui2::styled_widget* c = dynamic_cast<gui2::styled_widget*>(w);
if(!c) {
@ -806,7 +809,7 @@ int intf_set_dialog_canvas(lua_State* L)
}
std::vector<gui2::canvas> &cv = c->get_canvases();
if(i < 1 || unsigned(i) > cv.size()) {
if(i < 1 || static_cast<unsigned>(i) > cv.size()) {
return luaL_argerror(L, 1, "out of bounds");
}

View file

@ -369,7 +369,9 @@ static int impl_unit_get(lua_State *L)
return_string_attrib("variation", u.variation());
return_bool_attrib("zoc", u.get_emit_zoc());
return_string_attrib("facing", map_location::write_direction(u.facing()));
return_string_attrib("portrait", u.big_profile() == u.absolute_image() ? u.absolute_image() + u.image_mods() : u.big_profile());
return_string_attrib("portrait", u.big_profile() == u.absolute_image()
? u.absolute_image() + u.image_mods() + "~XBRZ(2)"
: u.big_profile());
return_cfg_attrib("__cfg", u.write(cfg); u.get_location().write(cfg));
if(luaW_getmetafield(L, 1, m)) {

View file

@ -1157,9 +1157,9 @@ surface brighten_image(const surface &surf, fixed_t amount)
g = (*beg) >> 8;
b = (*beg);
r = std::min<unsigned>(unsigned(fxpmult(r, amount)),255);
g = std::min<unsigned>(unsigned(fxpmult(g, amount)),255);
b = std::min<unsigned>(unsigned(fxpmult(b, amount)),255);
r = std::min<unsigned>(static_cast<unsigned>(fxpmult(r, amount)),255);
g = std::min<unsigned>(static_cast<unsigned>(fxpmult(g, amount)),255);
b = std::min<unsigned>(static_cast<unsigned>(fxpmult(b, amount)),255);
*beg = (alpha << 24) + (r << 16) + (g << 8) + b;
}
@ -1360,7 +1360,7 @@ surface submerge_alpha(const surface &surf, int depth, float alpha_base, float a
int d = (beg-limit)/nsurf->w; // current depth in pixels
float a = alpha_base - d * alpha_delta;
fixed_t amount = ftofxp(a<0?0:a);
alpha = std::min<unsigned>(unsigned(fxpmult(alpha,amount)),255);
alpha = std::min<unsigned>(static_cast<unsigned>(fxpmult(alpha,amount)),255);
*beg = (alpha << 24) + (r << 16) + (g << 8) + b;
}

View file

@ -1542,11 +1542,12 @@ bool game::remove_player(const socket_ptr& player, const bool disconnect, const
auto owner_iter = player_connections_.find(owner_);
if(owner_iter == player_connections_.end())
ERR_GAME << "game owner " << client_address(owner_) << "is not in player_connections_\n";
else
else {
owner_iter->info().set_status(player::PLAYING);
observers_.erase(std::remove(observers_.begin(), observers_.end(), owner_), observers_.end());
players_.push_back(owner_);
send_observerquit(owner_);
observers_.erase(std::remove(observers_.begin(), observers_.end(), owner_), observers_.end());
players_.push_back(owner_);
send_observerquit(owner_);
}
}
// send the host a notification of removal of this side

View file

@ -131,7 +131,7 @@ bool positional_source::is_global() const
void positional_source::update(unsigned int time, const display &disp)
{
if (time - last_played_ < unsigned(min_delay_) || sound::is_sound_playing(id_))
if (time - last_played_ < static_cast<unsigned>(min_delay_) || sound::is_sound_playing(id_))
return;
int i = randomness::rng::default_instance().get_random_int(1, 100);

View file

@ -406,6 +406,10 @@ namespace
std::string message;
utils::string_map i18n_vars = {{ "player", current_team.current_player() }};
if(i18n_vars["player"].empty()) {
i18n_vars["player"] = _("(unknown player)");
}
if(message_is_command) {
i18n_vars["command"] = text;
message = VGETTEXT("The :$command debug command was used during $players turn", i18n_vars);

View file

@ -1661,7 +1661,7 @@ std::vector<config> unit::get_modification_advances() const
continue;
}
if(modification_count("advancement", adv["id"]) >= unsigned(adv["max_times"].to_int(1))) {
if(modification_count("advancement", adv["id"]) >= static_cast<unsigned>(adv["max_times"].to_int(1))) {
continue;
}

View file

@ -181,6 +181,11 @@ game_stringfixes = {
("others.... An altar serves", "others... An altar serves"),
),
# fixes added in 1.13.13+dev
"wesnoth-sota" : (
("Welcome to my laboratory, Ardonna of Tarynth", "Welcome to my laboratory, Ardonna of Tarrynth"),
),
"wesnoth-sotbe" : (
# fixes added in 1.12.0+dev
("Easier said then done, Chief. There are many humans in that city.", "Easier said than done, Chief. There are many humans in that city."),

View file

@ -133,6 +133,7 @@
0 test_time_area_prestart
0 test_berzerk_firststrike
0 feeding
0 swarm_disables_upgrades
#
# Deterministic unit facing tests
0 recruit_facing_enemy_one