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

426 Commits

Author SHA1 Message Date
f03cc06176 Battle Info uses ObjectInstanceID's instead of pointers 2025-04-27 14:57:31 +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
71bc1054d0 BattleStart pack now uses unique_ptr 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
417ea6451a Remove ConstTransitivePtr from hero and town instances 2025-04-27 14:57:30 +03:00
e847d3322d Hotfix visitBattleResultsApplied 2025-04-15 23:10:04 +02:00
60afbbe20f Necromancy & Eagle eye infowindows 2025-04-09 10:13:10 +02:00
f0a9c95075 ArtInfoWindow on client. Client side 2025-04-06 13:47:32 +02:00
4609a83fc1 ArtInfoWindow on client. Lib side 2025-04-05 18:02:04 +02:00
9732d39c70 Moved shutdown request dialog handling to GameInstance 2025-03-12 13:33:12 +00:00
62cb5412ff CGameState::map is now a private, unique_ptr with accessors 2025-03-08 14:05:14 +00:00
219eea86ff Better handling of AI shutdown 2025-03-02 14:33:11 +00:00
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
156de5b17e Added GameInstance class
- available as global GAME
- integrates LOCPLINT (CPlayerInterface)
- integrates CGI->mh (CMapHandler)
- integrates CSH (CServerHandler)
2025-02-21 16:54:06 +00:00
ffd37a8fa8 Removed CGI in favor of VLC. Map handle is for now global variable 2025-02-21 16:53:14 +00:00
cacceda950 Renamed CGuiHandler to GameEngine
- class CGuiHandler is now called GameEngine to better describe its
functionality
- renamed global GH to more clear ENGINE
- GH/ENGINE is now unique_ptr to make construction / deconstruction
order more clear and to allow interface / implementation split
- CGuiHandler.cpp/h is now called GameEngine.cpp/h and located in root
directory of client dir
2025-02-21 16:53:13 +00: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
157d6d30c8 Move rest of commonly-accessed UnitState queries to bonus cache 2025-01-04 15:09:50 +00:00
cf08b8bf50 Fix game not ending on victory of allied human players in hotseat 2024-12-10 12:02:07 +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
8461189e95 code review + text 2024-09-28 16:10:03 +02:00
d929bfb9d1 rename; introduce factor 2024-09-28 15:05:13 +02:00
2052a26031 code review 2024-09-28 14:25:11 +02:00
857b2e9a35 spell replacement works 2024-09-27 23:52:33 +02:00
5f86f5504b Fix #3286 2024-09-19 09:51:18 +02:00
e13e72d093 Moved code from NetpacksClient.cpp to Client.cpp
Created new function CClient::updatePath that will invalidate paths and update given hero displayed path
2024-09-19 08:43:54 +02:00
6b4220c510 Add update paths code to netpack visiting methods 2024-09-19 08:43:53 +02:00
e15ea4fc75 BulkEraseArtifacts network pack 2024-08-29 20:22:08 +03:00
ce1e0b8875 Moved NewTurn pack generation to NewTurnProcessor 2024-08-28 13:03:24 +00:00
01396b62b7 Extracted handling of type ID's from serializer into a separate class 2024-08-26 19:48:46 +00:00
11e8b04ac5 Merge pull request #4463 from SoundSSGood/IMarket-refactoring
IMarket refactoring
2024-08-26 22:48:23 +03:00
2e3e6b1553 market->getObjInstanceID() 2024-08-21 01:01:23 +03:00
58bb2b58e3 IMarket suggestions
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-08-20 18:49:48 +03:00
fd45b5144d IMarket serializeable 2024-08-20 18:49:47 +03:00
81b1704e39 Merge branch 'vcmi:develop' into extended_statistic 2024-08-14 20:32:47 +02: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
f42f1de347 extended statistic: Button and data transfer 2024-08-11 22:21:13 +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
b07408e984 New objects are now created and initialized on server and sent to client 2024-07-16 13:13:39 +00:00
b42c6dbf44 fixed regressions 2024-07-09 14:27:05 +03:00
ef1fbffad4 ArtifactsUIController class 2024-07-09 14:27:05 +03:00
6dd76908bc MoveArtifact struct not used now 2024-07-09 14:27:04 +03:00
5dbe88d9a4 End of battle BulkMoveArtifacts 2024-07-09 14:27:04 +03:00
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
1f209fd94a use MetaString 2024-05-02 21:03:23 +02:00
19453aab41 Add handling for yes/no dialogs that can be safely skipped by player 2024-04-17 01:08:27 +02:00