Andrii Danylchenko
|
0c1664dbe7
|
NKAI: various AI fixes after tests in headless
|
2024-01-20 22:55:30 +02:00 |
|
Andrii Danylchenko
|
1db43a509e
|
NKAI: fix casting FLY several times during path calculation
|
2024-01-20 22:55:28 +02:00 |
|
Andrii Danylchenko
|
36bc9ddcec
|
NKAI: mutex for internal AI state
|
2024-01-20 22:55:27 +02:00 |
|
Andrii Danylchenko
|
cc7fc4a2c6
|
Fix headless mode
|
2024-01-20 22:55:27 +02:00 |
|
Ivan Savenko
|
d04241b10a
|
Code cleanup
|
2024-01-19 23:02:00 +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
|
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 |
|
Ivan Savenko
|
bd5682ecc3
|
Merge remote-tracking branch 'vcmi/master' into develop
|
2024-01-19 13:49:54 +02:00 |
|
Ivan Savenko
|
e849e4170a
|
Merge pull request #3486 from Alexander-Wilms/replace-redundant-types-with-auto
Replace redundant types with `auto`
|
2024-01-17 13:31:05 +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 |
|
Alexander Wilms
|
cca08e29da
|
Remove duplicate semicolons
|
2024-01-16 19:02:39 +00:00 |
|
Ivan Savenko
|
0d0d3d8c80
|
Renamed speed -> getMovementRange, remove misleading default parameter
|
2024-01-14 17:14:36 +02:00 |
|
Alexander Wilms
|
bc781c28e0
|
Remove trailing semicolon from NET_EVENT_HANDLER macro
|
2024-01-14 14:49:25 +00:00 |
|
Alexander Wilms
|
f3277b7953
|
Define each identifier in a dedicated statement
|
2024-01-10 00:22:23 +00:00 |
|
Joakim Thorén
|
daf9f9f7f5
|
Re-add const that was erronously removed with 88ec4fa
Co-authored-by: Andrey Filipenkov <kambaladecapitator@gmail.com>
|
2023-12-30 11:01:21 +01:00 |
|
Joakim Thorén
|
88ec4fa0e7
|
Use getTileThreat-helper instead of directly accessing hitMap with tile coordinates
|
2023-12-29 23:12:06 +01:00 |
|
Joakim Thorén
|
61314a36f6
|
Fix copy-paste mistake
|
2023-12-27 22:35:43 +01:00 |
|
Joakim Thorén
|
406d136cdc
|
Fixes warnings about possibly dangling references
|
2023-12-27 22:24:58 +01:00 |
|
Andrii Danylchenko
|
26b6d1cf74
|
NKAI: fix capturing shipyards
|
2023-12-02 14:03:54 +02:00 |
|
Ivan Savenko
|
60ca6f968c
|
Fix hero limit check in AI
|
2023-11-27 14:08:49 +02:00 |
|
Ivan Savenko
|
20ef3a69e7
|
Fix most of memleaks discovered by valgrind
|
2023-11-13 16:27:15 +02:00 |
|
Ivan Savenko
|
4a7fa9bf8c
|
Simplified CTypeList class
|
2023-11-08 22:05:36 +02:00 |
|
Ivan Savenko
|
6b81012f31
|
Use variant identifier in netpacks where applicable
|
2023-11-08 14:00:23 +02:00 |
|
Ivan Savenko
|
10e50548e7
|
Converted Component class to use VariantIdentifier instead of int
|
2023-11-02 12:00:04 +02:00 |
|
Ivan Savenko
|
8346d71c98
|
Remove more subID access
|
2023-11-01 14:44:05 +02:00 |
|
Ivan Savenko
|
7107b3202f
|
Merge pull request #3069 from SoundSSGood/artifact-location-id
ArtifactLocation now use ID for artHolder identification
|
2023-11-01 14:41:36 +02:00 |
|
SoundSSGood
|
ab2f6abb87
|
ArtifactLocation now use ID for artHolder identification part2
|
2023-10-29 17:46:13 +02:00 |
|
SoundSSGood
|
61fc236d79
|
ArtifactLocation now use ID for artHolder identification part1
|
2023-10-29 17:46:13 +02:00 |
|
Alexander Wilms
|
5cbc75d3b7
|
Merge remote-tracking branch 'upstream/develop' into develop
|
2023-10-29 13:35:37 +00:00 |
|
Ivan Savenko
|
0169c65937
|
Merge pull request #3100 from IvanSavenko/split_net_packs
Split netpacks.h into multiple files
|
2023-10-29 13:46:40 +02:00 |
|
Alexander Wilms
|
0a6c82c639
|
AI/Nullkiller/Behaviors/DefenceBehavior.{h,cpp}: treat -> threat
|
2023-10-27 23:34:11 +00:00 |
|
Ivan Savenko
|
b88a8da4e8
|
Split off some netpack structures into separate files
|
2023-10-23 13:59:15 +03:00 |
|
Andrii Danylchenko
|
9eb9404f28
|
BattleAI: divide only positive part of score onto turns count
|
2023-10-22 21:37:54 +03:00 |
|
Ivan Savenko
|
4f47555977
|
Split OBJECT bonus source into OBJECT_TYPE and OBJECT_INSTANCE
|
2023-10-22 16:55:19 +03:00 |
|
Ivan Savenko
|
ac925bb786
|
Renamed new types for consistency with code style
|
2023-10-22 16:55:19 +03:00 |
|
Ivan Savenko
|
80e6485965
|
MetaIdentifier now uses std::variant internally
|
2023-10-22 16:55:19 +03:00 |
|
Ivan Savenko
|
b394158dc9
|
Bonus Source ID now uses metaidentifier
|
2023-10-22 16:55:18 +03:00 |
|
Ivan Savenko
|
77facf9387
|
Implement missing functions, fixes linking errors
|
2023-10-22 16:54:56 +03: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 |
|
Ivan Savenko
|
454ba44ac5
|
Merge pull request #2988 from IvanSavenko/configurable_extensions
Extension of configurable object functionality
|
2023-10-22 16:24:47 +03:00 |
|
Alexandre Detiste
|
15e45f966c
|
typos found by lintian
|
2023-10-17 22:06:08 +02:00 |
|
Ivan Savenko
|
fd01a25352
|
Implemented basic version of configurable Witch Hut
|
2023-10-16 00:12:38 +03:00 |
|
nordsoft
|
fadf086e61
|
Fix review comments
|
2023-10-12 13:30:01 +02: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 |
|