1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-30 08:57:00 +02:00
Commit Graph

6492 Commits

Author SHA1 Message Date
DjWarmonger
3e959f3ad9
Merge pull request #3132 from vcmi/reward_select_all
Support for "selectAll" reward
2024-03-14 21:46:02 +01:00
DjWarmonger
306896601a
Merge pull request #3636 from vcmi/rmg_tweaks
Rmg tweaks
2024-03-14 19:54:25 +01:00
DjWarmonger
2c9b7089ad
Merge pull request #3645 from vcmi/save_rmg_options
Save rmg options
2024-03-14 19:54:08 +01:00
Tomasz Zieliński
a93dd25867 Update docs to be in line with existing code. 2024-03-14 10:22:15 +01:00
Ivan Savenko
94ecef748b
Merge pull request #3654 from IvanSavenko/lobby_protocol
Lobby protocol documentation and fixes
2024-03-11 18:07:57 +02:00
Andrii Danylchenko
c9c118cff2
Merge pull request #3595 from vcmi/object-graph
NKAI Object graph
2024-03-10 20:26:17 +02:00
Tomasz Zieliński
8ef7daf45a Missing change 2024-03-09 11:02:43 +01:00
Tomasz Zieliński
69cfc83be3 Fix issue found by Sonarcloud 2024-03-09 08:17:46 +01:00
Tomasz Zieliński
87bf4b752a Better implementation of granting multiple rewards 2024-03-09 07:38:11 +01:00
Tomasz Zieliński
fe8bcc5758 Merge remote-tracking branch 'origin/develop' into reward_select_all
# Conflicts:
#	lib/mapObjects/CRewardableObject.cpp
2024-03-09 06:50:56 +01:00
Ivan Savenko
c21e5bb0fb Always validate messages in debug mode. Fixes for schemas 2024-03-08 16:32:40 +02:00
Ivan Savenko
0946f5e690 Fix file name in header 2024-03-08 16:32:40 +02:00
Ivan Savenko
2c1b142d68 Added support for 'const' field to json validator 2024-03-08 16:32:39 +02:00
SoundSSGood
d7607983fc sonarcloud warnings 2024-03-08 14:33:03 +02:00
SoundSSGood
9f688e6fb7 MoveArtifact, BulkMoveArtifacts PlayerColor player field 2024-03-07 22:28:56 +02:00
SoundSSGood
b1f52eec41 ManageBackpackArtifacts 2024-03-07 18:16:22 +02:00
SoundSSGood
d143f53d7e using deque for hero's backpack storage 2024-03-07 18:16:21 +02:00
Andrii Danylchenko
b236384356 NKAI: graph add battle layer 2024-03-02 15:54:05 +02:00
Andrii Danylchenko
047e076d05 NKAI: visual logger 2024-03-02 15:54:05 +02:00
Alexander Wilms
ea48257100 Fix SonarCloud issues
Replace the use of "::value" with "std::is_abstract_v" and similar issues
2024-03-02 14:08:03 +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
d078808c9f Merge remote-tracking branch 'origin/develop' into rmg_tweaks 2024-03-01 16:55:05 +01:00
Tomasz Zieliński
17fc1604ca Remove unused file 2024-02-29 20:20:35 +01:00
Ivan Savenko
d5a96a122a Add additional constructor to JsonNode from const char *
Fixes an issue where due to implicit conversion JsonNode(bool) will be
called instead of expected JsonNode(std::string)
2024-02-29 17:33:00 +02: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
Ivan Savenko
57eece233b Ignore BOM at the start of json file 2024-02-26 12:55:49 +02:00
Ivan Savenko
f86708bf37 Fix json5 parsing 2024-02-26 12:55:49 +02:00
Ivan Savenko
c90fb47c23 Converted json validator into a class 2024-02-26 12:55:49 +02:00
Ivan Savenko
d2844a5eeb Cleared up code 2024-02-26 12:55:49 +02:00
Ivan Savenko
08deae4186 Moved static methods outside of vcmi namespace 2024-02-26 12:55:49 +02:00
Ivan Savenko
757f77378d Remove unused code 2024-02-26 12:55:49 +02:00
Ivan Savenko
29860848a5 Cleanup 2024-02-26 12:55:49 +02:00
Ivan Savenko
18bbccd167 Unify formatting 2024-02-26 12:55:49 +02:00
Ivan Savenko
2632ab04f5 Partial support for json5 2024-02-26 12:55:49 +02:00
Ivan Savenko
41493d6f67 Implemented 'strict' json support 2024-02-26 12:55:49 +02:00
Ivan Savenko
d1c274f93f Replaced vector of strings with simple bool for flag 2024-02-26 12:55:49 +02:00
Ivan Savenko
922966dcf8 Renamed JsonNode::meta to more logical modScope. Member is now private 2024-02-26 12:55:49 +02:00
Ivan Savenko
e73516b7d1 Simplified template magic in JsonNode 2024-02-26 12:55:49 +02:00
Ivan Savenko
08a27663f9 Reworked JsonNode constructors to more logical form 2024-02-26 12:55:49 +02:00
Ivan Savenko
54796c7c56 Rename toJson to toString/toCompactString for consistency 2024-02-26 12:55:49 +02:00
Ivan Savenko
a2b8eaf7fb Do not escape '/' when writing json 2024-02-26 12:55:49 +02:00
Ivan Savenko
25146bfa93 Replace custom class with string_view 2024-02-26 12:55:49 +02:00
Ivan Savenko
ca9a16e30e Partially updated schema validation to draft v6 2024-02-26 12:55:49 +02:00
Ivan Savenko
bc9e961252 Better checks for incoming data 2024-02-25 20:05:52 +02:00
Ivan Savenko
6901945b6e Fix possible thread race on sending packet from two threads 2024-02-25 20:05:28 +02:00
Ivan Savenko
7b6b64894c
Merge pull request #3624 from IvanSavenko/fix_crash
Fix crash on using heal in SPELL_AFTER_ATTACK bonus
2024-02-25 15:01:32 +02:00
Ivan Savenko
7c843ff0f7
Merge pull request #3627 from IvanSavenko/random_town_names
Town names randomization fix
2024-02-25 15:01:22 +02: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
c513dc1bc7 Fix code style & formatting 2024-02-19 15:59:55 +02:00
Ivan Savenko
779625415f Guard against concurrent writes on same asio::socket instance 2024-02-19 13:47:06 +02:00
Ivan Savenko
f620a07389 Add protocol validation 2024-02-19 13:46:07 +02:00
Ivan Savenko
81e44711a2 Remove no longer needed workaround 2024-02-19 13:45:50 +02:00
Ivan Savenko
fc252bb9eb Random town names are now guaranteed to be unique on the map 2024-02-19 00:36:08 +02:00
Ivan Savenko
10b35ceecb Replaced assertions with exceptions for invalid input in RNG 2024-02-19 00:35:21 +02:00
Ivan Savenko
c0dc1040c2 Fixes crash on attempt to dynamic_cast AbilityCaster to Unit 2024-02-18 20:06:07 +02:00
Alexander Wilms
2ea78a5883 Fix float comparisons
Replace this "==" with a more tolerant comparison operation.
Floating point numbers should not be tested for equality cpp:S1244
2024-02-14 23:30:29 +01:00
Ivan Savenko
110ef5f66e
Merge pull request #3614 from IvanSavenko/sonarcloud_fixes_2
Sonarcloud fixes 2
2024-02-14 16:44:58 +02:00
Ivan Savenko
3740f8b02f Moved bonus parsing to a new file 2024-02-14 15:48:06 +02:00
Ivan Savenko
0b7bf56597 Remove old files 2024-02-14 14:02:41 +02:00
Ivan Savenko
c3957c2c2a Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00
Ivan Savenko
c23953eac5 Remove custom casts 2024-02-14 12:56:37 +02:00
Ivan Savenko
0d74959a33 Better float comparison 2024-02-14 12:07:07 +02:00
Ivan Savenko
6d6137accc Simplified code 2024-02-14 12:07:07 +02: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
Ivan Savenko
9ebd194ab1
Merge pull request #3609 from IvanSavenko/single_process
Allow running server as part of client process
2024-02-14 12:06:22 +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
763e18d202 Fix symlink target - use absolute path 2024-02-12 16:35:18 +02:00
Ivan Savenko
4c70abbeb5 Reduced usage of global variables - removed or made const / constexpr 2024-02-12 13:49:45 +02:00
Ivan Savenko
6e399eb21a Make some non-const static variables const or constexpr 2024-02-12 13:22:54 +02:00
Ivan Savenko
6db405167d Clarified some (im)possible null dereferences 2024-02-12 13:05:30 +02:00
Ivan Savenko
392c360f88 Replaced some usages of void * with more clear CPack * 2024-02-12 12:53:10 +02:00
Ivan Savenko
b796ed8626 Fix undefined behavior 2024-02-12 12:33:09 +02:00
Ivan Savenko
c03196257f Fix "identical expressions on both sides of comparison" 2024-02-12 12:32:35 +02:00
Ivan Savenko
c577ea3e8d Fix potentially uninitialized values 2024-02-12 12:31:27 +02:00
Ivan Savenko
a909d7ddde Removed cmake_modules/VCMI_lib macro, use it directly in place 2024-02-11 20:38:24 +02:00
Ivan Savenko
19ccef7131 Fix build 2024-02-11 19:54:30 +02:00
Ivan Savenko
cded8b1999 Show human-readable thread name in log 2024-02-11 17:55:02 +02:00
Ivan Savenko
f08c9f4d59 Renamed ENABLE_STATIC_AI_LIBS option to match its actual effect 2024-02-11 17:55:02 +02:00
Ivan Savenko
0d263c5571 Implemented option to run server as a thread with shared VLC 2024-02-11 17:55:02 +02:00
Ivan Savenko
c2286e5126 Server now consists from library and separate executable projects 2024-02-11 17:55:02 +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
7790acae3a Fix save compatiblity with 1.4 2024-02-11 17:31:30 +02:00
Ivan Savenko
f2ecd4cf11 Merge branch 'develop' into 'lobby' 2024-02-11 16:13:13 +02:00
Ivan Savenko
ad602573ff
Merge pull request #3600 from dydzio0614/sod-fly
Fix SoD fly mechanics
2024-02-11 12:26:20 +02:00
Alexander Wilms
54b44aa5e8 Re-add virtual that was accidentally removed 2024-02-10 20:46:23 +01:00
Alexander Wilms
522cb571b3 Remove redundant virtual specifiers
`grep -nr virtual | grep -v googletest | grep override > ../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(":")
        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-10 20:46:13 +01:00
Dydzio
4e927d6417 Fix missing gold component in "join for money" dialog 2024-02-07 21:57:25 +01:00
Dydzio
fd9810adf4 Working SoD version of fly 2024-02-07 19:27:02 +01:00
Ivan Savenko
18f9d29fd2 Fix typo 2024-02-07 00:15:20 +02:00
Ivan Savenko
9730b24214 Fix typo 2024-02-06 16:36:57 +02:00
Ivan Savenko
fd17133da3 Fix editor build 2024-02-06 00:40:26 +02:00
Ivan Savenko
1cecaf2bf5 Skip unresolved identifier from list of allowed heroes/artifacts in vmap 2024-02-05 22:26:53 +02:00
Ivan Savenko
a18f9d1e8d Added workaround for references to old 'torosar ' ID 2024-02-05 21:56:06 +02:00
Ivan Savenko
9e09fe08e1 Fixed duplicated hero check - was used too early, before hero type is
loaded
2024-02-05 21:55:48 +02:00