Tomasz Zieliński
a8d1d72b15
Cleaned logs
2024-03-20 10:12:48 +01:00
Tomasz Zieliński
662bb0d1f6
Cut straight paths for better passability
2024-03-20 10:03:26 +01:00
Tomasz Zieliński
25a62b504f
Perfection achieved?
2024-03-20 09:05:27 +01:00
Tomasz Zieliński
1546a221d1
Best result so far
2024-03-20 08:36:02 +01:00
DjWarmonger
306896601a
Merge pull request #3636 from vcmi/rmg_tweaks
...
Rmg tweaks
2024-03-14 19:54:25 +01:00
Tomasz Zieliński
28f76b2839
Actually, avoid guarded object altogether
2024-03-01 18:17:17 +01:00
Tomasz Zieliński
4e88290962
Actually avoid only monsters
2024-03-01 18:10:05 +01:00
Tomasz Zieliński
8f1638f78a
Try to not route roads through passable objects
2024-03-01 17:48:07 +01:00
Tomasz Zieliński
b7320bbc8a
Cleanup
2024-02-29 13:04:48 +01:00
Tomasz Zieliński
2c32c770f7
First version that works in lobby
2024-02-29 12:45:08 +01:00
Tomasz Zieliński
af0207470d
- Increased minimal obstacle density on surface
...
- Decreased minimal obstacle density in the underground
2024-02-25 12:25:23 +01:00
Tomasz Zieliński
2e8801084d
Clean up RMG logs
2024-02-25 11:40:01 +01:00
Ivan Savenko
45c971a405
Replace throws() with nothrow
2024-02-14 12:07:07 +02:00
Ivan Savenko
7359b66f99
Do not use floating point equality checks
2024-02-14 12:07:07 +02:00
Alexander Wilms
678cacbd25
Remove more redundant virtual
specifiers
...
`grep -nr "virtual " | grep -v googletest | grep " override" | grep -v overriden > ../redundant_virtual.txt`
```python
import os
with open("../redundant_virtual.txt") as f:
for line in f:
print()
line: str = line.strip()
print(line)
tmp = line.split(":",2)
file = tmp[0].strip()
code = tmp[-1].strip()
print(file)
print(code)
new_code = code.replace("virtual ", "", 1)
# https://superuser.com/a/802490/578501
command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
os.system(command)
```
2024-02-13 15:21:30 +01:00
Ivan Savenko
4c70abbeb5
Reduced usage of global variables - removed or made const / constexpr
2024-02-12 13:49:45 +02:00
Ivan Savenko
c03196257f
Fix "identical expressions on both sides of comparison"
2024-02-12 12:32:35 +02:00
Ivan Savenko
ef8eb330d6
Merge branch 'develop' into random_template_description
2024-02-11 17:54:18 +02:00
Ivan Savenko
f1a8e78f0b
Merge pull request #3596 from vcmi/fixes_for_water
...
Fixes for RMG water
2024-02-11 17:53:46 +02:00
Ivan Savenko
87059be67b
Added range checks to values read from h3m.
...
Fixes reading of morale/luck values (-3..3) as unsigned leading to
overflow.
2024-02-05 21:27:55 +02:00
Tomasz Zieliński
af3c6450a7
Update comments
2024-02-04 08:56:45 +01:00
Tomasz Zieliński
7ce3553a6d
Fix race condition when placing object at teh shore
2024-02-04 08:56:21 +01:00
Tomasz Zieliński
6528124c1e
Do not fill water zone with obstacles
2024-02-04 08:55:51 +01:00
Tomasz Zieliński
b7df6064cd
Add random map description and display it in RMG menu
2024-02-03 16:23:56 +01:00
Tomasz Zieliński
e6f0afd586
Tweaking parameters, cleanup
2024-02-02 15:50:33 +01:00
Tomasz Zieliński
178f960533
First working version
2024-02-02 14:27:32 +01:00
Tomasz Zieliński
9f7c986621
First version that compiles successfully
2024-02-02 10:37:08 +01:00
Tomasz Zieliński
c5aa31f46a
First sketch
2024-01-30 18:04:15 +01:00
Ivan Savenko
b51e58cddc
Merge pull request #3544 from vcmi/fix_leaky_connections
...
Do not place zone guards adjacent to 3rd zone
2024-01-23 13:39:11 +02:00
Tomasz Zieliński
b3adb9e554
Do not place zone guards adjacent to 3rd zone
2024-01-22 09:27:30 +01:00
Ivan Savenko
0c07384293
Refactoring of serialization versioning handling
...
- Removed 'version' field from serialize() method
- Handler classes - Binary(De)Serializer now have 'version' field
- Serialization versioning now uses named enum
Save compatibility with 1.4.X saves should be intact
2024-01-20 20:34:51 +02:00
Ivan Savenko
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
Ivan Savenko
339fad6e27
Merge pull request #3528 from vcmi/master
...
Merge master -> develop
2024-01-19 21:19:20 +02:00
Ivan Savenko
aa02d5787a
Better solution for rmg crash fix
2024-01-19 17:26:51 +02:00
Ivan Savenko
789c96d9b0
Fixed binding lambda to a reference to a temporary on stack
2024-01-19 16:17:59 +02:00
Ivan Savenko
e50f586d8b
Stabilization
2024-01-19 14:21:13 +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
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
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
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
ccac73fb69
Remove trailing semicolons from more macros
2024-01-16 19:46:21 +00:00