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

411 Commits

Author SHA1 Message Date
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
80acd7e77c Simplified and fixed server restart procedure:
- Replaced several assertions with runtime_error's to detect them in
release builds
- Removed multiple dispatchMainThread calls in server shutdown code to
simplify debugging and code flow
- Moved handling of gameplay shutdown and score calculation from
PlayerInterface to ServerHandler (not perfect, but better than before)
2024-04-07 14:19:57 +03:00
ca7c91e766 Merge pull request #3677 from vcmi/object-graph
Object graph
2024-03-29 20:39:56 +02:00
30d9daf62c NKAI: improve boat handling by object graph, a set of fixes 2024-03-28 13:39:15 +02:00
1f487dab49 Merge pull request #3685 from dydzio0614/small-fixes
Small fixes
2024-03-28 13:17:57 +02:00
cfe7a3cfa6 Fix some more cases of missing pathfinder cache invalidation 2024-03-27 21:17:21 +01:00
4ed961fb96 Partially unified handling of pregame and in-game chats 2024-03-27 13:10:55 +02:00
96b18b1b8e Fix possibilities to get outdated movement points info due to creature types 2024-03-24 20:19:14 +01:00
9f688e6fb7 MoveArtifact, BulkMoveArtifacts PlayerColor player field 2024-03-07 22:28:56 +02:00
b1f52eec41 ManageBackpackArtifacts 2024-03-07 18:16:22 +02:00
c23953eac5 Remove custom casts 2024-02-14 12:56:37 +02:00
38ba42ef7a Rename 'c' to 'logicConnection' 2024-02-11 16:26:27 +02:00
322c5faf63 Merge remote-tracking branch 'vcmi/develop' into lobby 2024-01-26 16:52:23 +02:00
fc4ae3bd8c Merge remote-tracking branch 'vcmi/develop' into lobby 2024-01-20 23:01:49 +02:00
cc7fc4a2c6 Fix headless mode 2024-01-20 22:55:27 +02:00
0a1153e1c6 Switch client-server communication to new API 2024-01-19 23:49:59 +02:00