79307 Commits

Author SHA1 Message Date
Pentarctagon
e5b4a39242
Add a prompt to migrate data from previous versions of wesnoth.
Currently migrated, if existing:
* Add-ons (redownloaded if present on new add-ons server)
* Preferences file
* Credentials file
2021-07-15 20:16:17 -05:00
Pentarctagon
a64f0fcbd8
Fix building with gcc 8.3. 2021-07-15 15:49:44 -05:00
Pentarctagon
34ed9b434b
Add a few more wesnoth version unit test checks. 2021-07-13 23:01:46 -05:00
Celtic Minstrel
43b18741cc Lua API: Fix some issues with versions
Fixes #5955
Fixes #5957
2021-07-13 19:39:25 -04:00
Pentarctagon
b988d35203
No, we're not deprecating a bunch more things. 2021-07-13 13:55:59 -05:00
Celtic Minstrel
064858b969 WC: Add player count to campaign abbreviation
1-player will be WC1, 2-player WC2, 3-player WC3
2021-07-13 14:12:08 -04:00
Celtic Minstrel
8daad7d5e9 WC: Player count is now an option in the settings dialog 2021-07-13 14:12:08 -04:00
Celtic Minstrel
7488fbfef6 WC: Change it to a campaign so it can use the built-in difficulty selection
Fixes #5113
2021-07-13 14:12:08 -04:00
Celtic Minstrel
284f7149e3 WML API: [story]title= is now optional even in ActionWML
Make it default to the scenario name, as it would for scenario-level [story].
2021-07-13 14:10:07 -04:00
Celtic Minstrel
a74cabbbd0 Lua API: Some clean-up of the mp_settings API
This basically adds more reasonable representations of some of the fields, or in some cases just gives them a new, less confusing name.

This also adds wesnoth.scenario.name, which is basically the same as wesnoth.scenario.mp_settings.mp_scenario_name except for the fact that it retains its translatable property
2021-07-13 14:10:07 -04:00
Celtic Minstrel
e19590c73d Fix a missing detail in saved game serialization
The translatable string explaining why you can't currently end your turn was missing from the saved game. This fixes that.
2021-07-13 14:10:07 -04:00
Celtic Minstrel
009b9b9ffe Fix crash when accessing variables from a map generator
On some machines, the crash doesn't occur, but the variable is still not loaded correctly.

Addresses #5896
2021-07-13 14:10:07 -04:00
Celtic Minstrel
357bc7b821 Lua API: Fix extraneous quotes in deprecation messages for attributes 2021-07-13 14:10:07 -04:00
Celtic Minstrel
82a98fd96e Lua API: Revive mp_settings.active_mods and mp_settings.era_id
These were removed without deprecation in 0efd35acbcba45724be4737073dc7f77480ec781
This adds them back as deprecated.

Fixes #5941
2021-07-13 14:10:07 -04:00
Celtic Minstrel
554c3bd49c Add a deprecation message for the Giant Stoat 2021-07-13 14:10:07 -04:00
Toom
87e0900729
Update dune explorer image path, closes #5945 (#5946) 2021-07-12 16:42:41 -05:00
Nils Kneuper
82915ff91d updated Czech translation 2021-07-10 10:42:03 +02:00
Nils Kneuper
f42d1a132e updated Russian translation 2021-07-10 10:40:49 +02:00
Nils Kneuper
0e105f7b73 updated Turkish translation 2021-07-10 10:38:52 +02:00
mattsc
93d501d9a4
Merge pull request #5943 from mattsc/gamestate_synced_command
Fix custom synced commands not changing the AI game state
2021-07-09 19:37:32 -07:00
mattsc
630cbdca35 Fix custom synced commands not changing the AI game state
The old ai.synced_command function always set the AI-context game state to changed when executing such a command. This was inadvertently omitted when the implementation was changed to invoke_synced_command in fef953a4. While custom synced commands may or may not change the game state and the engine has no means of determining this correctly in all cases (meaning that neither behavior is technically wrong), the fact that the behavior was changed should be considered a bug. This commit changes it back to how it was before fef953a4.
2021-07-09 16:21:42 -07:00
nemaara
69e4b5395d UtBS S8: increase turn limit 2021-07-09 02:48:34 -04:00
Martin Hrubý (hrubymar10)
63b4bcbf05
Update Xcode project's version 2021-07-08 20:15:38 +02:00
Martin Hrubý (hrubymar10)
321dfb4cc1
Update Xcode project 2021-07-08 20:15:12 +02:00
Steve Cotton
182c911977 Remove the 10ms delay before closing a window
This delay is to stop the loop running continously, it isn't necessary to do
that when we're about to exit the loop anyway. I'm unsure whether this makes
any noticeable difference, but it seems reasonable to remove delays when
possible.
2021-07-07 11:25:43 +02:00
Celtic Minstrel
eee04c4ad2 Lua API: Fix campaign end text being untranslatable
Fixes #5928
2021-07-07 01:32:05 -04:00
Celtic Minstrel
aed779fb6a Lua API: Deprecate the helper.lua module itself 2021-07-07 01:32:05 -04:00
Celtic Minstrel
4ec60b99d9 Lua: Update all mainline references to the helper module 2021-07-07 01:32:05 -04:00
Celtic Minstrel
8b05449bbc Lua API: Deprecate helper.set_wml_action_metatable
wml.fire now supports the same syntax - both of the following work:

- wml.fire("message", {message = "Hello World"})
- wml.fire.message{message = "Hello World"}
2021-07-07 01:32:05 -04:00
Celtic Minstrel
771f472dd7 Lua API: Add wesnoth.map.iter_adjacent
This replaces helper.adjacent_tiles
2021-07-07 01:32:05 -04:00
Celtic Minstrel
70fa5a73d4 Lua API: Fix side.side_name = side.side_name changing the side name
Addresses #4994
2021-07-07 01:32:05 -04:00
Celtic Minstrel
47951c4700 Lua API: Add wesnoth.sides.iter
This replaces both helper.get_sides and helper.all_teams
2021-07-07 01:32:05 -04:00
Celtic Minstrel
1e42f80c13 Lua API: Use the named tuple idiom for WML tags
Instead of this:

for i,t in ipairs(cfg) do
  if t[1] == 'foo' then
    do_something(t[2])
  end
end

You can now write this:

for i,t in ipairs(cfg) do
  if t.tag == 'foo' then
    do_something(t.value)
  end
end
2021-07-07 01:32:05 -04:00
Celtic Minstrel
a13dc44229 Lua API: Add function to get the current color adjust 2021-07-07 01:32:05 -04:00
Celtic Minstrel
60b20c4cca Lua API: Fix crash if passing an out-of-bounds side to wesnoth.interface.end_turn 2021-07-07 01:32:05 -04:00
Celtic Minstrel
f5e9a2cac6 Lua API: Add vision and jamming as unit attributes 2021-07-07 01:32:05 -04:00
Celtic Minstrel
fdfc15cf5d Lua API: Include remaining vision in the output of find_vision_range 2021-07-07 01:32:05 -04:00
Steve Cotton
23a0377b56 Make failure loading textdomains non-fatal
Prior to this, if any .po file included a \v (vertical tab), then the game
exited before reaching the title screen. It didn't have to be in a mainline
translation - any add-on could break the game, and would do so before the title
screen appeared, thus preventing the user from using the add-on manager or
language selection to avoid the problem.

Instead, treat a parsing error similarly to the .po file simply not existing.
Fixes #5923.
2021-07-07 04:07:18 +02:00
Steve Cotton
f9fc806fd2 Add a unit test for wesnoth.current.synced_state
The edge-case of calling evaluate_single within an unsynced event was
surprising, and I'm not sure it's correct. However, as we're about to
release the 1.16 branch I think it's better to include that as a test
that the API doesn't change during the stable branch.
2021-07-07 02:09:49 +02:00
Elvish_Hunter
b397ca6262 wmlscope: document external docstring directive 2021-07-04 20:51:17 +02:00
Elvish_Hunter
ddc51d5d46 wmlscope: allow defining external docstrings for inline macros
External docstrings can be defined with the '# wmlscope: docstring' directive
2021-07-04 20:51:17 +02:00
Elvish_Hunter
00a5beb5ae wmlscope: do not report 'INTERNAL:' macros in the macro reference 2021-07-04 20:51:17 +02:00
Steve Cotton
eaa39d653b Say what the error is when a broken .po file stops Wesnoth starting
Bug #5923 is that a broken .po file can make Wesnoth fail to start, not
even reaching the title screen. Additionally, the error message printed
to the console just said "*timestamp* error general:", and then missed
the details of what had broken.

This commit fixes the error message to show which add-on and which line
are causing the problem.
2021-07-04 16:45:42 +02:00
Nils Kneuper
041b965719 updated Turkish translation 2021-07-03 19:04:09 +02:00
Nils Kneuper
e1a6685856 updated Portuguese (Brazil) translation 2021-07-03 19:00:48 +02:00
Nils Kneuper
63f1a67f36 updated Italian translation 2021-07-03 18:59:46 +02:00
Nils Kneuper
5f893170f5 updated Spanish translation 2021-07-03 18:58:14 +02:00
Nils Kneuper
760e55a294 updated Bulgarian translation 2021-07-03 18:53:46 +02:00
Celtic Minstrel
b4809e9ded fix whitespace 2021-07-02 18:51:48 -04:00
Celtic Minstrel
7c2d0c1c5d Lua API: Fix location_set.of_pairs including the location in the value
This is the real cause of the breakage in 5a9c24c4e79d624e34aa475949a4aa49b1984322 and d04bd2bf5d2ad932ca9bb3203f4ff9f91411e261.
A returned location now has both x/y and 1/2, so the location_set logic removed the x/y but kept the 1/2, causing it to break when converted to a config.
This makes it use rawget when the value is a table, which fixes it.
2021-07-02 16:55:42 -04:00