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

186 Commits

Author SHA1 Message Date
e35ac0b1e5 Merge pull request #5733 from MichalZr6/mapeditor_fixes
Mapeditor fixes for various crashes
2025-06-16 17:15:29 +03:00
463c404a83 Use bonus only as shared_ptr to avoid memory corruption 2025-06-16 16:22:21 +03:00
ebe746d0cf Integrate EditorCallback into mapeditor
EditorCallback being set up with std::unique_ptr stored in MapController.
2025-06-15 23:47:08 +02:00
a842dfb3c4 Support for defining new campaign regions in mods, for hota h3c 2025-06-15 17:01:29 +03:00
54a46b77a9 Extract library entity randomization logic to separate class 2025-05-19 18:51:42 +03:00
4d4da0454f map objects hierarchy now uses IGameInfoCallback 2025-05-14 18:33:20 +03:00
6f20235d07 Merge CPrivilegedInfoCallback into CGameInfoCallback 2025-05-14 13:42:20 +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
a13ab8f013 Merge pull request #5707 from IvanSavenko/dwelling_fix
Fixes for handling of oversized map dwellings
2025-05-14 11:52:40 +03:00
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
cb70cc48d6 Fixes for handling of oversized map dwellings
- Marked large version of H3 Unicorn's Glade as not usable for random
dwelling replacement
- Shifted oversized dwellings - that have at most 2x2 as blocked tile,
but have non-blocked tile column will now be placed correctly
- This fixes incorrect random dwelling replacement of the only oversized
H3 dwelling - Portal of Glory
- Game will now detect & report invalid dwelling templates from mods
- Updated docs to clarify dwellings format
2025-05-12 18:01:46 +03:00
6b6199d3a4 Implemented giving bonuses to commanders 2025-05-07 22:49:22 +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
dca5a099d5 Remove compat code for old banks, fixes crash on loading old mods 2025-04-29 12:15:04 +03:00
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
c02a8a84fd Stacks of armed instance are now unique_ptr 2025-04-27 14:57:30 +03:00
0ada2a5ebd Map objects now use shared_ptr (game) 2025-04-27 14:57:30 +03:00
2b286378e8 Remove logic for banks in 1.5 format 2025-03-19 08:02:39 +00:00
8f074490a7 Merge branch 'master' into 'develop' 2025-02-27 21:15:42 +00:00
f04cac4101 Fix format string 2025-02-27 10:15:23 +00:00
b372cc84e9 Avoid crash if object has same name as on provided in compatiblity
identifiers field
2025-02-25 15:26:16 +00:00
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
09db3e4bef Reworked resource piles loading to fix wog maps with mithril 2025-01-25 11:40:21 +00:00
ca4227ba9d Add debug information for crash on object randomization 2025-01-07 15:06:49 +00:00
494d70cbf0 Reduce excessive logging 2024-11-26 13:55:46 +00:00
6544f6d6a6 Merge pull request #4944 from IvanSavenko/market_fix
Fixes for configurable markets support
2024-11-25 13:39:20 +02:00
f59834afe1 Fixes for configurable markets support
- string "speech" can now be translated
- removed "title" string, VCMI will now use object name instead
- moved configuration of all "markets" into a separate json file
- added schema for validation of market objects
- removed serialization of translated strings from University
2024-11-20 15:45:13 +00:00
f823b8addf Following review 2024-11-19 10:57:20 +01:00
7e2cad158a HillFort fix 2024-11-19 10:53:16 +01:00
4ccce20eda War machines factory are now never guarded by default 2024-11-17 17:38:54 +00:00
697d63d2b8 Reworked and fixed gendered hero sprites on adventure map 2024-11-07 10:39:23 +00:00
8cd19f639f Added validation of flaggable objects 2024-11-07 10:39:23 +00:00
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
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
08fbcd5239 TerrainTile now uses identifiers instead of pointers to VLC 2024-10-30 16:22:11 +00:00
dd7d190a58 Implemented optional descriptions for market map objects
It is now possible to define description of an object with 'market'
handler that will be shown on right-clicking the object.

Similarly, added description to right-click popup to Hill Fort.
2024-10-30 13:20:21 +00:00
f8b1f40abb Merge pull request #4348 from MichalZr6/hill_fort_changes
Hill Fort unavailable upgrade and status bar new messages
2024-10-30 14:00:35 +02:00
7ae5e2b406 Added support for daily income to flaggable objects 2024-10-25 19:01:00 +00:00
8a5ac73438 Basic support for configurable flaggable objects
Converted CGLighthouse class into FlaggableMapObject

Bonus provided by Lighthouse/Flaggable is now defined in config and is
accessible to mods.
2024-10-25 16:48:10 +00:00
9ed4dbaeb4 Merge remote-tracking branch 'upstream/develop' into adv_search 2024-10-14 19:52:55 +02:00
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
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
31095248ab Removed typeName and subtypeName properties from CGObjectInstance 2024-10-13 13:05:50 +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
a22de74323 Fixes for loading 1.5 mods in vcmi 1.6 2024-10-10 09:50:56 +00:00
2399a5a765 Merge pull request #4712 from IvanSavenko/detect_conflict
Detection of potential conflicts between mods
2024-10-07 17:57:52 +03:00
344e845684 Merge branch 'develop' into adv_search 2024-10-07 12:56:54 +02:00
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
66fdad145c Added an option to configure validation level in launcher 2024-10-06 19:21:33 +00:00