Commit graph

23 commits

Author SHA1 Message Date
wowgetoffyourcellphone
5268cb62a6 Persians -> Achaemenids
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Persians -> Achaemenids
Pers -> Achae

Addressing Checkrefs

Internal Achaemenid and Persian references

Reported by @Stan`

Update unit_tables.py
2026-05-02 02:50:39 +02:00
Vantha
40dfde9890 Add the Germans to the fireship tip
Fixes #8660
2026-01-22 12:55:03 +01:00
Dunedan
93ce94655d
Use @stylistic/brace-style for eslint
Up to now `eslint-plugin-brace-rules` was used to enforce a common brace
style for JavaScript code. This plugin was however updated the last time
over 9 years ago and will be incompatible with ESLint v10, as that
[removes `context.getSourceCode()`][1], the plugin relies on.

To keep the eslint config working with ESLint v10, this replaces
`eslint-plugin-brace-rules` with the [`@stylistic/brace-style`][2] rule
from `@stylistic/eslint-plugin`, a package we already use.

While `@stylistic/brace-style` doesn't offer an option to format braces
in exactly the same way as before, the "allman" style seems to be the
one closest to the existing code.

[1]: https://eslint.org/blog/2025/11/eslint-v10.0.0-alpha.0-released/#removed-deprecated-rule-context-members
[2]: https://eslint.style/rules/brace-style
2026-01-12 21:33:52 +01:00
Jonny McCullagh
5d8debe676 Add more tips 2025-09-13 15:18:30 +02:00
wowgetoffyourcellphone
3592814aa8 Gendered Civilians
Adds a randomly male and female Civilian unit which replaces the old "Female Citizen" for each civ.
New actors, new portraits, some new body textures, but the same stats as the old Female Citizen.
Updates maps, technologies, skirmish templates, et al. including the Tutorials.

Co-Authored By: Itms
Reviewed By: Vantha
2025-09-02 10:23:44 +02:00
rene
3c457457cd Add tip about lost resources when gathering
Illustration by: Vantha
Feedback by: Vantha, Langbart
Fixes #7652.
2025-06-28 10:39:52 +02:00
Vantha
bef29e4af5 Add some new tips 2025-06-27 15:34:44 +02:00
Vantha
fd847c2a23
Refactor GUI object resizing JS code passages
It is possible to modify sizes by setting the properties directly.
(Without having to create a copy of it)
This allows to shorten those passages quite a bit without any functional change.
2025-06-17 12:57:37 -05:00
Ralph Sennhauser
58219b974c
Fix trailing whitespace and add pre-commit hook
Some have their editor configured to remove trailing whitespace and
editing such a file would "fix" it, adding an unrelated change.

Fix whitespace violations excluding third party libs and generated files
like glad or patches.

Enable pre-commit hook trailing-whitespace to enforce it in the future.

Fixes: #8016
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-06-15 20:08:48 +02:00
trompetin17
b1123ff259
Revert "Fix element positions after new font rendering"
This reverts commit 52ee6ad470.

The original commit addressed incorrect UI alignment caused by improper
handling of font height and linespacing after FreeType integration
(introduced in 734386ce9f).

However, commit c2d529b975 corrected the root issue by standardizing
font metrics:
- Proper use of FreeType's height
- Removal of lineSpace
- Introduction of getCapHeight and Descender for accurate vertical
  alignment

As a result, the UI offset workaround is now obsolete and must be
reverted to reflect the correct baseline behavior.
2025-06-11 08:10:57 -05:00
Ralph Sennhauser
8b13be3b03
Fix eslint rule 'consistent-return'
Manual fixes needed for:
eslint --no-config-lookup --rule '"consistent-return": 1'

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-26 18:54:52 +02:00
Dunedan
52ee6ad470
Fix element positions after new font rendering
This fixes the positions of elements which changed as part of
734386ce9f.
2025-05-17 10:02:25 +02:00
Ralph Sennhauser
2b67499e05
Fix eslint rule 'no-trailing-spaces'
eslint --no-config-lookup --fix --rule '"no-trailing-spaces": 1'

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-03 17:31:47 +02:00
Ralph Sennhauser
12640ad63e
Fix eslint rule 'brace-on-same-line'
eslint --no-config-lookup --fix --plugin eslint-plugin-brace-rules \
    --rule '"brace-rules/brace-on-same-line": [
                "warn",
                {
                    "FunctionDeclaration": "never",
                    "FunctionExpression": "ignore",
                    "ArrowFunctionExpression": "always",
                    "IfStatement": "never",
                    "TryStatement": "ignore",
                    "CatchClause": "ignore",
                    "DoWhileStatement": "never",
                    "WhileStatement": "never",
                    "ForStatement": "never",
                    "ForInStatement": "never",
                    "ForOfStatement": "never",
                    "SwitchStatement": "never",
                },
                {
                    "allowSingleLine": true,
                }
            ]'

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-03 16:16:44 +02:00
Dunedan
280dcd3a1c
Tweak probabilities of tip categories
With the introduction of multiplayer loading screen tips, categories of
tips and probabilities of how often to show tips from a certain category
got introduced. The original probabilities ended up showing multiplayer
tips in 60% of the cases. As the number of multiplayer tips is still
fairly small, this resulted in very repetitive occurrence of the same
multiplayer tips over and over when loading multiplayer matches.

This commit changes that to give single-player tips a higher probability
for multiplayer matches. It also adds showing tips from the "Beginner"
category for multiplayer games, as there are regularly new players who
start their experience with 0 A.D. by playing multiplayer matches with
friends, instead of playing single-player matches and who'll therefore
benefit from those tips being shown for multiplayer matches as well.
2025-04-17 17:15:43 +02:00
ramtzok1
1b797ce0a0
Add specific tips for multiplayer sessions
A multi player loading screen will have possibility of showing single
and multi player tips while multi player tips are in favor.

Tips are now separated by categories. During loading those category
have an occurrence probability, where we are choosing a random category
based on chance and not by complete randomness. From there we just
picking a random tip from that category.
2025-04-12 10:38:57 +02:00
Dunedan
8482f25800
Fix a bunch of spelling mistakes
This fixes a bunch of spelling mistakes found in user facing strings.

Fixes #7716
2025-04-11 06:24:32 +02:00
phosit
094a7c2268 Return a promise from most page-inits
Adopt the new interface by all pages which close themself. (Not thous
using `Engine.SwitchGuiPage`.)
2025-03-09 10:39:20 +01:00
Dunedan
a53cf7b963
Remove some white space around the tips window 2025-01-11 17:45:54 +01:00
Dunedan
33e9cd6126
Increase height of StoneButtons and TabButtons
This increases the height StoneButtons and TabButtons, so that a
double-spaced caption does fit on them without significant overflow.
Exempt from that are the StoneButtons resembling lists in the main menu
and the in-game menu, as changing their height didn't feel right and we
don't need double-spaced captions for them anyway, as they're wide
enough.

The height of StoneButtons got increased from 28px to 32px, while the
height of TabButtons got increased from 30px to 34px.
2025-01-03 16:33:51 +01:00
real_tabasco_sauce
7c95b6700b Add non-random building AI
-lets building arrows target the closest unit by default.
-adds player control of building arrows.
-adds a tooltip to explain how to control arrows.
-Uses "F" for focus fire and concurrently use "F" for force-attack, since "C" is capture.
2024-12-21 22:48:01 +01:00
Vantha
d7dda097e1 Extend the tips page for multiple images per tip
Enable the Tips and Tricks page to show multiple images for each tip.
Add a small GUI panel below the image for switching between them.
Only show it when the current tip has more than one images.

Introduce tipfiles.json to assign images to the text files.
(And stop of relying on file naming)

Add a tip about wonders, and make some slight changes to other texts.
Improve existing tip images and add a bunch of new ones.
2024-12-20 19:46:07 +01:00
Vantha
38b71c1bac Add a Tips and Tricks page containing the loading screen tips
- Small popup page accessible from the main menu via Learn to Play.
- Lets the player read through the tips with 'Previous' and 'Next' buttons.
- Tips continue to be shown on the loading screen.
-> but there without the scrolling ability.

- Added two new hotkeys for quicker tip changing (item.prev and item.next)
-> set to the left and right arrows respectively by default.

- Responsible scripts are placed in gui/reference/tips/.
- The tip text files have been moved to gui/reference/tips/texts/.
- Tip image files have been moved to art/textures/ui/tips/.

- Added a series of new sprites (textures in art/textures/ui/tipdisplay/)
-> comprises a title decoration, a bullet point sprite, and a new button
style.
2024-09-30 06:22:47 +02:00