Changelog

Die letzten Änderungen an "Return to the Roots"
aa11dc5 s25client 11.11.2024 08:21 FloSoft Merge pull request #1710 from Flamefire/fix-campaign-load-dsk

Load campaign data only once
14c63f8 s25client 11.11.2024 08:20 FloSoft Merge pull request #1714 from Flamefire/fix-autosave

Fix autosave interval setting
1450205 s25client 10.11.2024 13:50 Flamefire Refactor iwSave

- Use enum as named IDs
- Move more into the base class, like adding the edit and button
- Show the savegame path for both save & load window
- Update and translate comments
8c3cd2e s25client 10.11.2024 13:12 Flamefire Fix autosave interval setting

There is an off-by-one error when selecting the auto save interval:
- Entry 0 is "disabled"
- Entry 1 corresponds to index 0 in the interval array
- Hence the maximum valid value is size()

The code checked for >= size() and applied the "every GF" setting that
is the last entry.

Fix is to simply use `> size()` as the check.

Fixes #1713
4713b77 s25client 28.10.2024 11:13 FloSoft Merge pull request #1708 from Farmer-Markus/master

Fix inverted cursor is not saved in global settings
460f124 s25client 22.10.2024 17:03 Flamefire Disable Start button until mission is selected.

The mission selection map starts with nothing selected so the "Start"
button does nothing on click.
Disable it until something gets selected for better UX.
6d090b9 s25client 21.10.2024 14:33 Flamefire Make missionsPerPage_ & lastPage_ constant
6c4ee6f s25client 21.10.2024 14:24 Flamefire Prefix ctrl IDs with their type

Allow to easily identify the expected type for `GetCtrl` calls.
80d500c s25client 21.10.2024 13:59 Flamefire Merge `dskCampaignMissionMapSelection` and `dskCampaignMissionSelection`

The classes share some code and essentially the same functionality.
Especially problematic is the reliance on the "mission map" in the
campagin description which may lead to an empty screen if
`dskCampaignMissionMapSelection` is instantiated in absence of that.

Additionally the difference in naming doesn't make it clear which is which.
5f90a04 s25client 21.10.2024 13:56 Flamefire Return optional from ctrlMapSelection::getSelection

Avoid use of sentinel values in presence of C++17 `std::optional`.
Makes it more obvious what is returned.

Also rename from `getCurrentSelection` for consistency with e.g.
`ctrlList` and similar and `setSelection`.
844d157 s25client 20.10.2024 18:01 Flamefire Load campaign data only once

Load data for all campaigns when opening the capaign selection window.
We don't rescan the folders while the window is open so there is no need
to load the lua files multiple times.
Especially the draw code for the map image loads the current campaign
on every draw call to determine what is to be drawn. This also spams the
log with messages such as missing languages.

If we pass the parsed campaign to the mission selection screen we can
also get rid of the invisible column for the filepath.
Finally we can load all ressources (images) in one go.

Fixes #1705
c41342f s25client 20.10.2024 15:07 Flamefire Allow omitting the campaign image completely.

Now the image is either a non-empty string or `nullopt`
c1a88ed s25client 20.10.2024 14:50 Flamefire Fix dependencies of test for libGamedata

The test doesn't contain on s25Main so we can reduce the amount of
compilation required.
Also move the campaign test out of the s25Main tests.
28de8bb s25client 20.10.2024 11:33 Farmer_Markus rttr formatting fix
93a9de0 s25client 19.10.2024 05:35 FarmerMarkus fixed invertedCursor is not saved
a9eb1ca s25client 17.10.2024 21:37 Flamefire Update submodule for nowide
d2a6e73 libutil 17.10.2024 21:37 Flamefire Update Nowide to 11.2
48dfd6f s25client 13.10.2024 21:01 Flamefire Add jump-to-position to Map-Debug window

For debugging we often want to view a specific position.
Make this easy by specifying the position as X-Y and Go-To with RETURN.
TAB can be used to change between the edits which also clears the newly
activated one such that new coordinates can be entered.
a3adcfa s25client 13.10.2024 21:00 Flamefire Disable FoW when Map-Debug window is shown in replay mode

We usually want to browse the map anyway so just combine showing the
window and revealing the map.
7699e64 s25client 13.10.2024 16:42 Flamefire Add `DescriptionVector` for type-safe access via `DescIdx`

Also use the bool operator of `DescIdx` for invalid edge-indices.
b394bd0 s25client 12.10.2024 16:17 Flamefire Flush stderr after printing crash message
37350da s25client 12.10.2024 14:40 Flamefire Fix stuck soldiers when free fight gets aborted while waiting

When one soldier involved in an upcoming free fight is waiting for the
other and that aborts the free fight for any reason, e.g. when the spot
becomes unreachable, the waiting soldier changes state but doesn't start
moving and as he isn't moving already there is no event queued that
would make it handle the new (moving) state.
This leads to it being stuck there forever and also crashes the draw
code which doesn't expect a supposedly walking soldier not having a walk
event.

Split the `AbortFreeFight` method in 2:
- virtual method to determine the next state
- base method to reset the free fight state for both soldiers and let
them continue

For the aborting soldier effectively nothing is changed.
The other soldier gets a simulated walk event if he was waiting to
handle the new state.

As the 2 soldiers might get involved in another fight with each other
both their "fight states" are cleaned up first to establish a valid
state before the other soldier gets triggered.
d5c6665 s25client 09.10.2024 14:32 Sunrise Fix wrong Y offsets for the donkey/boat carried wine/grape wares
15c795d s25client 08.10.2024 21:23 Flamefire Avoid inverted condition in nofActiveSoldier
98e46f6 s25client 08.10.2024 21:14 Flamefire Rename `FreeFightEnded` to `AbortFreeFight`

The method is called when a free fight cannot be started not after it
has ended, so reflect this in the name.
c32daac s25client 04.10.2024 22:12 Flamefire Add functions to search for terrain descriptors

In some places we need e.g. "any water" terrain or in general a single
or all descriptors matching a condition.
Add `find` and `findAll` methods to the containers and add and use the
explicit bool operator.
Both in combination avoid using the raw `value` member of the `DescIdx`
in most cases.
9e2dc06 s25client 04.10.2024 20:55 Flamefire Avoid accidental copies of GameObjects

As we store GameObject references by pointer we must not copy them.
The only exception is for soldiers where we convert a passive soldier
to an attacker or defender by copying the base attributes.

Mark any copy constructor we don't need as deleted and the others as
explicit and protected.
3fbff6e s25client 04.10.2024 15:10 Flamefire Enhance `Range` class to allow for a custom start value

In some cases we need to start at e.g. 1 not 0.
Also make use of C++17 CTAD and remove the factory method.
01e9536 s25client 03.10.2024 22:13 Flamefire Replace some pointer arguments by references

Communicate that those must not be NULL
02917bc s25client 01.10.2024 17:19 Flamefire Merge pull request #1703 from Flamefire/fix/windows-ci

Move Windows CI to GitHub Actions
e55e880 s25client 29.09.2024 22:41 Flamefire Fix compatibility for Boost 1.81+

`boost::filesystem::path` allows conversion from anything that is
convertible to a string-ish type, like C-Strings or `std::string`.
`kaguya::LuaRef` is convertible to everything (but may fail at runtime)
which makes the conversion to that ambiguous.
This becomes a problem for `ImageResource` which has an implicit
conversion from `boost::filesystem::path` so implicitely converting
`kaguya::LuaRef` to `ImageResource` will make the compiler try the
conversion to `boost::filesystem::path` causing an error.

Use the `get<T>` member function to avoid the atempted implicit conversion.
7c757bd s25client 29.09.2024 16:07 Flamefire Move Windows CI to GitHub Actions

The time limit of 1h is not enough to build the release version.
da67e6a s25client 29.09.2024 15:05 FloSoft Merge pull request #1702 from Flamefire/fix-setting-crash

Fix crash when opening map settings
6cf6368 s25client 28.09.2024 19:11 Flamefire Fix crash when opening map settings

In one instance a NULL-check for the `lua` pointer was missing as the
call should have been through a function.

Fixes #1701
5d1edef s25client 03.09.2024 23:47 FloSoft Merge pull request #1663 from Flamefire/fixplayerlua

Fix setting disabling by LUA for non-Host players
e191e83 s25client 03.09.2024 21:58 Flamefire Merge branch 'master' into fixplayerlua
2099971 s25client 02.09.2024 16:07 Flamefire Don't run updater with --verbose on Linux

The option is mostly useful for debugging so can be specified manually.
The Windows (.bat) updater doesn't set it either, so this is consistent
d1fd012 s25client 02.09.2024 16:06 Flamefire Update s25update module

Fixes #1697
ed128d5 s25update 02.09.2024 16:04 Flamefire Log filelist URL to download in --verbose mode.

Also rename from "master file" to "update filelist"
10b486c s25update 02.09.2024 15:56 Flamefire Fix download

An inverted condition resulted in confusion of downloading to file or to memory.
Avoid that by moving the related code (get argument & set options)
together.
To make it more feasible use a RAII wrapper class for `CURL*` and wrap
also the CURL calls.
87b497f s25client 02.09.2024 12:30 Flamefire Merge branch 'master' into fixplayerlua
ed50fcd s25client 02.09.2024 12:29 Flamefire Merge pull request #1684 from kubaau/set_computer_barrier

Add SetComputerBarrier
01aa4a4 s25client 10.08.2024 14:18 Flamefire Further translations and refactoring of nofAttacker

Translate all remaining comments.
Refactor code of type
```
if(arrived) {
//handle arrived
return
}
// handle not arrived
```

to

```
if(arrived) {
// handle arrived
} else {
// handle not arrived
}
```

Especially for small or similar code it emphasizes the either-or logic.
800dfe2 s25client 10.08.2024 02:06 Flamefire Refactor code to determine orientation of waiting soldier

Make the decisions clearer by showing the symmetries and the few
different cases.
d8cdbf6 s25client 10.08.2024 02:00 Flamefire Add enum for decision-state of sending a defender

Easier to understand and validate.
Also refactor one use site a bit translating the comments.
8027aa7 s25client 10.08.2024 01:55 Flamefire Remove superflous call

`CancelSeaAttack` already calls `Abrogate`
104e2aa s25client 09.08.2024 22:36 Flamefire Add tests for stuck attacks

Create 2 tests for free fights aborted by either the attacker or defender.
This reproduces issue #1668
e09a0d5 s25client 09.08.2024 22:35 Flamefire Rename nofActiveSoldier::FindEnemiesNearby -> TryFightingNearbyEnemy

Better capture meaning as it implies an action not just a search.
5805b3c s25client 09.08.2024 18:40 Flamefire Merge branch 'master' into set_computer_barrier
7ba6441 s25client 05.08.2024 20:33 Jakub Audykowicz Replace ptsInsideComputerBarriers.count with helpers::contains