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

162 Commits

Author SHA1 Message Date
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
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
0e2ea99283 Implemented option to emulate H3 seer hut full-army quest bug 2025-05-07 19:16:58 +03:00
92c4bcbf68 Unify checks for creature limiter 2025-05-07 16:35:15 +03:00
4b77140f4a Implemented playerGlobal visit mode for objects like cartographer 2025-05-06 18:53:43 +03:00
62e774c91e Add new rewards for configurable objects 2025-05-06 17:28:11 +03: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
4e8e85e3e4 Fix issues reported by Sonar, review fixes 2025-04-27 14:57:31 +03:00
a43c3fcb31 Restore save compatibility with 1.6 2025-04-27 14:57:31 +03:00
d34b47bb20 Remove pointers from artifacts 2025-04-27 14:57:31 +03:00
ab11d2b075 Remove quests from CMap, now solely owned by quest objects 2025-04-27 14:57:30 +03:00
797646cc05 Quests in map now use shared_ptr instead of const ptr 2025-04-27 14:57:30 +03:00
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
2362c6da21 Fixes for multiple new issues from Sonar 2025-02-21 15:57:39 +00:00
6d0dc9c5bb Added popup for keymasters/border guards similar to teleporters 2025-01-05 23:22:46 +00:00
8c6208be04 Fixes for crashes discovered via Google Play
- Fix crash on attempt to enable mod with recursive dependencies
- Fix crash on attempt to enable Chronicles after failed install
- Fixed crash on attempt to access non-installed mod when repository
checkout is off
- Show error message on failure to load filesystem instead of crash in
launcher
- Added workaround for crash on attempt to delete nonexisting save/map
- Added logging of mod settings to log file to simplify debugging
2024-12-23 18:00:35 +00:00
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
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
3dd4fa2528 Reduce usage of pointers to VLC entities
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.

CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.

VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town

VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class
2024-10-10 12:28:08 +00:00
a8f8c3f4b1 Replaced most of accesses to CGObjectInstance::pos with anchorPoint() 2024-10-09 15:43:46 +00:00
c0f5c7c0ea Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
586a32a616 CArtifactSet cleanup 2024-09-23 23:39:19 +03:00
6179521364 Merge pull request #4556 from IvanSavenko/town_building_visit
Implemented explicitly visitable town buildings, e.g. hota mana vortex
2024-09-05 17:21:21 +03:00
7466d7452d vcmiscrolls 2024-09-05 15:51:45 +03:00
b09d9d501b Pass pointer to actual caller in showBlockingDialog callWith
Fixes activation of all rewardable buildings in town on blocking dialog
answer
2024-09-04 15:14:56 +00:00
ffaaa7da15 blockingDialog functions: the answer parameter can be negative 2024-08-09 00:28:28 +02:00
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
63bcf7d83c Replaced most of usages of CRandomGenerator with vstd::RNG in library 2024-07-16 13:13:07 +00:00
4e7809d934 Take resources on quest completion instead of giving them 2024-06-17 20:18:34 +00:00
a6dead7725 Fixed loading of text strings for hota quests 2024-04-22 13:49:17 +03:00
4947baebee Fix crash on loading vmap's 2024-04-08 13:16:34 +03:00
2e4895766a Implemented tracking of objects destroyed by players 2024-01-31 01:37:33 +02:00
a9866bb5c6 Added RandomGeneratorUtil::nextItemWeighted convenience method 2024-01-31 00:17:40 +02:00
a15366f5a5 Make IObjectInterface::cb non-static 2024-01-19 13:55:21 +02:00
543ee597b8 Fix localization-related error messages 2023-12-11 18:23:52 +02:00
d58ea6f28d Fix keymaster visitation status tracking 2023-11-21 16:38:09 +02:00
c872f8418f Implemented serialization of MapObjectSubID, refactoring of related code 2023-11-17 21:18:34 +02:00
13763cad8e Remove few more implicit conversions 2023-11-15 15:55:19 +02:00
1d430d0328 Fix initialization order of Seer Huts and Creatures - Seer Hut might be
initialized before creature that its quest is linked to
2023-11-12 19:18:00 +02:00
6b81012f31 Use variant identifier in netpacks where applicable 2023-11-08 14:00:23 +02:00
86a3806bec MetaString refactor to eliminate integer usage for identifiers
- entity names are now stored and serialized as text ID's
- added helper methods for convenience to get entities names to
metastring
2023-11-07 22:47:10 +02:00
2f3d14da5c Show quest description only after visit 2023-11-06 20:37:17 +02:00
c1c2119f3d Show Seer Hut quest icon on right click. Fix broken tooltip. 2023-11-06 20:37:07 +02:00
184f5a72cc Use toEntity/toXXX methods in Identifier instead VLC objects access 2023-11-03 16:03:29 +02:00
3634fb2158 Remove int <=> Identifier comparisons 2023-11-03 16:03:29 +02:00
8f25f1fd4b Serialize identifiers without implicit conversion to int 2023-11-03 16:03:29 +02:00
10e50548e7 Converted Component class to use VariantIdentifier instead of int 2023-11-02 12:00:04 +02:00
ab2f6abb87 ArtifactLocation now use ID for artHolder identification part2 2023-10-29 17:46:13 +02:00
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00