1
0
forked from mirrors/0ad
Commit Graph

16594 Commits

Author SHA1 Message Date
wowgetoffyourcellphone 8da6c758fc Add small metal/ore mine objects to the game.
New small metal mine models and actors.
New sparkle particles.
Remove refs to old metal ore mines from existing maps.

Fix refs to temperate_small_01_01, which should have been temperate_small_01
2025-04-15 18:14:37 +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
Feldfeld 6224223807 Add myself (Feldfeld) to the programming credits 2025-04-10 18:57:40 +02:00
Feldfeld b5256ce014 Include Player Placement setting in Game Description
The option was missing, so player placement was not shown in the game
description part of the game setup, and it was not shown in the objectives
page in-game.
2025-04-10 18:57:40 +02:00
Viktor Semenov 683a9cb06e Not send redundant argument to StartNetworkGame
Engine part does not expect third argument to StartNetworkGame function.
All network games save replays by default.
2025-04-09 16:11:11 +00:00
Dunedan a917d393e1 Only autocomplete unambiguous words
Up to now the chat autocompletion did complete words, even if there were
multiple candidates which matched available. So if for example the
autocomplete list contained "bar" and "baz" and a user typed "ba",
autocompletion would complete it to "bar", ignoring that "baz" was
available as possibly desired result as well. In practice this lead to
people regularly getting completions they didn't intend to get. This
commit fixes that by only completing text, if there is only a single
candidate available.
2025-04-05 08:14:09 +02:00
Vantha 4d323177b8 Correct error message when the host disconnects
After 78900842b1, the following message was shown to clients when the
host disconnected during game setup:
"Lost connection to the server.
[Invalid value undefined]"

This patch fixes that.
2025-04-02 08:36:38 +02:00
phosit 2d206708cd Start Atlas by closing the root page
Theere is now an  `Engine.startAtlas` property that will start Atlas
when it's returned from the root page. The `Engine.RestartInAtlas`
function is removed.
2025-03-26 13:07:57 +01:00
Dunedan f68a8c2532 Verify the lobby certificate by default
When TLS for XMPP connections to the multiplayer lobby got implemented,
there was a bug in gloox [1] preventing the certificate verification to
succeed. This bug got fixed in gloox 1.0.22 five years ago, so it's safe
to enable certificate verification by default now.

[1]: https://web.archive.org/web/20200522184941/https://bugs.camaya.net/ticket/?id=280
2025-03-18 08:58:45 +01:00
phosit 771e33f462 Fix g_MainMenuItems "onPress"
Since 40762c257d there is a callback passed to the "onPress" function of
the `g_MainMenuItems`. If the "onPress" function is a bound
`Engine.OpenChildPage` with only the filename bound to it, the callback
becomes the second argument.
The second argument is cloned to pass it to the child page. Cloning the
callback crashed the engine.
2025-03-17 18:47:43 +01:00
Sanctorum Thomas 75f414c665 Clear filter when closing Map Browser 2025-03-15 09:27:29 +01:00
Vantha 78900842b1 Improve the "UDP port 20595" connection error dialog
Add a unique disconnect reason for timeouts of connection attempts.
Rewrite the displayed error message and provide a link directly to the FAQ entry.
(The old message was very misleading and only brought players on the
wrong track during troubleshooting)
2025-03-13 15:34:20 +01:00
phosit 40762c257d Quit Engine by closing the root page
When the root page gets closed the engine quits instead or crashing.
The root pages are changed to use that mechanism to quit the engine.
This removes the need of `Engine.Exit` for the GUI.
2025-03-12 12:07:37 +01:00
phosit df5fee6103 Rename PushGuiPage to OpenChildPage
There is no `PopGuiPage` anymore. For symmetry there should also be no
`PushGuiPage`.
2025-03-09 10:39:20 +01: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
phosit 4f62e9f6f0 Change the GuiManager tests to use promises
Adopt the new interface by the tests: as an example and to show that
it's sound.
2025-03-09 10:39:20 +01:00
phosit d3bc5bc802 Enable page-inits to return a Promise
Allows to return the page-completion-value instead of passing it to an
`Engine` function.

Closes: #7000
2025-03-09 10:39:20 +01:00
Vantha 5741f77c6e Add a 'team population' gamesetting
Remove the world population setting from the game setup.
Add a dropdown for choosing the "Population Cap Type".
(-> containing Player Population, World Population, Team Population)

Use a single "Population Cap" dropdown adapting to the pop cap types.
Move all population data into a single .json file.

New system component "PopulationCapManager" for distributing pop caps.

Resolves: #6918
2025-03-06 13:25:43 +01:00
Vantha 13dd7c0bb7 Remove empty and invalid sprite assignments
(They were overwritten by the code anyway)
2025-02-26 16:20:27 +01:00
Vantha 734f8e1192 Add an "OnAttackDetected" trigger 2025-02-26 11:56:52 +01:00
Stan 288f125178 Add three options to the autostart CLI.
- a speed option
- a placement option
- a map visibility option
2025-02-24 22:45:23 +01:00
Dunedan 75d343293f Remove "useLongStrings" logic
As it turns out we don't need that special logic for handling the "long"
locale properly and everything continues to work as before without it.

The only difference is that the number format not being the one from
en_us anymore when using the "long" locale, but the one of the
system-wide configured language, which should be an even better user
experience than before.
2025-02-22 18:18:42 +01:00
Vantha aec5bf42da Layout and code improvements on the welcome screen
Move the lines from the .txt to the .xml .
Add separate objects for each paragraph and icon.
Position the icons depending on the paragraph length in the current
language.

This eliminates potential for breakage during translation.

Fixes #7484
2025-02-20 11:15:57 +01:00
Sanctorum Thomas 37065ebc71 Harmonized design between civinfo and structree 2025-02-16 09:10:16 +01:00
scuti a9819e9865 Created hotkey to grab and release mouse.
Addresses #6790
2025-02-14 20:18:49 +01:00
scuti e87d3e4137 Check if online before calling engine command. 2025-02-09 18:50:15 +01:00
scuti 490c3eb22b Fixed messages of type 'system' not-printing. 2025-02-09 18:50:15 +01:00
Andreas Traber 33f332047d Add atraber to list of contributors. 2025-02-09 16:00:22 +01:00
Andreas Traber 05f31300a1 Fix multiple bugs where a wrong variable is used.
Those bugs stood out to me as I was experimenting with migrating petra
to ES6 classes. Since this give the code stronger typing, those kind of
errors stand out immediately.
For example, autoResearch is a function, thus referring to it by name
will always return the same result. In other cases the referenced
variables simply don't exist.
2025-02-09 16:00:22 +01:00
Feldfeld 5dcef8c17a Uniformize Han farming technologies
Reported by stevenlau in https://wildfiregames.com/forum/topic/127586-a27-disadvantageous-farming-tech-upgrade-time-cost-for-han/

Missed in b4155900d3 / D4720
2025-02-01 23:23:18 +01:00
drh 03ceb27e90 Add camera pan inversion option
Fixes: #6539
2025-01-30 18:42:59 +01:00
Carl-O 7d4a6c5d07 Capitalization of first letter of word 2025-01-29 22:58:51 +01:00
Vantha 1a7947f9c9 Remove empty duplicate of TipDisplay.js
It was accidentally only emptied instead of removed in 38b71c1bac.
2025-01-28 08:40:00 +01:00
phosit ec6ed7f224 Remove deprecated functions in map generator
Map generation scripts should use the new interface introduced in
6ce2fc53ea.
2025-01-27 17:50:39 +01:00
phosit d3fc3c221e Remove last usage of Engine.SetProgress
On Danubius removing the usages was forgotten in e01ea16ae5.
In Coast Range and Migration they were newly introduced.

There are also some whitespace changes in Coast Range.
2025-01-27 17:50:39 +01:00
Itms 6ac5c376ea Fix crash when trying to join games in lobby dialog
This fixes an oversight from d655455304. During a code deduplication, a
check was removed. When looking at the lobby as a dialog (while in
gamesetup), it should be impossible to try to join a game.
2025-01-27 10:15:45 +01:00
Itms ffa11b37a8 Fix oversight from 726b07e209
This does not cause any actual bug, as the handler is called again when
a game is selected.
2025-01-27 10:14:17 +01:00
Stan 6df98d8ed6 Fix broken ceasefire autostart option
Fixes: #7495
2025-01-25 12:41:30 +01:00
Paul Robinson 5b98a647dc Adding Engine Version and Mod name/version checks to multiplayer handshake.
Incrementing protocol version as handshake messages have changed.
2025-01-25 07:39:32 +01:00
real_tabasco_sauce 60d388804a Add gathering animations to the marian legionary
Fixes #7438
2025-01-22 15:01:23 +01:00
Itms 95fb0f9ed0 Remove unused Ptolemaic Juggernaut prop template
This is an oversight from 415304db8a and #6660.

This forgotten template cropped up in #7525. It does not contain the
needed components to interact correctly with the player.
2025-01-20 20:33:27 +01:00
Dunedan 4d19935f48 Ensure buttons on summary screen are always on top
On low vertical resolutions when playing games with 8 players in 4
different teams, the summary will overflow the available vertical space.
This commit ensures that in such a case the buttons below the summary
are still clickable by ensuring they stay always on top of the summary.
2025-01-20 15:55:41 +01:00
Dunedan 8b40ce59ad Fix vertical alignment of team summary
This fixes the vertical alignment of the team summarized values on the
summary screen.

Fixes #7527
2025-01-20 15:55:41 +01:00
Daniel Roschka 274500eb37 Always use STUN for hosting games using the lobby
This makes using STUN mandatory for games hosted using the multiplayer
lobby. The motivation for that is a reduction in complexity, because
right now if STUN is disabled we use a home-grown STUN-like logic, which
got implemented before Pyrogenesis got STUN support.

That home-grown logic relies on a custom ejabberd module (mod_ipstamp),
which inserts the external IP-address of a host in the response messages
when a host registers a game. Originally mod_ipstamp was also used to
inform all potential players of a hosts IP-address, however that has
already been removed to let hosts to only share their IP-address with
players actually joining their game.

Removing the home-grown logic and instead always relying on STUN removes
complexity in Pyrogenesis and the lobby server and also eases hosting
games for players, as they don't have to figure out anymore whether they
need to enable STUN or not.

These changes shouldn't negatively impact the ability of Pyrogenesis to
handle different types of NAT or broken networks. There is one
difference though: While the custom logic using mod_ipstamp utilized TCP
as transport protocol, the STUN implementation in Pyrogenesis currently
uses UDP. That doesn't allow hosts with UDP-connectivity issues to
resolve their external IP-address anymore, however without
UDP-connectivity they aren't able to successfully host games anyway, as
the actual game updates are transferred using UDP as well.
2025-01-20 06:52:14 +01:00
Lancelot de Ferrière fed028a386 Prevent GameSettings from setting more players than the map supports 2025-01-18 12:18:33 +01:00
phosit eb07f20f2f Translate "Changing password…"
Introduced in d0ebcbe038.
Reported-by: @elexis
2025-01-16 21:09:57 +01:00
phosit 068346b502 Always early return if no receiver is found
This lead to an error because `addressee` is `undefined`.

Defect introduced in dcb8ef9b52.
Fixes #7466
Reported-by: @Langbart
2025-01-16 18:27:55 +01:00
freagarach 1d6f7f3837 Always mark 'PromotedEntity' on transform
If the new entity did not have Promotion, we would fail to do so.
Not doing this caused ghost units to appear when promoting inside a GarrisonHolder.

Fixes #7472, reported by Langbart.
2025-01-15 19:22:54 +01:00
Dunedan b2f50519fa Remove one last mention of Trac 2025-01-13 16:28:46 +01:00