84335 Commits

Author SHA1 Message Date
Charles Dang
335c4943d2 Build Info: improve refresh rate report
See discussion in #9594
2024-11-22 12:43:47 -05:00
Iris Morelle
ce6c56adea Switch default Pango/Cairo render backend to Fontconfig on macOS
Fixes #8488.

This is a simple setenv trick. Ideally we would instead figure out how
to fix Oldania ADF Std to work on newer macOS, but since we know the
Fontconfig backend works for us on Windows and Linux, we may as well
stick to it and hope there will never be a situation where CoreText
would prove superior somehow.
2024-11-22 23:00:03 +05:30
Charles Dang
bb4eb0bf1b Video: fix incorrect refresh rate value being returned (fixes #9594)
Regression from b859060627968b34ed0ea3bb1ee85bbae27120e6
2024-11-20 15:43:54 -05:00
Charles Dang
6fb5488464 Editor: better default addon and schedule names 2024-11-20 15:22:40 -05:00
Charles Dang
78f7703639 Macro be gone (fixup c2b2664eb21585a67afbb7bff931fb7b169eea47) 2024-11-20 15:21:17 -05:00
Charles Dang
6fa92f9553 wesnothd: indent fixes (no functional changes) 2024-11-20 15:19:39 -05:00
Thewodoros
55eef0dbef
Fix issues with hero deaths in EI S03 (#9595)
Avoid adding duplicate "last breath" events (HERODEATH macros), and don't call [endlevel] in "die" event ( as it's already called in "last_breath").
2024-11-20 11:08:36 -06:00
Iris Morelle
ad8f94195d
Make undeclared local function static
Fixes a warning on Xcode 16.1.
2024-11-20 11:09:20 -03:00
Subhraman Sarkar
7ca616f2ae CodeQL CI: add autorevision run step 2024-11-20 14:20:32 +05:30
Charles Dang
c7f818d449 wesnothd: use steady_clock where appropriate 2024-11-20 01:03:42 -05:00
Charles Dang
79120f1e31 wesnothd: use std::chrono instead of the C time API 2024-11-20 01:03:42 -05:00
white-haired-uncle
c2b2664eb2
GUI2 LuaAPI: expand widget attr support (#9497) 2024-11-19 22:41:47 -05:00
Tóth Kornél
484116ea09
Map Editor terrain button click fix (#9560)
Fixed palette button not being clickable after scrolling in palette widget without moving the cursor. Resolves #1335. The cause of the bug was that scrolling doesnt change the highlighted state of the palette buttons and not highlighted buttons didnt process being clicked. Solved the bug by making not highlighted buttons process being clicked.
2024-11-19 15:20:30 +01:00
Severin Glöckner
5d3a84084e Changelog Update
* add last changes
* merge changelog_entries

[ci skip]
2024-11-17 22:40:14 +01:00
Severin Glöckner
e2f656f833 German translation fix
[ci skip]
2024-11-17 21:55:21 +01:00
gfgtdf
b8c912d1e7 remove outdated comment 2024-11-17 21:30:22 +01:00
gfgtdf
d668aea7d0 fix doc comments 2024-11-17 21:30:22 +01:00
gfgtdf
a5f40c353d use block_undo() over undo_stack->clear()
this also sends the action to the other clients immidiately
2024-11-17 21:30:22 +01:00
gfgtdf
653bbb8263 small cleanup 2024-11-17 21:30:22 +01:00
gfgtdf
33bc132215 fix OOS caused by sending data to soon
previously block_undo would clear the undo stack and send data even when its parameter is false

this commit also fixes a possible crash when dsu changed the gamestate during formula evauluation

also removed a is_simultanious_ since it basicialyl did the same thing as undo_blocked_
2024-11-17 21:30:22 +01:00
gfgtdf
cc2914c1c6 remove show parameter from move_unit 2024-11-17 21:30:22 +01:00
gfgtdf
24ad4cb9d2 remove show parameter from recruit_unit 2024-11-17 21:30:22 +01:00
gfgtdf
3d589f8d0d use synced_context::run for move actions
With this, finally all actions run though synced context::run,
so that we not only have a central place that happens before/after
synced actions, we also guarantee that there is no difference between
the original and the replay codepath for all actions.

This should also make upcoming changed to the undo code easier.
2024-11-17 21:30:22 +01:00
gfgtdf
d0050dac8e remove undo_stack parameter from move_unit
it was only there for the ai code to skip undo which it no longer does
2024-11-17 21:30:22 +01:00
gfgtdf
a6cd4441c9 refactor synced_context::run
- Removed the now unused 'undo' parameter
- Removed the rareley used 'show' parameter, the actions now
  check whether they should skip in replays

Replaced the error handler with the more generic 'spectator' parameter,
the idea is to use it also for the move_spectator so that the move action
can also go through synced_context::run()
2024-11-17 21:30:22 +01:00
gfgtdf
7782c50f83 simplify synced_context::run() calls by ai and whiteboard
- use_undo is not used anymore
- ignore_error_function has no effect since to_check()
already checks whether the unit exists
- show in whiteboard code was the default value.
- show is now determined inside the actions handler, this
has the advantage that the skip_ai_moves preference now
also works for networked ai sides.
-the attack code now used run_in_synced_context_if_not_already
just like the other commands
2024-11-17 21:30:22 +01:00
gfgtdf
715a65438a Remove outdated comment
id is nowdays always a local variable of SYNCED_COMMAND_HANDLER_FUNCTION(recall
and never becomes invalid here
2024-11-17 21:30:22 +01:00
gfgtdf
7810b0308e remove use_undo parameter in synced_context
The comments said undo is disabled during ai turns to speed things up,
but since all the undo code does is adding a simple object once to a vector, its impact
on performance is really nonexistent.
2024-11-17 21:30:22 +01:00
white-haired-uncle
c2361e3a82
schema: Fix color type definition and uses 2024-11-17 18:07:22 +01:00
Gunter Labes
8c8bff7ffb
Fix expected/actual mixup in warning messages 2024-11-17 17:39:09 +01:00
Gunter Labes
1e12839804
Move unit changes to changelog and try to unify the formatting 2024-11-17 17:38:42 +01:00
pentarctagon
3c45ec93e0 use expected indent 2024-11-17 10:07:24 -06:00
Dalas121
f1e74af2d3
Update change_huntsman_ranger.md
Reflect the cost change made in 858b2d2
2024-11-17 08:28:48 -06:00
Dalas121
858b2d2bfc
Huntsman: reduce cost 50 > 47
At Hejnewar's request. I merged #9582 too early, before getting his feedback on cost.
2024-11-17 08:04:51 -06:00
Subhraman Sarkar
3afa75225f cmake: fix broken ENABLE_DISPLAY_REVISION option
LOAD_REVISION is used in game_version.cpp rather than game_config.cpp
2024-11-17 11:32:54 +05:30
Dalas121
c67d447901
Change Human Ranger and Huntsman (#9582)
* Huntsman:
  - HP 57 > 53, bow 9-4(marksman) > 10-4(marksman), cost 43g > 50g
  - new ability: Swamp Lurk (invisibility in swamps)
* Ranger:
  - HP 60 > 64, bow 7-4 > 8-4, cost 43g > 50g
  - Defense: castle 60% > 50%, frozen 20% > 30%, reef 30% > 50%, sand 30% > 40%
2024-11-16 15:55:38 -06:00
Nils Kneuper
11078f3e24 updated Arabic translation 2024-11-16 12:36:26 +01:00
Subhraman Sarkar
e64765da2a markup: doc update, return empty string instead of empty tag pair
Related to #9583.
2024-11-14 22:26:10 +05:30
Subhraman Sarkar
ea6f903c04 markup: don't escape internally and update docs
Internal escaping causing markup failure when tags are nested.
See #9569 and #9572 for example. Functions in markup will no longer
escape their contents, and those should be escaped by caller if needed.
2024-11-14 10:30:36 +05:30
Thewodoros
df3f2b2653
EI S01 story: Fix outposts locations accorting to campaign map #9578
The outposts are east of River Weldyn in the campaign map. Also, in scenario 1, the castle is east of the river. The heartland of Wesnoth country is west of that river, so the eastern bank is the "far" one.
These words date back to the original campaign design by Eric S. Raymond. Back then, the campaign map had the outposts on the western bank of Weldyn.
But in aeb9ec7 the map was replaced with a newer one, with outpost on the eastern bank, which persists to this day with some minor changes (like the southern outpost was moved futher south).
2024-11-12 19:49:29 -06:00
Thewodoros
a6fd520956
EI S02: Avoid creating unit with same id twice (#9577)
In the existing code, on HARD difficulty, creating a unit with id="Hur" is done twice, first as a Troll Whelp, then as a Troll Rocklobber. As a result, the former unit is replaced with the latter one. As they are created at the same coordinates, I believe this is the intended behavior.

But according to https://wiki.wesnoth.org/SingleUnitWML , reusing the id "may produce unpredictable results in many cases". For example, (I tested it) if you create the new unit at the different coordinates, it instead appears at the former unit's coordinates.

I've added another preprocessor directive, so the unit with this id is created only once on both NORMAL and HARD.
2024-11-12 18:53:14 -06:00
pentarctagon
d2fc3f3f17 add acquaintance as well 2024-11-12 17:38:07 -06:00
pentarctagon
3c17bc83c2 Add missed preference
Fixes #9567
2024-11-12 17:38:07 -06:00
Charles Dang
c5cb0f104f Remove --no-delay option
This wasn't consistently honored and only affected unit animations.
2024-11-12 00:19:44 -05:00
Charles Dang
34c1c0f61c Remove 200ms delay in gameloop processing when window is not visible
If we need this, it should, as the comment says, be implemented as part of the draw manager. But it also seems like any optimizations on this front are better left to the OS and its compositor.
2024-11-12 00:19:44 -05:00
Charles Dang
8b14612fbe Convert remaining uses of SDL_Delay to std::this_thread::sleep_for
There's one last usecase in controller_base which I intend to remove.
2024-11-12 00:19:44 -05:00
Charles Dang
812c1e2e5e Unit/Animation Component: format ctor 2024-11-11 21:46:14 -05:00
Charles Dang
b9bcdd3b63 Convert animation code to use chrono types 2024-11-11 21:46:14 -05:00
gfgtdf
690ff375b7
fix #9561 OOS when undoing in multiplayer (#9566)
previously in `undoable_action->undo(side_) ` the undo stack was not in sync with the relpay stack because the code called `undos_.pop_back();` before that and `resources::recorder->undo_cut` after that, this could confuse the code which sends replay commands to the other clients.
2024-11-12 02:03:45 +01:00
Gunter Labes
ce54c007bd
Raise batch timeout value because of recent increase in timeouts on macos 2024-11-11 18:19:08 +01:00