Ivan Savenko
e50f586d8b
Stabilization
2024-01-19 14:21:13 +02:00
Ivan Savenko
ffd604c114
Removed unnecessary access to IHandler::objects
2024-01-19 13:56:06 +02:00
Ivan Savenko
6e629a6a5f
split getBonusLocalFirst into two distinct method:
...
- const method getFirstBonus that returns single matching bonusToString
- non-const method getLocalBonus that returns bonus from current node
2024-01-19 13:56:06 +02:00
Ivan Savenko
496c13b34a
Stabilization
2024-01-19 13:56:06 +02:00
Ivan Savenko
9af7c63a26
Fix build
2024-01-19 13:56:05 +02:00
Ivan Savenko
ea1f05d15a
Stabilization
2024-01-19 13:55:22 +02:00
Ivan Savenko
60ffb81b33
Replaced remaining placeholder code with callbacks
2024-01-19 13:55:22 +02: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
a15366f5a5
Make IObjectInterface::cb non-static
2024-01-19 13:55:21 +02:00
Ivan Savenko
c37ce05d06
Attempt to make constant bonus system nodes (CCreature / CArtifact)
...
fully constant
2024-01-19 13:54:49 +02:00
Ivan Savenko
2c4cad7d9c
Slight simplification of bonus system node class
2024-01-19 13:54:49 +02:00
Ivan Savenko
d5c4478816
Remove most of non-const access to VLC entities
2024-01-19 13:54:49 +02:00
Ivan Savenko
bd5682ecc3
Merge remote-tracking branch 'vcmi/master' into develop
2024-01-19 13:49:54 +02:00
Ivan Savenko
c31d52bff6
Added new bonus icon
2024-01-18 17:18:13 +02:00
Ivan Savenko
3e8f110482
Merge pull request #3515 from SoundSSGood/backpack-statusbar
...
Backpack statusbar
2024-01-18 16:05:42 +02:00
Ivan Savenko
b698b6e79d
Merge pull request #3512 from Alexander-Wilms/use-auto-with-template-factory-functions-for-smart-pointers
...
Use auto with template factory functions for smart pointers
2024-01-18 16:05:05 +02:00
Ivan Savenko
9025744cc5
Merge pull request #3510 from Alexander-Wilms/remove-semicolons-from-macros
...
Remove trailing semicolons from more macros
2024-01-18 16:03:55 +02:00
Ivan Savenko
b1bd44de1e
Merge pull request #3298 from vcmi/random_prison_distributor
...
Fixes to hero / prison distribution
2024-01-18 16:03:08 +02:00
SoundSSGood
8d4b74b441
Assembling in backpack fixed
2024-01-18 12:49:08 +02:00
Alexander Wilms
b364f707cd
Fix issues introduced by automated replacement of redundant types
2024-01-17 20:12:57 +00:00
Alexander Wilms
7a1cee1a60
Fix error: 'auto' not allowed in non-static struct member
2024-01-17 14:49:28 +00:00
Alexander Wilms
57c51b62fd
Fix CGameHandler.cpp:1026:4: error: function 'getAllowedSpells' with deduced return type cannot be used before it is defined
2024-01-17 14:41:53 +00:00
Alexander Wilms
271eeca11b
Fix BattleEvaluator.cpp:286:32: error: function 'battleGetAllObstacles' with deduced return type cannot be used before it is defined
2024-01-17 14:41:47 +00:00
Alexander Wilms
f08c6d1ce9
Fix issues created by type replacement script
2024-01-17 14:33:02 +00:00
Alexander Wilms
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
DjWarmonger
4f28cd42b7
Update lib/rmg/modificators/PrisonHeroPlacer.h
...
Co-authored-by: Alexander Wilms <Alexander-Wilms@users.noreply.github.com>
2024-01-17 10:11:55 +01:00
DjWarmonger
91a20c2bfd
Update lib/rmg/CMapGenerator.h
...
Co-authored-by: Alexander Wilms <Alexander-Wilms@users.noreply.github.com>
2024-01-17 10:11:50 +01:00
Tomasz Zieliński
66efb07e52
More
2024-01-17 07:45:53 +01:00
Tomasz Zieliński
a568a9b3fb
Fix lambda capture
2024-01-17 07:26:51 +01:00
Tomasz Zieliński
253f1dc7e6
Refactor duplicated code as suggested by SonarCloud
2024-01-17 07:18:14 +01:00
Alexander Wilms
558ead41fe
Add missing semicolon after macro usage
2024-01-16 20:18:18 +00:00
Ivan Savenko
bf62e47481
Merge pull request #3505 from IvanSavenko/bugfixing
...
[1.4.3] Bugfixing
2024-01-16 22:00:11 +02:00
Alexander Wilms
ccac73fb69
Remove trailing semicolons from more macros
2024-01-16 19:46:21 +00:00
Ivan Savenko
723a95f770
Add assertions to detect invalid calls
2024-01-16 21:12:57 +02:00
Alexander Wilms
cca08e29da
Remove duplicate semicolons
2024-01-16 19:02:39 +00:00
Tomasz Zieliński
afc9bd908c
Unused capture
2024-01-16 17:38:36 +01:00
Tomasz Zieliński
aa5bb27d20
Style
2024-01-16 17:16:15 +01:00
Tomasz Zieliński
71844d4d92
Unban artifacts if RMG fails to place Seer Hut (unlikely)
2024-01-16 17:15:35 +01:00
Ivan Savenko
1194419884
Added option to allow self-casting
2024-01-16 15:13:00 +02:00
Ivan Savenko
c3012105e2
Fix duplicated hero in Song for the Father campaign
2024-01-16 14:45:38 +02:00
Ivan Savenko
bdd649a3be
Merge pull request #3502 from IvanSavenko/campaign_localization_fix
...
Fixed missing translation strings on loading campaign save
2024-01-16 11:49:25 +02:00
Ivan Savenko
c839b397e8
Block self-casting, e.g. Archangels can't resurrect themselves
2024-01-15 23:16:53 +02:00
Ivan Savenko
6e5da6c158
Fixed Coronius specialty applying from two locations in code
2024-01-15 23:16:53 +02:00
Ivan Savenko
c21913f661
Fixed initialization of move points and mana for dismissed heroes
2024-01-15 23:16:48 +02:00
Ivan Savenko
2265890f69
Better detection of invalid mod data to avoid crash and notify modders
2024-01-15 18:19:21 +02:00
Ivan Savenko
a32ef673f7
Merge pull request #3482 from IvanSavenko/extend_hota_bonuses
...
Extend hota bonuses
2024-01-15 13:47:13 +02:00
Ivan Savenko
c7897300c0
Fixed missing translation strings on loading campaign save
...
- campaign header now contains text container and stores campaign texts
- map header now contains text container instead of inheriting it
- moved text container registration logic to a wraper class
- fixed registration of copied text containers (from copied map header)
2024-01-15 13:10:25 +02:00
Ivan Savenko
a582cb554e
Merge pull request #3500 from IvanSavenko/fix_dendroid_bind
...
[1.4.3] Fix handling of Dendroid's Bind ability
2024-01-15 12:02:06 +02:00
Ivan Savenko
b4a1a755a4
Merge pull request #3498 from IvanSavenko/simturns_pathfinder
...
[1.4.3] Fixes for simultaneous turns
2024-01-15 12:00:54 +02:00
Ivan Savenko
8400c27251
Merge pull request #3491 from IvanSavenko/change_default_driver
...
Change default SDL driver name from opengl to empty (autoselection)
2024-01-15 11:57:42 +02:00