1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-31 22:59:54 +02:00

42 Commits

Author SHA1 Message Date
Ivan Savenko
eb3b51a6cf Remove save compatibility with 1.5.X 2025-03-18 11:35:15 +00:00
Ivan Savenko
860f65ea62
Merge branch 'develop' into fix_map_sorting 2025-03-16 19:19:27 +02:00
MichalZr6
749149a679 Fixes following reviews
Use std::optional and improve textSearchSimilarityScore()
2025-03-12 21:40:07 +01:00
MichalZr6
3f4616eb0f SonarCloud fixes 2025-03-12 17:44:13 +01:00
MichalZr6
9fbb2d7370 Fix: use LIBRARY instead of VLC 2025-03-11 23:45:59 +01:00
MichalZr6
5363424451 Small fixes to search mapobject feature:
- Trim overly long names to prevent incorrect item display
- Use getLocaleName() for proper locale-aware to_lower conversion
- Implement scoring-based sorting for better search match ranking
- Remove Boost dependency: replace with std::string::find() and rfind()
2025-03-11 23:22:04 +01:00
MichalZr6
e993c2aed0 Use locale based on language set in config 2025-03-11 23:21:12 +01:00
heroesiiifan
daacb73866
romanian plural 2025-03-09 20:38:30 +01:00
heroesiiifan
0424c8ad9c
fix 2025-03-08 20:15:10 +01:00
heroesiiifan
c49039a3f7
add romanian and bulgarian 2025-03-08 20:10:33 +01:00
Ivan Savenko
a8a6be7ac1 Fix potential compatibility with C++20 / C++23 mode
This fixes several issues with compatibility with C++20. C++23 was also
tested, but apparently it does not have any additional breaking changes
compared to C++20 (or we don't have those).

VCMI still uses C++17 as before - goal is only to make potential
transition easier.

There were 2 cases that are deprecated in C++20 that we use:
- Floating point operations on enums are deprecated
- `this` can no longer be captured when using default capture by value
`[=]`

Both of those should now be replaced with code that works fine in both C+
+17 and in C++20 mode
2025-03-02 14:11:48 +00:00
Ivan Savenko
b0de99fe89
Merge pull request #5478 from heroesiiifan/translation
develop - add greek, japanese, norwegian; harmonize
2025-03-01 23:14:28 +02:00
heroesiiifan
d6467f26d7
make new languages selectable only with config file 2025-02-26 17:14:06 +01:00
heroesiiifan
68b3421d5d
add greek, japanese, norwegian; harmonize 2025-02-25 22:54:19 +01:00
Ivan Savenko
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
Laserlicht
07b494632b optimize textSearchSimilar 2025-02-08 13:22:11 +01:00
Ivan Savenko
a95ab5a7ce Add better debugging for text conversion failure 2025-02-01 18:10:42 +00:00
Laserlicht
0035b2346a optimized search input 2025-01-23 23:50:04 +01:00
Ivan Savenko
101fd694b9 Remove MetaString method that can't be used with modded objects 2024-12-24 15:04:01 +00:00
Laserlicht
a8709731c4 unify time (without seconds) 2024-12-02 20:37:51 +01:00
Laserlicht
81328e2588 fixme & seconds in time (more usual) 2024-12-01 19:00:24 +01:00
MichalZr6
ab1f1d6d99 Fix crash on miniHillFort popup window 2024-11-19 10:53:16 +01:00
Joakim Thorén
db93f776c6 Fix MinGW date formatting error, see https://sourceforge.net/p/mingw-w64/bugs/793/. Workaround is to replace %F with %Y-%m-%d and %T with %H:%M:%S, should produce the same output as before per https://en.cppreference.com/w/cpp/io/manip/put_time 2024-11-17 00:02:13 +01:00
Ivan Savenko
e7bea6c3b8
Merge pull request #4852 from IvanSavenko/remove_vlc_entities_serialization
Remove remaining pointers to VLC entities from serializer
2024-11-06 22:01:11 +02:00
Ivan Savenko
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
Ivan Savenko
22f517686d Better handling of encoding detection for maps and campaigns
Now VCMI will use either preferred language or install language to load
maps and campaigns that are part of "core" mod, or, in other words -
placed in Maps directory of H3 data (like most of manually downloaded
maps and campaigns are)

If game data is in English, then game can safely use encoding of player-
selected language (such as Chinese) to load maps. After all, both GBK
and all Win-125X encoding are superset of ASCII, so English map will
always load up correctly.

Maps that are part of a mod still use mod language as before - it is up
to mod maker to correctly set up mod language.
2024-10-30 11:54:35 +00:00
Ivan Savenko
72b0062ae3 Better integration of wog commanders translation 2024-10-26 14:21:05 +00:00
Ivan Savenko
d1164ab9a9 Integrated exchange window translation into vcmi 2024-10-26 13:09:09 +00:00
Ivan Savenko
565c02d61c Added 'translate missing' command for convenience 2024-10-26 12:54:35 +00:00
Ivan Savenko
c43844706e Implemented translation support for random map descriptions 2024-10-25 20:41:19 +00:00
Laserlicht
6e65eaafbc workaround for assert 2024-10-14 21:01:01 +02:00
Ivan Savenko
604e3b5c67
Merge pull request #4763 from IvanSavenko/herohandler_split
Split CHeroHandler.cpp/.h into 1 file per class
2024-10-14 19:05:48 +03:00
Ivan Savenko
10ad0fc760 Split CHeroHandler.cpp/.h into 1 file per class
All parts of CHeroHandler.cpp are now in lib/entities/hero
Adjusted includes to use new paths
No functionality changes
2024-10-13 14:01:09 +00:00
Ivan Savenko
a8e84c55f6 Fix some of the new warnings from sonarcloud 2024-10-11 10:45:29 +00:00
Ivan Savenko
8e4152bc81 It is now possible to define objects directly in mod.json instead of
using path to file with object definition
2024-10-06 19:42:15 +00:00
Ivan Savenko
1488629628 Add simple support for translation of strings that were changed by
another mod
2024-10-06 19:42:15 +00:00
Ivan Savenko
b85ccccb37 Minor refactoring of translations:
- removed unsuccessful and broken validation of translations
- pass JsonNode when registering strings to provide information on mod
source
2024-10-06 19:42:15 +00:00
Ivan Savenko
c77da2e476 Remove no longer used compatibility containers 2024-10-06 19:42:15 +00:00
Ivan Savenko
8225eb454e Added GameSettings to gamestate, potentially allowing to define game
settings per map (or in random map template)
2024-09-05 15:16:27 +00:00
Ivan Savenko
97f1a310df Fix miscellaneous issues discovered by Sonar 2024-08-12 18:26:30 +00:00
Laserlicht
af2b6a0051 show handicap resources 2024-07-25 00:28:49 +02:00
Ivan Savenko
1aa391fdf8 Split CGeneralTextHandler file into 1 file per class form
All text processing code is now located in lib/texts.
No changes other than code being moved around and adjustment of includes

Moved without changes:
Languages.h           -> texts/Languages.h
MetaString.*          -> texts/MetaString.*
TextOperations.*      -> texts/TextOperations.*

Split into parts:
CGeneralTextHandler.* -> texts/CGeneralTextHandler.*
                      -> texts/CLegacyConfigParser.*
                      -> texts/TextLocalizationContainer.*
                      -> texts/TextIdentifier.h
2024-07-20 12:55:17 +00:00