2b812be9cd
Correctly show results of CreatureTerrainLimiter outside of combat
2025-04-13 22:23:12 +03:00
645b95ba02
Renamed LibClasses * VLC
to GameLibrary * LIBRARY
2025-02-21 16:54:56 +00:00
2362c6da21
Fixes for multiple new issues from Sonar
2025-02-21 15:57:39 +00:00
6c4996ff54
AI will now devalue the usefulness of non-flying units when attacking defensive structures in order to prevent suiciding against castles
2025-02-09 17:33:39 +00:00
5ec5e23534
Add caching for commonly accessed values
2025-01-12 12:21:10 +00:00
b750937588
Merge remote-tracking branch 'upstream/develop' into develop
2024-11-25 18:49:45 +01:00
aef6b0cc00
Fix several new issues detected by SonarCloud
2024-11-20 16:06:38 +00:00
2786797a4e
Fixed incompatibility with latest merge
...
Incompatibility fix
2024-11-07 17:37:18 +01:00
e60a565942
Merge remote-tracking branch 'upstream/develop' into develop
2024-11-07 15:24:19 +01:00
a70f5de8c6
Merge remote-tracking branch 'upstream/develop' into develop
2024-11-07 14:35:13 +01:00
b9ff192a91
Fix regressions from previous PR
2024-11-07 12:07:45 +00:00
d3af9f1c67
Removed pointer to VLC entity from CStackBasicDescriptor
2024-10-30 16:47:02 +00:00
5d6877e06d
Merge remote-tracking branch 'upstream/develop' into develop
2024-10-20 00:49:17 +02: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
61fba1fedd
Merge remote-tracking branch 'upstream/develop' into develop
2024-10-10 17:23:39 +02: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
9a40577994
Merge remote-tracking branch 'upstream/develop' into develop
2024-10-08 16:15:22 +02:00
f5c2772f8d
Fix potential int32_t overflow when computing total army value
2024-10-02 19:48:08 +00:00
3d9892f6b3
Merge remote-tracking branch 'upstream/develop' into develop
2024-10-01 16:08:57 +02:00
586a32a616
CArtifactSet cleanup
2024-09-23 23:39:19 +03:00
065125e770
Merge remote-tracking branch 'upstream/develop' into develop
2024-09-10 14:57:27 +02: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
7c42e43fe5
Update CCreatureSet.cpp
...
Use getMarketValue instead of getCost.
2024-09-05 17:16:06 +02:00
6f9309696d
Merge remote-tracking branch 'upstream/develop' into develop
2024-07-21 19:06:14 +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
aa891cb8b1
Armycost
...
Added new method to retrieve the cost of an army to be used for AI-decision-making.
2024-07-07 22:38:37 +02:00
02e429e973
Fix typos using https://github.com/crate-ci/typos
...
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
6b760089a4
Merge pull request #3473 from IvanSavenko/const_lib
...
[1.5] Remove non-const global variables from library
2024-01-20 19:22:46 +02:00
1f7e53a609
Code style fixes
2024-01-19 21:21:23 +02:00
c37ce05d06
Attempt to make constant bonus system nodes (CCreature / CArtifact)
...
fully constant
2024-01-19 13:54:49 +02:00
d5c4478816
Remove most of non-const access to VLC entities
2024-01-19 13:54:49 +02:00
73019c204d
Replace redundant types with auto
for the lvalues of template factory functions for smart pointers
...
grep -r --include \*.h --include \*.cpp "= std::" * | grep -v auto | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return" | grep -v double | grep -v si64 | grep -v si32 | grep -v ui32 | grep \< | grep -v float | tr -d '\t' | grep -v assert > redundant_types.txt
import re
with open("redundant_types.txt") as f:
for line in f:
line = line.strip()
path = line.split(":", 1)[0]
original_code = ":".join(line.split(":")[1:]).strip()
print()
print(path)
print(original_code)
prefix = "auto "
if original_code.startswith("static"):
static = True
else:
static = False
cpp_type = " ".join(original_code.split("=")[0].strip().split(" ")[0:-1])
print(cpp_type)
if static:
new_code = "static auto "+ " ".join(original_code.split(" ")[2:])
else:
new_code = "auto "+ " ".join(original_code.split(" ")[1:])
print(new_code)
if True:
with open(path, "r") as f:
filedata = f.read()
filedata = filedata.replace(original_code, new_code)
with open(path, "w") as f:
f.write(filedata)
2024-01-17 12:50:00 +00:00
abad4b01ce
Remove explicit convesion to int in operators
2023-11-15 15:55:19 +02:00
6b81012f31
Use variant identifier in netpacks where applicable
2023-11-08 14:00:23 +02:00
10e50548e7
Converted Component class to use VariantIdentifier instead of int
2023-11-02 12:00:04 +02:00
3c5527a222
ArtifactLocation now use ID for artHolder identification part3
2023-10-29 17:46:13 +02:00
ab2f6abb87
ArtifactLocation now use ID for artHolder identification part2
2023-10-29 17:46:13 +02:00
b88a8da4e8
Split off some netpack structures into separate files
2023-10-23 13:59:15 +03:00
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
5b10b457cf
Fix code review suggestions
2023-10-11 00:47:19 +02:00
97097c20ad
Merge pull request #2874 from SoundSSGood/exchange-window-update
...
Exchange window update
2023-09-27 15:50:52 +03:00
a83f290e13
bulk move artifacts only equipped, only backpack
2023-09-19 13:31:42 +03:00
2960895041
Issues fixed
2023-09-17 22:19:45 +02:00
823ffa7a07
Always use ResourcePath for referencing images and animations
2023-09-04 18:22:34 +03:00
17d3d663ee
Converted creature ID and spell ID to new form
2023-08-25 13:38:02 +03:00
f13a53c1d9
Merge remote-tracking branch 'vcmi/beta' into develop
2023-08-12 17:28:47 +03:00
e57f8742cd
Rename ambiguos 'clear' to 'clearSlots'
...
A lot of map objects inherit from CCreatureSet and as result - get
clean() method that resets object army
2023-08-07 19:13:02 +03:00
62fddca21e
Split massive CModHandler class/file into multiple parts:
...
- IdentifierStorage is now a separate handler in VLC
- Renamed ModHandler::Incompatibility exception to ModIncompatibility
- Extracted ModScope namespace from ModHandler
- Extracted ModUtilities namespace from ModHandler
- Split CModHandler.cpp on per-class basis
- Replaced some direct members with unique_ptr to reduce header includes
2023-07-30 22:17:47 +03:00
9cd246ab8b
Merge pull request #2259 from IvanSavenko/campaign_refactoring
...
Fix accumulated issues with campaigns
2023-06-30 12:59:48 +03:00
85262cf4f5
Moved CGameState files into a separate directory
2023-06-26 17:15:59 +03:00