Ivan Savenko
|
d04241b10a
|
Code cleanup
|
2024-01-19 23:02:00 +02:00 |
|
Ivan Savenko
|
a15366f5a5
|
Make IObjectInterface::cb non-static
|
2024-01-19 13:55:21 +02:00 |
|
Ivan Savenko
|
d5c4478816
|
Remove most of non-const access to VLC entities
|
2024-01-19 13:54:49 +02:00 |
|
Alexander Wilms
|
1b85abb508
|
Use auto instead of redundant type in initializations using new
grep -r --include \*.h --include \*.cpp "=" * | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return\|{\|}\|= \"\|= tr(\|virtual\|void" | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "float\|nullptr" | grep "new" | grep -v "AI/FuzzyLite" | grep \( | grep "= new" > 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 = line.split(":")[1].strip()
if "new " in original_code:
cpp_type = original_code.split(" ")[0]
if original_code.count(cpp_type) == 2:
print()
print(path)
print(original_code)
new_code = "auto "+" ".join(original_code.split(" ")[1:])
print(new_code)
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-16 21:40:53 +00:00 |
|
Andrii Danylchenko
|
26b6d1cf74
|
NKAI: fix capturing shipyards
|
2023-12-02 14:03:54 +02:00 |
|
Ivan Savenko
|
20ef3a69e7
|
Fix most of memleaks discovered by valgrind
|
2023-11-13 16:27:15 +02:00 |
|
Ivan Savenko
|
910ad50417
|
Fix client & server compilation
|
2023-10-22 16:54:48 +03:00 |
|
Ivan Savenko
|
0a10fc30b8
|
(lib) Bonus subtype is now stored as metaidentifier that can store any
other identifier inside it
|
2023-10-22 16:54:43 +03:00 |
|
nordsoft
|
7ccd4cdcb2
|
Refactor quests progress
|
2023-10-11 21:10:42 +02:00 |
|
nordsoft
|
5b10b457cf
|
Fix code review suggestions
|
2023-10-11 00:47:19 +02:00 |
|
nordsoft
|
5eeda3cd25
|
Quests mostly work
|
2023-10-10 23:44:29 +02:00 |
|
nordsoft
|
bb238f9b72
|
New quests work
|
2023-10-10 23:44:29 +02:00 |
|
Andrii Danylchenko
|
ebe155fa95
|
NKAI: mana recovery
|
2023-09-30 10:37:36 +03:00 |
|
Andrii Danylchenko
|
2dd0d76412
|
NKAI: water and air walking
|
2023-09-30 10:37:32 +03:00 |
|
Evgeniy Meshcheryakov
|
ecf9b1aa2f
|
Fix NKAI compilation with NKAI_PATHFINDER_TRACE_LEVEL>=2
|
2023-09-04 10:08:56 +03:00 |
|
Ivan Savenko
|
87957e74c1
|
Replaced boost::thread_specific_ptr with thread_local
|
2023-08-23 16:32:29 +03:00 |
|
Andrii Danylchenko
|
f1a9ae99ee
|
NKAI: various behavior fixes, undo max_gold_preasure
|
2023-07-31 22:01:12 +03:00 |
|
Andrii Danylchenko
|
fb7477047a
|
NKAI: loosen gold presure on build system.
|
2023-07-31 22:01:12 +03:00 |
|
Andrii Danylchenko
|
202e13ce2e
|
NKAI: log paths scan depth
|
2023-07-31 22:01:11 +03:00 |
|
Andrii Danylchenko
|
5083100d3b
|
NKA: fix accessing removed hero and heroExchangeCount
|
2023-07-31 22:01:11 +03:00 |
|
Andrii Danylchenko
|
b19ac01bf9
|
Fuzzy rework, added more defence and gather army routines
|
2023-07-31 22:01:10 +03:00 |
|
Andrii Danylchenko
|
b1ca663eb6
|
Fuzzy rework
|
2023-07-31 22:01:10 +03:00 |
|
Andrii Danylchenko
|
38a98387e4
|
Temp fix for blocked in garrison ai.
|
2023-07-31 22:01:10 +03:00 |
|
Ivan Savenko
|
85262cf4f5
|
Moved CGameState files into a separate directory
|
2023-06-26 17:15:59 +03:00 |
|
Ivan Savenko
|
08cfbe79cf
|
Added encapsulation for movement points access
|
2023-06-25 17:42:36 +03:00 |
|
Ivan Savenko
|
ebc7a82c2e
|
Converted pathfinder enum's to enum class
|
2023-06-21 15:38:57 +03:00 |
|
Ivan Savenko
|
f78470a301
|
Fix build
|
2023-06-21 14:55:25 +03:00 |
|
Ivan Savenko
|
bd4d2788ed
|
Split pathfinder into multiple smaller files
|
2023-06-21 13:46:09 +03:00 |
|
Ivan Savenko
|
87fcfa4add
|
Removed excessive pathfinder includes
|
2023-06-21 12:00:44 +03:00 |
|
Ivan Savenko
|
6aedb99117
|
Cleaned up IShipyard interface
|
2023-06-16 17:59:10 +03:00 |
|
Ivan Savenko
|
acac42291e
|
Remove excessive CMap.h includes
|
2023-05-31 23:18:38 +03:00 |
|
Andrii Danylchenko
|
0829593356
|
NKAI: composite pathfinder actions and fix for guarded bordergate
|
2023-05-07 09:15:37 +03:00 |
|
Konstantin
|
86f5d6de69
|
vcmi: modernize headers
|
2023-04-30 13:35:54 +03:00 |
|
Andrii Danylchenko
|
fbc9a32ad8
|
#2018 - fix shipyard usage for NKAI, allied shipyard should work now
|
2023-04-22 18:42:36 +03:00 |
|
Andrii Danylchenko
|
d347db4c16
|
Fix hero count calculation for resourceful ai mod
|
2023-04-22 14:47:31 +03:00 |
|
nordsoft
|
0a28262c15
|
Merge remote-tracking branch 'upstream/develop' into boats
# Conflicts:
# AI/VCAI/Pathfinding/AINodeStorage.cpp
|
2023-04-19 02:22:19 +04:00 |
|
nordsoft
|
37027ad17f
|
Fix AI boat logic
|
2023-04-18 18:33:44 +04:00 |
|
Konstantin
|
7a5775a9f9
|
vcmi: use std::optional
|
2023-04-17 00:43:13 +03:00 |
|
Konstantin
|
11b237a23c
|
vcmi: massive refactoring v1
|
2023-04-05 22:33:12 +03:00 |
|
Andrii Danylchenko
|
34abc9f82d
|
NKAI: disallow using allied shipyard
|
2023-04-02 10:04:10 +03:00 |
|
Andrey Filipenkov
|
3602645a30
|
improve iterating over EPathfindingLayer
|
2023-03-20 11:35:19 +03:00 |
|
Andrii Danylchenko
|
fa9e1d2d83
|
NKAI: fix crash
|
2023-03-12 16:31:15 +02:00 |
|
Andrii Danylchenko
|
4bf570763a
|
NKAI: improve neutral town priority handling, reduce priority of objects like star axis
|
2023-03-12 16:31:15 +02:00 |
|
Ivan Savenko
|
05a1d7c6e3
|
All text for factions/towns/building are passed through translator
|
2023-01-20 15:18:36 +02:00 |
|
Ivan Savenko
|
fa6f7513e8
|
All heroes-related strings are passed through translator
|
2023-01-20 15:18:36 +02:00 |
|
Ivan Savenko
|
eb20a4b208
|
Merge remote-tracking branch 'vcmi/develop' into warnings_fix
|
2022-12-23 14:40:45 +02:00 |
|
Andrii Danylchenko
|
56bf8ec2c4
|
#1228 - prevent second AI activation on AI defeat due to wrong EndTurn packet
|
2022-12-14 22:13:26 +02:00 |
|
Andrii Danylchenko
|
01980f4310
|
Small optimization of NKAI pathfinder
|
2022-12-10 22:08:16 +02:00 |
|
Ivan Savenko
|
8dcecdc235
|
Fix deprecation warning
|
2022-12-09 14:16:23 +02:00 |
|
Andrii Danylchenko
|
233b850daf
|
NKAI: a few crash/hang fixes
|
2022-11-07 13:58:20 +02:00 |
|