Commit graph

1357 commits

Author SHA1 Message Date
Celtic Minstrel
212a91113c Convert wesnoth.sides to a module and move several functions to it
The old names still work but are deprecated.

In addition, all the moved functions now accept either a side number or a side userdata as the first parameter.
2019-11-17 11:35:56 -05:00
Iris Morelle
6ac5044e8a Update changelog
[ci skip]
2019-11-17 01:49:15 -03:00
Celtic Minstrel
e2af5ac14b Correct an older changelog entry from 1.15.0 2019-11-16 15:14:09 -05:00
Celtic Minstrel
cd6283f8db Add a few more tags to the [modify_unit] optimized path 2019-11-16 15:14:09 -05:00
Celtic Minstrel
1f36590e80 Add a few more attributes to the [modify_unit] optimized path 2019-11-16 15:14:09 -05:00
Celtic Minstrel
2cc7fe6450 Revert "Add [modify_unit]rebuild=no"
This reverts commit 51d6402453.

After discussion with @gfgtdf it was determined that this is not a useful feature after all, since it was in fact the default behaviour for the optimized path.
2019-11-16 15:14:09 -05:00
Iris Morelle
393d412b0d ui: Fix untranslated text in Rename Unit
Fixes #4569.
2019-11-16 15:19:07 -03:00
Celtic Minstrel
f016ac7183 Lua: Flip functions moved to the interface module, as well as the theme_items table
This means that they are now added to the interface  module by default in C++, and only duplicated to the Wesnoth module in Lua.

Some additional functions were moved:
- wesnoth.scroll -> wesnoth.interface.scroll
- wesnoth.zoom -> wesnoth.interface.zoom
- wesnoth.get_mouseover_tile -> wesnoth.interface.get_hovered_hex
- wesnoth.color_adjust -> wesnoth.interface.color_adjust
- wesnoth.set_menu_item -> wesnoth.interface.set_menu_item
- wesnoth.clear_menu_item -> wesnoth.interface.clear_menu_item

Added wesnoth.units.get_hovered as an alias of wesnoth.interface.get_displayed_unit
2019-11-16 12:24:31 -05:00
Celtic Minstrel
aaa2dc4ece Rollback possibility of wesnoth.get_units matching recall list units
Now it's renamed to wesnoth.units.find_on_map.

wesnoth.units.find implements the case of finding units on either the map or a recall list.
2019-11-15 22:39:09 -05:00
Celtic Minstrel
4dc986f028 Lua: Flip functions moved to the units module
This means that they are now added to the units module by default in C++, and only duplicated to the Wesnoth module in Lua.

Some additional functions were moved:
- wesnoth.create_unit -> wesnoth.units.create
- wesnoth.get_units -> wesnoth.units.find
- wesnoth.get_unit -> wesnoth.units.get

Deprecated wesnoth.get_recall_units in favour of wesnoth.get_units, which has gained the ability to match units on the recall list if x="recall" or y="recall" appears in the filter at toplevel.

The wesnoth.units module now acts like a metatable for unit userdata, meaning that any functions (or attributes) added to the module will be visible through any unit.
2019-11-15 22:39:08 -05:00
Steve Cotton
3a8dc9c361 trackplacer3 a utility to export and import tmx files (#4365)
The python2 trackplacer included both the handling of the file format, and the
GUI application. This trackplacer3 is a library for the file format, without
the GUI.

The new tmx_trackplacer is a command-line tool for exporting the data to
Tiled's .tmx format, and re-importing it back to .cfg files, so that the GUI of
Tiled can be used to avoid reimplementing the GUI of Trackplacer in Python 3.

The implementation uses Tiled's Object Layers (not Tile Layers).  This allows
additional journey markers to be added with the "Insert Tile" tool, and
additional journeys to be added as new layers.

It can also read in a .cfg and then re-export it to a new .cfg file, to see if
the data is preserved. The format is chosen by the output filename.

The old trackplacer2 isn't removed in this commit - before removing it, I think
trackplacer3 needs some way to preview the animation.

----- Comments on the mainline campaigns: -----

AToTB, DM, LoW, NR and THoT will work with this. But:

Northern Rebirth's bigmap.cfg has a track RECOVERY whose STAGE1 starts with
an OLD_REST - that isn't handled by trackplacer, it must have been hand-edited.
That OLD_REST will be lost when read by either trackplacer2 or trackplacer3,
similarly the OLD_BATTLE of LoW's SAURIANS track will be lost.

Delfador's Memoirs SEARCH_STAGE1 is omitted from all subsequent parts of
SEARCH. Also in DM, SEARCH_STAGE3 has a point which is then moved in STAGE4
onwards - I guess a hand edit. Both of this will be overwritten if the file
is edited with either this tool or with the python2 trackplacer.

SotA's journey_chapter*.cfg files and WoV's bigmap.cfg file have some of the
trackplacer comments removed, they won't be handled by this tool, at least not
until better error handling is added.
2019-11-14 13:43:25 +01:00
Celtic Minstrel
51d6402453 Add [modify_unit]rebuild=no 2019-11-13 01:00:36 -05:00
Celtic Minstrel
c602110e72 Support [variables] in [modify_side]
This allows merging in changes to side variables and may alleviate the lack of [set_variables] support for side variables
2019-11-13 00:22:50 -05:00
Celtic Minstrel
5fc6360488 Revert "Blacklist core data directory for wml.load() - fixes #4302"
This reverts commit ddffc1a4fd due to feedback from @shikadiqueen
Instead see #4564
2019-11-12 23:27:36 -05:00
Celtic Minstrel
ddffc1a4fd Blacklist core data directory for wml.load() - fixes #4302 2019-11-12 23:03:55 -05:00
Celtic Minstrel
f2f9bc5d80 Add more Lua functions for working with WML values 2019-11-12 23:03:55 -05:00
Celtic Minstrel
8374306009 Add six more known attributes to the [modify_unit] optimized path 2019-11-12 23:03:55 -05:00
Iris Morelle
d7f2595393 gui2/text_box: Implement I-beam cursor
This cursor is active when the widget has the mouse focus. You know,
like textboxes are wont to do anywhere else. Took long enough, although
there was an interaction issue with tooltips fixed in the previous
commit.

I still need to figure out how to make this work with GUI1 textboxes
(e.g. in-game console).

The colour version of the cursor was kindly provided by LordBob, and the
B&W version is my own.
2019-11-13 00:03:38 -03:00
nemaara
a60f8c78c8 Add DiD update to changelog 2019-11-12 21:15:14 -05:00
pentarctagon
a247dc56fb
Update changelog for Private Replay MP toggle. 2019-11-12 13:33:19 -06:00
Iris Morelle
6e0b39f329 gui2/campaign_selection: Consider untranslated search terms
As I said in 739e2608db, the abbreviations
and names of campaigns in English tend to be better known by the
community, so they are also useful to consider when searching through
the list.

The description's untranslated version is also included in this even
though descriptions are longer and a bit more expensive to sift through.
It may still come in handy in cases where proper names get inflected or
transliterated I guess.
2019-11-12 16:21:59 -03:00
nemaara
b27ab96bac Update dwarf changes to use correct format 2019-11-12 13:06:54 -05:00
nemaara
eb08be4e81 Update changelog with dwarf L2 rebalance 2019-11-12 13:00:34 -05:00
Celtic Minstrel
04207cc723 Update changelog
Oops! Forgot to add this to the commit!

[ci skip]
2019-11-11 23:52:37 -05:00
Iris Morelle
3beefca899 gui2/text_box: Add hover effect
This gives GUI2 textboxes (and password boxes since they are a subclass)
a simple hover effect by extending the canvas definitions for the widget
accordingly.
2019-11-11 17:16:39 +11:00
doofus-01
3995752782
Update Changelog 2019-11-10 15:55:53 -08:00
Celtic Minstrel
bbebd1eb91 Update schema and changelog 2019-11-10 17:22:04 -05:00
Celtic Minstrel
bb351d431e Update changelog 2019-11-10 14:50:35 -05:00
Elvish_Hunter
8f52a49800 wmllint: removed a few asserts and postponed a few unit sanity checks
Fixes #4102
2019-11-10 10:45:46 +01:00
Celtic Minstrel
f2a664cb42 Add SUF upkeep to changelog
[ci skip]
2019-11-09 23:40:24 -05:00
Nils Kneuper
41175c04ea updated Portuguese (Brazil) translation 2019-11-09 10:45:43 +01:00
Nils Kneuper
512f9640d7 updated Russian translation 2019-11-09 10:42:54 +01:00
nemaara
931b5d1563 Add dunefolk update to changelog 2019-11-08 19:53:05 -05:00
nemaara
ab27656e16 Add Dunefolk rebalance to changelog 2019-11-08 01:44:52 -05:00
nemaara
8f118a2a65 Add DiD update to changelog 2019-11-08 01:15:55 -05:00
Iris Morelle
739e2608db gui2/campaign_selection: Make descriptions and abbreviations search terms
This should extend the dialog's usefulness in a way that is more or less
consistent with the Add-ons Manager's search function. Although one
issue is that abbreviations are often found floating around in their
English form ("HttT") instead of the various localized versions ("HaT").
2019-11-06 14:32:39 -03:00
Elvish_Hunter
8c6e637b9d Make wmllint ignore race= inside filters in [unit_type]
Fixes #4105
2019-11-05 20:00:05 +01:00
Charles Dang
15bf3bb256 Removed scaling algorithm customization
We're going to be using NN scaling for the map, and that's already handled automatically
by SDL (and in the future, OGL). We don't need these settings for surface SCALED_TO_ZOOM
and SCALED_TO_HEX scaling. In any case, if we want to scale a surface to zoom or hex, it
will almost certainly be for map rendering (such scaling methods don't make sense in the
UI, for example), so just defaulting to NN is simplest.

This change drops the option to use Linear or xBRZ scaling for map zooming. This was already
the practical case due to me converting map rendering to use textures. NN was used for all
zoom levels, and it's fast and looks good.
2019-11-05 22:55:05 +11:00
Iris Morelle
c75b7c1681 wmllint: Ignore [load_resource] for unit id validation
Fixes #4538.

[ci skip]
2019-11-04 22:13:25 -03:00
Charles Dang
e718d1e472 Removed Classic theme
[ci skip]
2019-11-04 17:07:36 +11:00
nemaara
0246c9b6b5 Add DiD update to changelog 2019-11-04 00:55:48 -05:00
pentarctagon
4e23be0180
Clarify changelog entry. 2019-11-03 13:25:36 -06:00
pentarctagon
26b0ce0010
Add core button removal to changelog. 2019-11-03 10:19:32 -06:00
Steve Cotton
b66bdb8a16 Add other versions of Wesnoth to the Load Game dialog
If a save directory from another version is found, a drop-down list of
directories is added below the filter box in the Load Game dialog.

Refactor save_index_class to allow instances for other directories.

Design idea: all new saves go in to the main save directory. Games can be
loaded from other directories, but those directories are treated as read-only.
When building an index for other directories, the index is kept in memory and
not written to disk - this results in some noticeable lag in the UI when
opening the other versions' directories, but not the usual save dir.
2019-11-03 12:11:51 +01:00
nemaara
3823fea979 Fix changelog entry for new animations 2019-11-02 11:55:05 -04:00
nemaara
d4c4a3874e Add new death standing and idle animations 2019-11-02 11:48:33 -04:00
nemaara
1a67d53e7d Add DiD update to changelog 2019-11-01 04:18:51 -04:00
nemaara
0fd85da1e1 Add DiD updates to changelog 2019-11-01 02:48:36 -04:00
nemaara
cfb0768e0c Add Lord/Steelclad nerf to changelog 2019-10-31 11:38:17 -04:00
nemaara
b8690e5733 Add DiD update to changelog 2019-10-31 11:36:15 -04:00