54a46b77a9
Extract library entity randomization logic to separate class
2025-05-19 18:51:42 +03:00
e79c8b9fe1
Remove unnecessary access to gamestate
2025-05-19 17:53:15 +03:00
456525109e
Replaced undescriptive bool true/false with more clear enum for
...
absolute/relative change via netpacks
2025-05-16 17:21:39 +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
35644da2b7
Reogranize callback-related classes on 1 file = 1 class basis
2025-05-12 22:07:09 +03:00
4d57a8ed36
Prefer to pass CGameState as reference instead of pointer
2025-04-27 14:57:31 +03:00
bdae7285ae
Objects list is now private member of CMap
2025-04-27 14:57:30 +03:00
f18715bd48
Update lib/mapObjects/CGDwelling.cpp
...
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com >
2025-03-30 20:09:57 +02:00
dc1358a416
Fix dwellings recruitment text
2025-03-29 23:31:01 +01:00
e273263334
Fix possible crash on accessing Cannon Yard from HotA
2025-03-11 13:41:14 +00:00
62cb5412ff
CGameState::map is now a private, unique_ptr with accessors
2025-03-08 14:05:14 +00:00
82506d5eff
Removed ConstTransitivePtr from StackLocation
2025-03-08 14:04:51 +00:00
645b95ba02
Renamed LibClasses * VLC
to GameLibrary * LIBRARY
2025-02-21 16:54:56 +00:00
101fd694b9
Remove MetaString method that can't be used with modded objects
2024-12-24 15:04:01 +00:00
a4ef45c4f8
Move list of war machines in war machine factory to config
2024-11-16 15:32:52 +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
c0f5c7c0ea
Replace pointer with reference in pack apply functions
2024-10-07 14:59:46 +00:00
39a2c29c97
Removed creatureBank flag from battle, battles now receive BattleLayout
...
struct that defines how units are placed in combat
2024-09-12 12:11:18 +00:00
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
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
44fdb71933
Machine Factory and Refugee Camp can't be owned
2024-09-04 19:46:58 +00: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
d49a61645c
All objects that can be owned by player now implement IOwnableObject
2024-08-28 12:51:28 +00:00
a481f07daf
PlayerState now stores all objects owned by player
2024-08-28 12:51:27 +00:00
2a05fbdd50
Unified handling of battle sides ID's
...
- Replaced BattleSide namespace-enum with enum class
- Merged two different BattleSide enum's into one
- Merged BattlePerspective enum into BattleSide enum
- Changed all places that use integers to represent battle side to use
BattleSide enum
- Added BattleSideArray convenience wrapper for std::array that is
always 2-elements in size and allows access to its elements using
BattleSide enum
2024-08-11 20:54:44 +00:00
ffaaa7da15
blockingDialog functions: the answer
parameter can be negative
2024-08-09 00:28:28 +02:00
b7391f49f6
Merge branch 'vcmi/master' into 'vcmi/develop'
2024-08-05 10:36:10 +00:00
8ce6bcdf3b
Right-clicking dwellings will now show recruitable creatures (but not
...
their number) for all players
2024-08-02 15:03:25 +00:00
b6c22b2053
Fix typo
2024-07-29 17:13:31 +00:00
4aa73b40c9
Split CTownHandler into smaller chunks
2024-07-21 18:21:48 +00:00
63bcf7d83c
Replaced most of usages of CRandomGenerator with vstd::RNG in library
2024-07-16 13:13:07 +00:00
02e429e973
Fix typos using https://github.com/crate-ci/typos
...
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
ffec4b9154
Explicitly ban 'large' dwellings from random selection
...
Old code was relying on specific sorting order leading to easy to break
logic
2024-04-22 12:35:55 +03:00
19453aab41
Add handling for yes/no dialogs that can be safely skipped by player
2024-04-17 01:08:27 +02:00
e67e4430ba
Removed most of non-const static fields in lib. Reduced header includes.
2024-01-19 13:55:22 +02:00
a15366f5a5
Make IObjectInterface::cb non-static
2024-01-19 13:55:21 +02:00
51b7de4b98
Fix double off-by-one bug with CREATURE_GROWTH bonus
2024-01-05 16:57:44 +02:00
d187309eed
Fixed typo - different type was used to select ID and subID
2023-12-16 13:46:29 +02:00
34338f4eaa
Remove few more implicit conversions
2023-11-15 15:55:19 +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
1ebb151b41
Show available creatures in owned dwellings on right-click
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
8d5fa41a19
Minor fixes
2023-11-03 16:03:29 +02:00
3634fb2158
Remove int <=> Identifier comparisons
2023-11-03 16:03:29 +02:00
2b9c362d5b
Explicitly convert identifier to underlying enumeration
2023-11-03 16:03:29 +02:00
b42f073f0c
Stabilization
2023-11-01 18:26:57 +02:00
7a09646009
Cleaned up dwelling randomization
2023-11-01 14:43:20 +02:00