Commit graph

284 commits

Author SHA1 Message Date
pentarctagon
893b31e769 return pbl author attribute to its original usage
and use the new primary_authors attribute instead

Fixes #9547
2024-12-14 18:49:32 -06:00
Subhraman Sarkar
2477618306 rich label: support specifying text color, font and style in resolution
This allows the rich_label definitions in rich_label_default to work.
2024-11-28 23:04:05 +05:30
white-haired-uncle
c2361e3a82
schema: Fix color type definition and uses 2024-11-17 18:07:22 +01:00
newfrenchy83
7d5663b379 add a [remove_specials] tag in [effect] and [filter_special] to [has_attack/filter_weapon]
with this, it is possible to  simultaneously check specials with id and type, and/or other attributes for remove_specials effector filter_weapon
2024-10-30 18:38:36 -05:00
newfrenchy83
e905271c79 add modification specific to gender or variations
the old code don't work for replace advancement in [male/female] or [variation] tag
2024-10-27 09:14:45 -05:00
newfrenchy83
83d1bef0bc add amla advancement to [modify_unit_type]
Addresses https://github.com/wesnoth/wesnoth/issues/9309
when used, the amlas in [unit_type] are replaced by list of amlas in [modify_unit_type],i cannot done add [advancement] without erase amla already present.
2024-10-27 09:14:45 -05:00
Descacharrado
52e132648d
Highlight reachable hexes instead of darkening unreachable hexes (#9292) 2024-10-17 23:23:53 -04:00
newfrenchy83
7665db46af remove 'experimental_' of filter_ability/specials tags
now what 1.18 separate of master branch it is time of aiming for that. "experimental_ preffix is depracated now.
2024-10-14 16:35:56 -05:00
newfrenchy83
b03caa9205
Create in [filter_ability] an attribute 'active' to replace _active suffix in [filter_ability_active] (#9442)
Resolves https://github.com/wesnoth/wesnoth/issues/7926

[filter_ability] and [filter_ability_active] have been merged into a single filter equipped with the 'active' attribute which when the value is 'true' checks the units affected by the sought ability and when the value is 'false' or unset will check the units carrying the ability even if they are not affected by it.

Because of the attribute strategy, I'm afraid that the developer will be mistaken about its function and that's why I'm not at all keen on it but I want to get out of this impasse.
2024-10-13 16:37:31 -05:00
Subhraman Sarkar
df167bdb43 add support for UI Theme addon type
With custom gui2 theme support in #9057, it is now possible to create addons that supply UI Themes or Skins.
This adds support so such addons are properly recognized and validated.
2024-10-10 21:49:38 -04:00
Gunter Labes
b1eb871df7
Schema: Add missing location filter attribute 2024-10-07 14:05:16 +02:00
Subhraman Sarkar
e1c87a24a8 rich_label: allow width key to be a wfl formula 2024-09-23 19:49:44 -04:00
Celtic Minstrel
586fbec882 Update GUI2 schema to match existing implementation of text attributes 2024-09-23 19:49:44 -04:00
newfrenchy83
feef53d4ab
Add an 'alignment' attribute to attacks
This attribute, when set to a valid value of lawful|neutral|chaotic|liminal, will assign to the weapon a different alignment than the unit alignment used by default. This alignment is then used when attacking with this weapon.

The attribute is not accessible from lua so far since the fallback to unit alignment does not work.
2024-09-23 17:11:46 +02:00
Jonathan-Kelly
bddbf060a5 Support events in [abilities] and [specials] tags 2024-09-16 21:07:38 -04:00
Gunter Labes
c53cb1d6fb
Add missing tags to game config schema 2024-09-13 21:59:04 +02:00
Subhraman Sarkar
59911072aa support loading gui2 themes from add-ons
Requires a `gui-theme.cfg` file in Add-on root with a `[gui]` tag.
(Add-ons without all buttons in title_screen may get flagged as defunct.)
2024-08-25 01:56:22 -04:00
Gunter Labes
9b70484b4f
Fix an indent inconsistency and add missing final newlines 2024-08-21 21:48:04 +02:00
Gunter Labes
3c45a5b0e7
Update and correct game config schema
Fix schema tags where "name" is a comma separated list which is not actually supported.
2024-08-19 08:25:55 +02:00
newfrenchy83
8f20c12e3d fix incomplete add [disable] abilityto abilities used like weapon special 2024-08-14 19:39:35 -05:00
newfrenchy83
6ebca64acc add [disable] abilityto abilities used like weapon special 2024-08-11 13:29:34 -05:00
Severin Glöckner
00c081cb4b Schema: support other mp_ keys too
In addition to the mp_village_gold used in mainline,
there exist as well:
- mp_fog
- mp_shroud
- mp_village_support
2024-08-03 11:29:02 -05:00
Subhraman Sarkar
43f0e05d57 preferences dialog: expose option for switching gui2 themes 2024-07-16 13:07:57 +05:30
newfrenchy83
77d023690a Generalize the use of max_value and add the min_value attribute
In the case of [leadership], the fact that the values of each ability can be added when cumulative=yes can justify the addition of limit values not to be exceeded, but this can also apply to heals and [regenerates] with the use of 'add' or 'multiply'.

As for [resistance], it already uses max_value, but if cumulative=yes, then all max_values can add up which could be problematic.
2024-06-19 09:18:54 -05:00
Subhraman Sarkar
43f5644e36
Rich Text Label widget for Help Browser GUI2 port (#8655)
A rich text label widget that can show text marked up with help markup.
Also includes the GUI Test Window, accessible in the title screen after launching wesnoth using --clock option. It can be used as dialog template/example or as a place to test GUI2 code.
2024-06-06 16:33:37 +05:30
Severin Glöckner
049706efda Add [part]text_alignment= to schema 2024-05-31 19:07:13 -04:00
newfrenchy83
9fc5887ae9 'value' attribute in [experimental_filter_ability(_active)] can have 'default' value 2024-05-26 13:48:45 +02:00
Charles Dang
7e2a99dc20 GUI2/Listbox: enabled view-only mode
Currently for the vertical listbox only, since it does have some quirks. Removes the assert in the "show" policy checking if the callback is null. It won't be for the listbox, but doesn't really matter since it's not used.
2024-05-25 00:54:29 -04:00
Subhraman Sarkar
9b38089db0
Story screen redesign (#8510) 2024-05-24 19:29:46 +05:30
newfrenchy83
3d097f2950 add [filter_wml] to filter abilities like [experimental_filter_ability], [experimental_filter_ability_active] or [overwrite][experimental_filter_specials]
adding a sub-filter should make it possible to take into account the sub_tags of the abilities in the checking
2024-05-21 14:54:44 +02:00
Subhraman Sarkar
92d66554dd
UI : About dialog (#8803)
* Redesigned the version dialog to serve as a general purpose About dialog.

* Credits button removed from title screen

* Moved community dialog contents to about dialog as new tab

Co-Authored-By: Pentarctagon

* Bugfixes to the tab_container widget

* Success indication mechanism on copy buttons
2024-05-21 09:43:32 +05:30
Subhraman Sarkar
03a46f1d7c
Combobox, Tab Container and Editability in Text Box (#8390)
* new combobox and tab container widgets
* ediability in text box via the editable key
2024-05-06 09:56:44 +05:30
newfrenchy83
82499d0785
add min_value to [resistance] (#8722)
max_value is used to limit the increase in resistance with the "resistance" capability, but there was no equivalent for its reduction.

To be able to add min_value without redoing the "resistance" checking for the umpteenth time, I prefer to modify effect:: so that the checking of these two attributes is done at the same time as the other numerical attributes and keep the door open to a possible generalization of the proceed
2024-04-11 04:48:41 +02:00
newfrenchy83
7eee400ec0 fix shema validation for overwrite_specials
sme weapon special can use overwrite_specials but i forget to put it in shema validation
2024-03-22 17:09:29 +01:00
pentarctagon
59ac60fa12 add secondary_authors to pbl schema 2024-03-16 01:25:29 -05:00
Charles Dang
08fc993c16 GUI2/Canvas: allow text shape to set outline (resolves #8398) 2024-02-24 18:30:33 -05:00
pentarctagon
d4956dbed7 fix mixed indentation. 2024-02-16 09:40:16 -06:00
Subhraman Sarkar
6c5a8e923d
Spinner and multiline textbox widgets (#8199) 2024-02-13 11:54:34 -06:00
Steve Cotton
6828b54ac7 Log instead of assert for incorrect [teleport] tags in ActionWML
Each [teleport] tag should have exactly one each of [source],
[target] and [filter]. Missing any of those is caught immediately
above the new conditional block, so this makes having two or more
of any of them be treated the same.

The log should maybe be made more visible, but it's a case that
can already be detected by schema validation, so validate it
there instead.

The code in teleport.cpp uses assert() in the cases that the
newly-added code in this commit catches. That's bug 8175, and
it's probably still reachable for units with teleport abilities,
so this doesn't close that bug.
2024-02-09 14:45:03 +01:00
Rafael Fillipe Silva
16e9476191 add a disallowed type to override a mandatory name key into a disallowed optional name key
An impossible regex is defined as the value so nothing will be matched, not even an empty string. The field should be omitted entirely.
2024-02-02 14:57:05 +01:00
Rafael Fillipe Silva
1eb2b494c4 remove super from [elseif] tag, similar to [if], as this is a filter context
This removes the `name` mandatory key requirement from the `[elseif]` without the need of an override.
2024-02-02 14:57:05 +01:00
Toom
2056be55a3
Support [harm_unit]experience values kill/attack/defend/fight/yes/no (#8231) 2024-01-18 11:32:18 +01:00
Toom
815af53a75 Add warning when [modification]type is not set, re #3415 2024-01-17 19:48:44 -06:00
Celtic Minstrel
b9ff0c51fe Schema: Fix declaring guard_x/y/loc as required keys in stationed_guard MicroAI (they are optional) 2024-01-06 21:35:40 -05:00
Pentarctagon
d4b1e7e6c4
Add some more abilities' tests (hides, skirmisher, teleport) 2024-01-01 12:34:08 +01:00
Pentarctagon
f992190267
add a bunch of illuminates tests. (#8139) 2023-12-23 12:07:45 -06:00
newfrenchy83
99af904b29 Modify shema validation for more consistency
In the validation schema abilities-value in abilities.cfg contains not only the numerical attributes but also active_on and apply_to, while these two deniers are only used by [resistance], and the abilities used as weapons are validated by the schema validation of special weapons, and the abilities [leadership], [heals], [regenerate] and [illuminates] also use all numerical attributes.
2023-12-23 12:06:57 -06:00
Pentarctagon
87ed0d0339
Add a bunch of tests for heals. (#8074)
Covers only attributes, not filters.
2023-11-30 11:09:52 +01:00
pentarctagon
e9588d755d [filter_specials] -> [experimental_filter_specials]
Since it calls into the same code as [filter_ability] did.
2023-11-17 17:41:41 -06:00
newfrenchy83
b54a901ff3 rename [filter_ability(_active)] to experimental_ability
because it is experimental the tag of filter is changed except for [overwrite][filter_specials]
2023-11-16 01:05:56 +01:00