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

29 Commits

Author SHA1 Message Date
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
0ada2a5ebd Map objects now use shared_ptr (game) 2025-04-27 14:57:30 +03:00
09db3e4bef Reworked resource piles loading to fix wog maps with mithril 2025-01-25 11:40:21 +00: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
697d63d2b8 Reworked and fixed gendered hero sprites on adventure map 2024-11-07 10:39:23 +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
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
503b87561e Converted all h3 banks to rewardable, remove most of hardcoded checks 2024-09-12 12:11:18 +00:00
20d5b33ea6 Remove marketModes as member
marketModes are now generated in runtime and are not a member of
IMarket. Was not a bad change, but towns load buildings before town type
is randomized, leading to case where market modes are not actually known
when building is added to town (like random towns with market built)

Since altar requires CArtifactSet for work, IMarket will now always
contain it, but it will only be accessible if market supports altar
mode.
2024-08-27 14:07:00 +00:00
63bcf7d83c Replaced most of usages of CRandomGenerator with vstd::RNG in library 2024-07-16 13:13:07 +00:00
be9813b4fb Remove temporary workaround 2024-04-12 11:51:15 +02:00
305e2bdf2f Load obstacle sets from json in mods 2024-04-05 08:31:05 +02:00
a15366f5a5 Make IObjectInterface::cb non-static 2024-01-19 13:55:21 +02:00
d5c4478816 Remove most of non-const access to VLC entities 2024-01-19 13:54:49 +02:00
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00:00
54103813dd Remove no longer used serialization methods 2023-11-08 21:27:05 +02:00
823ffa7a07 Always use ResourcePath for referencing images and animations 2023-09-04 18:22:34 +03:00
62cd8b12d4 Converted several namespace enums to enum class 2023-08-25 13:38:02 +03:00
199f9eb6f5 Fix build 2023-07-15 19:29:11 +03:00
8ed5f412e2 Show per-type object names in editor 2023-07-15 16:09:44 +03:00
1fb2b60999 Remove no longer relevant check 2023-06-23 13:42:09 +03:00
58661fc8ec Moved DwellingInstanceConstructor to a new file 2023-06-16 17:59:50 +03:00
77b58bc66d Cleaned up object constructors to reduce duplicated code 2023-06-16 17:59:50 +03:00
487f441f47 Implemented boat selection for town shipyards 2023-06-16 17:59:49 +03:00
5cfbdd2967 Partially split CommonConstructors.cpp into few separate files 2023-06-16 17:59:10 +03:00
d6a357fd17 Split some map object files into smaller files. Reduced includes usage. 2023-06-02 21:47:37 +03:00