This was the last use of lg::format_timespan, which was only ever used in server code anyway. The server probably shouldn't be formatting this anyway, but as long as it is, we don't need a dedicated function or fancy formatting.
Bad design to return mutable reference to static object. This method has the possibility of creating a new default entry in the by_name map, but the remove call will be a no-op in that case (as it was before), so no harm done.
previously the game would return to titlescreen here if mp_info_
but was null but
`game_config::debug && state_.classification().is_multiplayer()`
returned true which happend when a multiplayer game was reloaded
via the sp loadgame dialog.
This fixes the issue by simply removing the "always show mp staging
between scenarios in debug mode" feature, which imo never was that
useful anyways.
This not only removes duplicate information which can always cause bugs if it's out of sync,
this can also be used an an easy way to detect the old undo stack format
this way even when enter/exit_hex events with [on_undo] are involved, undoing happens
in reverse order of the gamestate changes during the original action
This commit splits undo actions into multiple smaller steps. The main advantages:
- Its allows us always undo the parts of an action in the reverse order of which
they originally happen, preventing bugs that could be caused if the parts
interact with each other in a way where the order matters (like for example
an [on_undo] resetting a units moves, when the event happend in a move action
which would then also reset the units moves on undoing).
- It's easier to add (c++) undo steps for specific steps even if they are used
from wml, like spending gold.
- [do_command] no longer confused the undo stack (in fact it's by default now undoable).
- All actions are put onto the undo stack in the same way, previously it was
often unclear whether the undo stack is empty during a specific step during
the execution of an action, in particular when people tried to use
`undo_stack->empty()` to check whether an action could still be undone.
This also adjusts the periods for years and months. Previously, we were using values of 30 days for a month and 12 months for year. Now, we use the chrono values of a month as 1/12 of a year and a year as 365.2425 days.
In S04a, the event is added within his original "last breath" event - the one which switches him to the player's side. Without this additional event, he will die silently if killed by the elves after being "captured".
In S11, it looks like the event for him was simply forgotten (HERODEATH events are added for all other heroes).
Instead of simply returning a string, `is_ip_banned` now returns a struct with an error code, ban reason, and ban time remaining. This avoids doing time duration formatting on the server and allows the error message to be localized on the client. It also makes the ban handling interface more generic in server_base, which should hopefully allow forum bans to be handled this way as well.
* new ships Derelict Hulk and Fireship
* new "race" Ships - includes Transport Galleon, Pirate Galleon, Derelict Hulk, and Fireship
* Pirate Galleon chaotic
* animations for all four touched ships
* ship portraits for Derelict Hulk and Fireship
* crew portraits by LordBob for Boat, Galleon, Transport Galleon, and Pirate Galleon
* old (non-pixel art) transport galleon and pirate galleon images moved to scenery
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.