1
0
forked from mirrors/0ad

25616 Commits

Author SHA1 Message Date
obelix b7247ae7fb Rename Neareastern Badlands to Cappadocian Badlands
A discussion on the forums had the result, that the name Neareastern
Badlands should be changed as it contains an eurocentric view on Anatolia.

Fixes #8590
2025-12-27 15:49:44 +01:00
Vantha 832501fc9b Remove columnar walking behavior of formations
This behavior is a remnant of the very first implementaion of
formations, when there weren't different types of yet, only
box for fighting and column for walking.
Now that we have different types of selectable formations, however, this
behavior is no longer desired, it also caused a lot of ugly reordering
when giving walk commands. See the issue for more details.

Fixes #8580
2025-12-26 10:54:00 +01:00
Vantha 4d08446285 Improve Engine.GetTextSize deprecation message 2025-12-23 14:37:23 +01:00
Vantha 670f1e5d42 Fix warnings on the charts tab of summary screen
Engine.GetTextWidth has been deprecated since e845da025a

Idea:
If you look at a dropdown as just a text field (its header) that can
change caption like any other, then getPreferredHeaderTextSize is the
equivalent to getPreferredTextSize (present on buttons and text fields).

Fixes #8493
2025-12-23 10:28:22 +01:00
Vantha fbb6052c30 Fix oversight in 83f4d8789b 2025-12-23 10:28:22 +01:00
phosit 067a7abc72 Don't use PS::Loader::Task outside of Loader
PS::Loader::Task is made for the Loader and it's combersome to use it
outside. Also there is an overhead.
2025-12-21 15:51:58 +01:00
phosit 2fc61dd172 Remove ProgressiveLoadEntities
It's a coroutine. The resumer can decide whether it's loaded
progressively or not.
2025-12-21 15:51:58 +01:00
phosit 5586802b86 Use a coroutine for Loader tasks
Some tasks are invoked multiple times. Normally those tasks are broken
up inside a loop and had to be continued there. With coroutines that is
easier as it's possible to suspend inside a loop.

Coroutines which are lambdas should not capture anythig as the lifetime
of the captured values might end before the coroutine completes. For
that purpose `std::bind_front` is used.
2025-12-21 15:51:46 +01:00
phosit b67faf35c3 Switch main branch to Release 29 2025-12-18 18:16:11 +01:00
Atrik d14ee373bf Remove PostMessage for transitions IDLE to IDLE
Co-authored-by: @Vantha

Add 'isIdleConfirmed' flag to distinguish between
entering IDLE state and being confirmed idle.
Only send 'MT_UnitIdleChanged' messages after the
100ms timer elapses while still idle,
preventing spurious notifications for units
that instantaneously enter and leave IDLE.
This prevent the GUI to display a flickering idle count
in most cases, for example.

Refs : #8591
2025-12-18 10:22:27 +01:00
Atrik a670656212 Add Atrik to Programming Credits 2025-12-18 10:22:27 +01:00
Atrik 0f58a8511c Add a test for IsRearrangementAllowed 2025-12-18 10:22:27 +01:00
Atrik 45fd632cef Add a test for AttemptObstructionMitigation 2025-12-18 10:22:27 +01:00
Atrik b98e7f3b5b Fix formation combat stop command bug
Remove the ResetIdle method that was causing issues with the
'Stop units' command in formation combat

The method was originally added to prevent formation members
from appearing idle during patrol waypoints, but formation
controllers or its members no longer enter idle states
even without it

The ResetIdle method was sending MT_UnitIdleChanged messages
causing formation members to bug when using stop commands

Fixes: #8546
2025-12-18 10:22:27 +01:00
Atrik be6670df89 Add a test for GetClosestMemberFunctions 2025-12-18 10:22:27 +01:00
Atrik 06c40946eb Simplify calls for moving units into formation
Co-authored-by: @Vantha

Centralize all calls to move units into formation in UnitAI
Allowing additional checks to be done
before calling members to reform formation

Fixes : #8545

Revised Formation methods and when they do call
on reforming formation

Fixes : #7328

Don't order formation members to go to a point
if the controller is stuck
Instead make the controller jump to the member
who is closest to the destination

Fixes : #8543

Correct 'filter(member)' instead of 'filter(ent)'
in GetClosestMemberToPosition (ex GetClosestMember)

Fixes :	#5120
2025-12-18 10:22:27 +01:00
phosit cfb742c914 Return the value from GuiPoll 2025-12-17 13:39:17 +01:00
phosit f23dde2f73 Use StructuredClone in m_GuiMessageQueue
The elements have to be cloned either way. Now they don't have to be
traced when they are in the queue.
2025-12-17 13:39:16 +01:00
phosit 2a2d5de350 Replace LDR_* with PS::Loader::* in comments
This has been forgoten in 1917d034fd.
2025-12-16 19:35:25 +01:00
phosit ca0d6d3768 Remove references to InitEverything in Loader.h
This function seems to be removed a long time ago.
2025-12-16 19:29:05 +01:00
phosit 14a5ccee52 Propagate error from autostart
The JavaScript error wasn't propagated leading to an infinite loop.

Fixes: #7967
2025-12-14 19:07:01 +01:00
phosit f03be7b568 Initialize more members of CNetClient
The username and the jid have to be set before the client is connected.
With this commit it's not possible to initialize them to late.
2025-12-14 17:23:05 +01:00
phosit b686dfa047 Use range based for loop in TestSerializerPerf
CppCheck warned that `i` might be out of bound.
2025-12-13 18:58:17 +01:00
phosit 9911615e62 Always set scenario members in rl-interface reset 2025-12-13 18:58:17 +01:00
phosit 1917d034fd Introduce a namespace in Loader
All functions had a `LDR_` prefix. The prefix is removed.
Functions and globals which are only used in Loader.cpp are now
contained in an anonymous namespace.
2025-12-13 18:58:17 +01:00
phosit f257ce8f9c Remove the unused time_left parameter
The `time_left` was passed to the registered functions but it was never
used.
2025-12-13 18:58:17 +01:00
phosit de841d30e4 Return description and progress from loader
There was a comment implying that `wchar_t*` is more iteroperable then
`std::wstring`. When there is no allocator `std::wstring` won't work,
sure. But when there is no allocator other things in Pyrogenisis will
also not work.

And for the progress there was just no reason to use a return parameter.
2025-12-13 18:58:17 +01:00
phosit 873b91774b Use std::unique_ptr for xml_reader in CMapReader
With this the destructor can be defaulted. Also the `SAVE_DELETE` can be
changed to a `.reset()` with that it's header doesn't has to be
included.
2025-12-13 18:58:17 +01:00
phosit efe0ed598f Apply rule of five to CMapReader 2025-12-13 18:58:17 +01:00
Itms ac36758b21 Do not use Jenkins custom SVN client on Windows
It is extremely prone to timeouts and failures in this environment.
2025-12-13 11:00:09 +01:00
phosit c02764e17a Increase home island size on River Archipelago
With some settings mines weren't able to be placed.
Refs: #8579
2025-12-09 18:49:34 +01:00
real_tabasco_sauce e96d981319 buff new carthage unique mercenary slinger with increased crush damage and greater accuracy. 2025-12-06 19:24:09 +01:00
cube002 cb3fecfce9 Update binaries/data/mods/public/simulation/data/technologies/civbonuses/cart_stone_01.json 2025-12-05 18:10:46 +01:00
cube002 91baeeb94e Update binaries/data/mods/public/simulation/data/technologies/civbonuses/cart_stone_02.json 2025-12-05 18:10:46 +01:00
cube002 9c836d39e6 Update binaries/data/mods/public/simulation/data/technologies/civbonuses/cart_stone_03.json 2025-12-05 18:10:46 +01:00
cube002 f30271e955 Update binaries/data/mods/public/simulation/data/technologies/civbonuses/cart_stone_03.json 2025-12-05 18:10:46 +01:00
cube002 a03b01c935 Update binaries/data/mods/public/simulation/data/technologies/civbonuses/cart_stone_02.json 2025-12-05 18:10:46 +01:00
cube002 8d38ecda26 Update binaries/data/mods/public/simulation/data/technologies/civbonuses/cart_stone_01.json 2025-12-05 18:10:46 +01:00
phosit 759406dd77 Update appdata for the next RC 2025-12-02 18:49:14 +01:00
Ralph Sennhauser 31a262ff7e Fix autostart-host
Commit b90280855f added support for
multiplayer saved games changing the signature of StartNetworkHost
without updating all callers.

Fixes: #7684
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-11-30 15:30:46 +01:00
phosit a1ba9e34c4 Remove unused m_DeltaTime
Seems to be unused since c684c211a2
2025-11-30 13:49:31 +01:00
Dunedan 0086f005d4 Add Vietnamese as supported language
As 0 A.D. supports full unicode now and Vietnamese language coverage is
at a good level, let's include Vietnamese as supported language.
2025-11-29 15:59:07 +01:00
Dunedan ed1bd1d75b Re-add Catalan as supported language
While Catalan got removed for Alpha 27 because of low coverage, its
coverage is now good enough again to get re-added as supported language.
2025-11-29 09:20:24 +01:00
Atrik 426693ebef Default hotkeys changes
Reassign 'Toggle mouse grab' to F3 to avoid conflicts with gameplay hotkeys

Unassign 'Show status bars' often toggled by mistake by new players and confused for a selection bug

Assign 'Bird eye view' to Shift+Tab
2025-11-26 16:42:18 +01:00
Vantha ccd1046d67 Parallelize the execution of range queries
Use futures to spawn several threads that concurrently work through the
active range queries each turn instead of doing everything serially on
the main thread -- similar to how the pathfinder computes pathfinding
requests asynchronously. This significantly increases performance.
Note: It still can't run in parallel to the rest of the simulation update since
the range computations depend on the state of the simulation (like the
position of units).
2025-11-26 16:10:29 +01:00
real_tabasco_sauce a32a28a5e3 Add capture animations for citizens
Fixes #8557
2025-11-25 17:41:55 +01:00
Vantha ab49af1b1c Correct the name of the Germans' sandbox map 2025-11-25 10:52:37 +01:00
Vantha 36e93989d4 Correct some settings of the Germans' sandbox map 2025-11-25 10:29:30 +01:00
Ralph Sennhauser 7452bf882f Add test for loading players templates
Checks that those templates can be loaded, i.e. are adhering to the
schema.

Refs: #8540
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-11-22 08:41:02 +01:00
phosit 9a526bcae1 Throw error when simulation script can't be loaded
When a script in "simulation/helpers/" contained an error. Files in
"simulation/components" aren't loaded. The return value of
`LoadDefaultScripts` indicated an error but was ignored. The simulation
still tried to start.

Now instead of returning a ignoreable error code the error is thrown. In
the common path the error is implicitly rethrown to the JS-function
which tried to start the game.

fixes: #8133
2025-11-20 19:38:36 +01:00