1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00
Commit Graph

219 Commits

Author SHA1 Message Date
b37a3dc63c Lighthouse / flaggable objects now has dedicated bonus system node
this alows to remove multiple hacks from lighthouse logic
2025-05-14 13:42:19 +03:00
716da918f8 Completely remove IGameCallback class
- CClient now inherits directly from CPrivilegedInfoCallback, like
IGameCallback did before. However CClient no longer needs dummy
implementation of IGameEventCallback
- CGObjectInstance hierarchy now uses CPrivilegedInfoCallback for
callback. Actual events can only be emitted in calls that receive
IGameEventCallback pointer, e.g. heroVisit
- CGameHandler now inherits directly from both CPrivilegedInfoCallback
and IGameEventCallback as it did before via IGameCallback
2025-05-14 13:39:41 +03:00
f7d08a7288 Merge pull request #5700 from IvanSavenko/gamestate_pack_visitor
Remove CPack::applyGs method in favor of GameStatePackVisitor class
2025-05-14 11:53:15 +03:00
f26dca2026 Merge pull request #5708 from kdmcser/limit_fix
OppositeLimiter fix and boat creation fix when loading map
2025-05-14 11:52:15 +03:00
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
1c4d78c3fa fix boat instanceName not set bug in loading map 2025-05-13 01:04:27 +08:00
4b30336d03 Fix issues detected by Sonar 2025-05-11 19:50:57 +03:00
86b832be67 Remove CPack::applyGs method in favor of GameStatePackVisitor class 2025-05-10 17:51:35 +03:00
69de14a42f Fix crash on loading map with heroes that have combined art equipped 2025-05-07 18:05:30 +03:00
2e90e54aeb Merge pull request #5680 from kdmcser/crash_fix3
fix load game crash
2025-05-05 16:03:27 +03:00
1c6d45d5b1 fix load game crash 2025-05-03 20:01:58 +08:00
283adc37d7 Unit stack rebalancing rework
- CStackInstance::count is now private with accessor methods
- CStackInstance::experience renamed to totalExperience and now stores
total stack experience (multiplied by stack size) to reduce rounding
errors
- CStackInstance::totalExperience is now private with accessors methods
- stack experience is now automatically reallocated on stack management
- Removed buggy BulkSmartRebalanceStacks pack, that mostly duplicates
BulkRebalanceStacks
- Renamed BulkSmartSplitStack to BulkSplitAndRebalanceStack to drop
unclear "smart" in name
- Reworked split-and-rebalance logic to correctly reallocate stack
experience
2025-05-01 18:18:30 +03:00
f70ad2c15b Reorganized artifact-related classes
- files now generally contain only 1 class (except for tightly coupled
classes)
- files are now located in lib/entities/artifact directory
- removed excessive includes

No changes to functionality
2025-04-29 13:29:08 +03:00
a8a74888f7 Fix attaching of hero to bonus system (old bug?) 2025-04-27 14:57:31 +03:00
4e8e85e3e4 Fix issues reported by Sonar, review fixes 2025-04-27 14:57:31 +03:00
4d57a8ed36 Prefer to pass CGameState as reference instead of pointer 2025-04-27 14:57:31 +03:00
a43c3fcb31 Restore save compatibility with 1.6 2025-04-27 14:57:31 +03:00
77845f74bc Stability & regression fixes 2025-04-27 14:57:31 +03:00
f025a3a932 Review & cleanup hiding / displaying map objects 2025-04-27 14:57:31 +03:00
966468f3fa Fix and simplify game saving / loading 2025-04-27 14:57:31 +03:00
f5f8ed192b Fix random map generation 2025-04-27 14:57:31 +03:00
912c2eae94 Fix regressions 2025-04-27 14:57:31 +03:00
e6a8e5d4bd Correctly restore bonus system on deserialization 2025-04-27 14:57:31 +03:00
93b18ee94b Fix some issues detected by Sonar & code review, fix build 2025-04-27 14:57:31 +03:00
586620a290 Basic code review, remove unused code from serializers 2025-04-27 14:57:31 +03:00
d1d2cf4189 Fix crashes on game start, gamestate now derives from GameCallbackHolder 2025-04-27 14:57:31 +03:00
4ed13409c2 Remove serialization of raw pointers from serialization 2025-04-27 14:57:31 +03:00
9e6397d1f9 Remove pointer to boat from CGHeroInstance 2025-04-27 14:57:30 +03:00
331debaa3f Removed pointers from PlayerState 2025-04-27 14:57:30 +03:00
6d65641a43 Gamestate is now passed as shared pointer 2025-04-27 14:57:30 +03:00
cd7732456a Remove pointer to objects from TerrainTile 2025-04-27 14:57:30 +03:00
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
d9aabb47e6 Remove pointers to hero instances from HeroPool class 2025-04-27 14:57:30 +03:00
bdae7285ae Objects list is now private member of CMap 2025-04-27 14:57:30 +03:00
745040def3 Access to heroes storage in CMap is now done via public methods 2025-04-27 14:57:30 +03:00
1f502c0548 CMap towns and heroes on map fields are now private 2025-04-27 14:57:30 +03:00
0ada2a5ebd Map objects now use shared_ptr (game) 2025-04-27 14:57:30 +03:00
2ca1748e96 Artifact instances are now owned solely by CMap 2025-04-27 14:57:30 +03:00
417ea6451a Remove ConstTransitivePtr from hero and town instances 2025-04-27 14:57:30 +03:00
eb3b51a6cf Remove save compatibility with 1.5.X 2025-03-18 11:35:15 +00:00
62cb5412ff CGameState::map is now a private, unique_ptr with accessors 2025-03-08 14:05:14 +00:00
b6026084ea StartInfo in gamestate now use unique_ptr 2025-03-08 14:04:51 +00:00
9f713a0914 Rename int3::valid to isValid for consistency 2025-03-03 10:46:00 +00:00
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
4e73f7d90f shared_mutex replace boost 2025-02-28 16:01:11 +01:00
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
5ea4014589 Merge pull request #5304 from IvanSavenko/oneway_ai
Enable one-way monoliths for AI
2025-01-25 13:42:31 +02:00
32391dc7a9 Pathfinder cache is now stored separately per playerBlocked
- human player will now use pathfinder settings from config (as before)
- nullkiller AI will now use its own, modified settings
- added option to configure NKAI usage of monolith to config
- fixed pathfinder costs not updating on receiving levelup
2025-01-23 15:28:44 +00:00
f132fad14e Fix spells banned on map appearing in towns, cleanup code 2025-01-18 19:49:56 +00:00
eb4b8fdddd Replace random hero info in scenario info window with generated hero data 2025-01-08 21:01:15 +01:00