1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-21 17:17:06 +02:00
Commit Graph

442 Commits

Author SHA1 Message Date
Ivan Savenko
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
Ivan Savenko
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
Ivan Savenko
679181c103 Implemented serialization of local player state in json form 2024-10-08 20:04:32 +00:00
Ivan Savenko
d0606d2dc9 Fix scripting build 2024-10-07 15:14:03 +00:00
Ivan Savenko
786f80871e Replace more usages of pointers to packs with references 2024-10-07 14:59:14 +00:00
Ivan Savenko
f6f6f98580
Merge pull request #4699 from SoundSSGood/backpack-arts-sorting
Backpack artifacts sorting
2024-10-07 17:55:42 +03:00
SoundSSGood
e22d15b1d8 manageBackpackArtifacts 2024-10-02 12:45:50 +03:00
Laserlicht
d929bfb9d1 rename; introduce factor 2024-09-28 15:05:13 +02:00
Laserlicht
5b2aa4dc71 swapping spells 2024-09-28 00:34:25 +02:00
Laserlicht
a9327b3fa3 netpacks 2024-09-27 22:47:22 +02:00
Ivan Savenko
327ff01471 Implemented explicitly visitable town buildings, e.g. hota mana vortex
Added flag `manualHeroVisit` flag to town building. If this flag is set,
then building will only be activated on click and will not give its
effect on hero recrutiment, hero visit, or new day.

This allows implementing changes to Mana Vortex from HotA
2024-09-03 16:31:07 +00:00
SoundSSGood
2e3e6b1553 market->getObjInstanceID() 2024-08-21 01:01:23 +03:00
Laserlicht
072af5bd6d basic support for bank 2024-08-04 15:44:57 +02:00
Ivan Savenko
4aa73b40c9 Split CTownHandler into smaller chunks 2024-07-21 18:21:48 +00:00
Ivan Savenko
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
SoundSSGood
b42c6dbf44 fixed regressions 2024-07-09 14:27:05 +03:00
SoundSSGood
ce9d2d8ab8 Switching costume 2024-04-27 21:35:37 +03:00
SoundSSGood
25dea7e364 Saving costume 2024-04-27 21:35:37 +03:00
Ivan Savenko
d5a2ad1be8 Allow sending requests to move across multiple tiles at once 2024-04-20 12:28:50 +03:00
SoundSSGood
b1f52eec41 ManageBackpackArtifacts 2024-03-07 18:16:22 +02:00
Ivan Savenko
4d0c0f10a9
Merge pull request #3530 from Laserlicht/tavern
Invite hero
2024-01-26 13:12:55 +02:00
Laserlicht
346beea49c
invite hero backend 2024-01-20 01:09:55 +01:00
Ivan Savenko
e67e4430ba Removed most of non-const static fields in lib. Reduced header includes. 2024-01-19 13:55:22 +02:00
Ivan Savenko
6270c81c1a Add logging to trace crash 2024-01-16 15:21:49 +02:00
Ivan Savenko
6b81012f31 Use variant identifier in netpacks where applicable 2023-11-08 14:00:23 +02:00
Ivan Savenko
8346d71c98 Remove more subID access 2023-11-01 14:44:05 +02:00
Ivan Savenko
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
Johannes Schauer Marin Rodrigues
a1a5bc28c2
convert line endings from CRLF (Windows) to LF (Linux/Unix)
Mixed line endings cause problems when exporting patches with
git-format-patch and then trying to "git am" a patch with mixed and
non-matching line endings. In such a situation git will fail to apply
the patch.

This commit runs the dos2unix tools on the remaining files with CRLF
(\r\n) line endings to convert them to line-feeds (\n) only.

Files that are Windows specific like *.vcxproj and *.props files were
not converted.

Closes: #3073
2023-10-19 16:23:21 +02:00
nordsoft
d7d435dcb7 Add game pause 2023-10-08 16:03:57 +02:00
Ivan Savenko
97097c20ad
Merge pull request #2874 from SoundSSGood/exchange-window-update
Exchange window update
2023-09-27 15:50:52 +03:00
Ivan Savenko
d257fb37f0 Use optional instead of Json for queries 2023-09-26 13:42:20 +03:00
SoundSSGood
a83f290e13 bulk move artifacts only equipped, only backpack 2023-09-19 13:31:42 +03:00
SoundSSGood
1b810b5b93 combined arts assembling fixed 2023-09-07 11:54:52 +03:00
Ivan Savenko
9fa7a93fb0 Properly pass battleID in all battle netpack's 2023-09-06 16:03:47 +03:00
Ivan Savenko
747e28947a Fix build 2023-09-06 16:03:47 +03:00
Ivan Savenko
41210c1dbf Client-side support for multiple battles 2023-09-06 16:03:47 +03:00
Ivan Savenko
036df2e0ad Support multiple battles in AI 2023-09-06 16:03:46 +03:00
Ivan Savenko
0240ee886d Converted (almost) all namespace enum's to enum classes 2023-08-25 13:38:02 +03:00
Ivan Savenko
62cd8b12d4 Converted several namespace enums to enum class 2023-08-25 13:38:02 +03:00
Ivan Savenko
6297140bf5 Start of stabilization - battles now start correctly 2023-08-21 17:55:49 +03:00
Ivan Savenko
1bf6bbd9b6 Significantly simplified threading model in battles 2023-07-18 19:55:59 +03:00
Ivan Savenko
19ace6a849 Moved hero pool logic to the separate files 2023-07-15 19:55:29 +03:00
Ivan Savenko
85262cf4f5 Moved CGameState files into a separate directory 2023-06-26 17:15:59 +03:00
Ivan Savenko
6aedb99117 Cleaned up IShipyard interface 2023-06-16 17:59:10 +03:00
Ivan Savenko
d6a357fd17 Split some map object files into smaller files. Reduced includes usage. 2023-06-02 21:47:37 +03:00
nordsoft
4b1b58b617 Change Callback to abstract 2023-05-01 21:49:37 +04:00
Konstantin
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
SoundSSGood
ea7dd14d8b client is able to erase artifact 2023-04-08 00:41:55 +03:00
Ivan Savenko
34772ef830 Fixed includes 2023-02-01 21:45:06 +02:00
Ivan Savenko
108a42e4ba Reorganized includes for new layout. New class - IImageLoader 2023-02-01 20:42:06 +02:00