1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00
Commit Graph

584 Commits

Author SHA1 Message Date
Ivan Savenko
fd726523a2 Remove creations of custom animations in runtime 2024-07-19 10:08:50 +00:00
Ivan Savenko
2020d96070
Merge pull request #4071 from IvanSavenko/fix_rng_syncronization
[1.6] Fix potential desync if client uses different stdlib with different random number generators
2024-07-19 13:08:09 +03:00
Alexander Wilms
187b7b0517 Show debug message instead of warning if no .qm file for selected language exists 2024-07-18 20:44:24 +02:00
Alexander Wilms
6599db4461 Less noise when switching languages in launcher
* Check if .qm file exists
* Don't call installTranslator() for English

Fixes #4277
2024-07-18 20:44:24 +02:00
Ivan Savenko
d02251f6a8
Merge pull request #4263 from Alexander-Wilms/json-error
JsonParser::parse(): Print file name if there were errors while parsing
2024-07-18 21:28:44 +03:00
Ivan Savenko
662254155a Merge branch 'vcmi/master' into 'vcmi/develop' 2024-07-17 13:57:36 +00:00
Alexander Wilms
434371195d JsonNode constructors: Take fileName as argument
* Don't print JSON in JsonParser::parse() in case of errors
2024-07-17 13:50:59 +02:00
Ivan Savenko
63bcf7d83c Replaced most of usages of CRandomGenerator with vstd::RNG in library 2024-07-16 13:13:07 +00:00
Ivan Savenko
3134d8383c
Merge pull request #4207 from Laserlicht/map_format_additional
[1.6] Map format additional infos
2024-07-16 12:15:58 +03:00
altiereslima
39516b275e Update Portuguese Translation 2024-07-11 19:11:54 -03:00
Ivan Savenko
6b8f94e6e7 Merge remote-tracking branch 'vcmi/master' into develop 2024-07-11 17:43:44 +00:00
Dydzio
0ce96269f2 Update polish translation for launcher and map editor 2024-07-09 21:53:55 +02:00
Ivan Savenko
a98787be43 Regenerated translations 2024-07-09 14:03:50 +00:00
Ivan Savenko
b1a902809e
Merge pull request #4232 from cewbdex/cz-work
Translate cz
2024-07-09 17:02:05 +03:00
Ivan Savenko
af54342792
Merge pull request #4194 from kdmcser/beta
update Chinese translation
2024-07-09 17:01:53 +03:00
Kryštof Černý
e5e5ccb61a mapeditor cz translation work 2024-07-06 16:06:20 +02:00
Gigas002
b328a423a4
Update mapeditor/CMakeLists.txt
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-07-03 14:46:15 +00:00
Laserlicht
0dd36d3c4b
replace deprecated functions 2024-06-29 14:55:56 +02:00
Laserlicht
aa506e33b9 calendar 2024-06-29 14:24:40 +02:00
Laserlicht
caaec71b9f fix 2024-06-29 14:14:21 +02:00
Laserlicht
018127b236 set values for map editor and rmg 2024-06-29 14:01:25 +02:00
Laserlicht
02bd52041b extend map format 2024-06-29 13:13:59 +02:00
gigas002
71025f1aad Remove renamed icons 2024-06-29 00:55:25 +09:00
gigas002
6dcb41ca98 Embed mapeditor resources 2024-06-29 00:53:01 +09:00
Alexander Wilms
31e1d39f92 Fix issues introduced by fixing typos 2024-06-27 08:38:04 +00:00
kdmcser
7cb6194462 update Chinese translation 2024-06-26 22:26:37 +08:00
Alexander Wilms
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
Ivan Savenko
3bea383b59 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-21 12:58:36 +00:00
altiereslima
edf10d8174 Update Portuguese Translation (#4121)
* Update Portuguese Translation
2024-06-19 20:00:25 +00:00
altiereslima
c8aeee764b
Update Portuguese Translation (#4121)
* Update Portuguese Translation
2024-06-19 21:28:46 +03:00
Andrey Filipenkov
b5cc3e8dc6 [editor] fix crash on quit with an opened map 2024-06-13 21:35:30 +03:00
Andrey Filipenkov
9438c5f9f7 code style 2024-06-13 21:35:30 +03:00
Ivan Savenko
3bb7e0fd84
Merge pull request #4091 from Gigas002/mapeditor-embed-resources
Embed translations and icons for mapeditor
2024-06-11 22:23:47 +03:00
Ivan Savenko
b4c6906471 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-11 19:22:23 +00:00
Laserlicht
a7d5f97a80
update german 2024-06-10 21:54:37 +02:00
Ivan Savenko
67a92cf332 Regenerated Qt translations for map editor and launcher 2024-06-10 15:24:53 +00:00
Ivan Savenko
b76c58c0b0 Changed settings location for Qt apps to be in line with main game 2024-06-08 15:31:40 +00:00
gigas002
410ef23a49 Make translation directory before building the mapeditor 2024-06-06 20:33:41 +09:00
gigas002
c8aa8bb18d Fix qt5 mapeditor build 2024-06-06 07:24:49 +00:00
gigas002
2f19133638 Icons renaming refactoring 2024-06-06 02:04:36 +00:00
gigas002
958a2ef835 Fix missing translations 2024-06-05 21:46:42 +09:00
gigas002
de3dc929ac Add missing icons to mapeditor 2024-06-05 08:56:35 +00:00
gigas002
1bc1755cf6 Install icons on linux in loop 2024-06-05 08:19:12 +00:00
gigas002
d8c4d3654f Embed translations and icons for mapeditor 2024-06-05 04:52:17 +00:00
Ivan Savenko
b8beb4fb13 Fixes for various minor issues detected by Sonar Cloud 2024-06-01 11:48:30 +00:00
Ivan Savenko
df83fa33a1 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-05-31 09:34:21 +00:00
Ivan Savenko
5d6470e527
Merge pull request #4025 from IvanSavenko/shared_ptr_lib
[1.6] Use shared_ptr for library entities
2024-05-30 19:14:06 +03:00
mggk
167bce979e feat(translations): update french translation for map editor 2024-05-30 08:45:08 +00:00
godric3
c69150f984 fix victory/loss conditions widget 2024-05-26 22:50:26 +02:00
mggk
c26aae0030 feat(translations): update french translation for map editor 2024-05-24 23:00:51 +02:00
Ivan Savenko
7461df161c lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
Laserlicht
0c5fb8125f #2590 enable high dpi 2024-05-16 00:32:15 +02:00
Laserlicht
9628001f57 #3864 possibility to search in army setting 2024-05-16 00:24:58 +02:00
Laserlicht
284cc3460d mapeditor: add extension and open vcmi folder 2024-05-16 00:01:02 +02:00
Ivan Savenko
2f70c530fa
Merge pull request #3969 from altiereslima/beta
Update portuguese.json
2024-05-15 13:24:23 +03:00
altiereslima
f872406a08 Update portuguese.ts 2024-05-14 18:34:06 -03:00
godric3
ddb641c0ef map editor: fix seer visit mode input initialization 2024-05-13 23:00:13 +02:00
godric3
e7c03e3387 map editor: block remove visit info button if no info to remove 2024-05-13 22:40:26 +02:00
godric3
578800b3e3 map editor: fix prison hero selection 2024-05-11 21:54:24 +02:00
altiereslima
1486b0f9e6 Update Portuguese translation 2024-05-09 07:31:58 +00:00
Dydzio
9ba4667821 Update polish translations 2024-05-09 00:01:29 +02:00
Ivan Savenko
3ab8b609ed
Merge pull request #3884 from Laserlicht/german_update
update german translation
2024-05-06 19:15:06 +03:00
Laserlicht
090715f83c update german translation 2024-05-03 21:27:34 +02:00
altiereslima
1399d6ae7e Update portuguese.ts 2024-05-03 15:39:05 -03:00
altiereslima
335dabedff Update portuguese.ts 2024-05-03 15:27:41 -03:00
Ivan Savenko
3e23a55c66 Fix build 2024-04-23 17:15:59 +03:00
altiereslima
1aea0b570f Update Portuguese Translation 2024-04-10 21:13:44 -03:00
altiereslima
0321867e94 Create portuguese.ts 2024-04-07 15:44:10 -03:00
altiereslima
437ff290e2 Update CMakeLists.txt 2024-04-07 14:17:19 -03:00
Evgeny Malygin
25125f96da
Fix: licenses, pragma guards, StdInc 2024-03-29 07:48:52 +02:00
Ivan Savenko
1ef8452370
Merge pull request #3679 from godric3/map-editor-customize-hero-spells
map editor: Allow to customize hero spells
2024-03-28 13:17:27 +02:00
godric3
353435047f use GameConstants::SPELL_LEVELS 2024-03-24 19:02:39 +01:00
godric3
acceca0139 map editor: Allow to customize hero spells 2024-03-24 10:01:20 +01:00
DjWarmonger
3e959f3ad9
Merge pull request #3132 from vcmi/reward_select_all
Support for "selectAll" reward
2024-03-14 21:46:02 +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
43a1e691e4 Trying to satisfy Sonarcloud 2024-03-09 10:17:30 +01:00
Tomasz Zieliński
5ca3fd2d9c Restored previous solution, which is handled already. 2024-03-04 21:49:35 +01:00
Tomasz Zieliński
e7af9d5607 Code review fixes, Sonarcloud fixes 2024-03-04 21:23:17 +01: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
Ivan Savenko
00058ea609
Merge pull request #3649 from godric3/map-editor-fix-owner-selection
Map editor fix owner selection
2024-03-01 13:34:47 +02:00
Tomasz Zieliński
1b2d01c25f Add new map sizes & better layout 2024-03-01 12:15:04 +01:00
godric3
da91e90a7b map editor: dont suggest neutral owner for hero 2024-02-29 23:08:21 +01:00
godric3
51386db347 map editor: fix owner selection 2024-02-29 22:11:28 +01:00
Tomasz Zieliński
c87b0e6d65 Compile fix 2024-02-29 20:44:14 +01:00
Tomasz Zieliński
17fc1604ca Remove unused file 2024-02-29 20:20:35 +01:00
Tomasz Zieliński
fcbe399541 Cleanup 2024-02-29 20:12:46 +01:00
Tomasz Zieliński
74bd6d6075 Editor save & load template works 2024-02-29 20:05:20 +01:00
Tomasz Zieliński
2c32c770f7 First version that works in lobby 2024-02-29 12:45:08 +01: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
c3957c2c2a Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +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
Ivan Savenko
6e399eb21a Make some non-const static variables const or constexpr 2024-02-12 13:22:54 +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
fd17133da3 Fix editor build 2024-02-06 00:40:26 +02:00
godric3
ec735aa959 Fix mine resource and productivity on map load, also made them non editable 2024-02-03 11:30:09 +01:00
godric3
b2cd92d937 Fix initializing map editor mod settings with more than one level of submods 2024-02-03 10:36:47 +01:00
godric3
dd004f0f6e Fix inspector using wrong editor for some values 2024-01-21 21:07:06 +01: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
db5539b39d Regenerated Qt translations 2024-01-19 21:21:23 +02:00
Ivan Savenko
ea1f05d15a Stabilization 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
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
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
Tomasz Zieliński
817ab1d53d Actually fix quest artifacts not getting banned at all 2024-01-16 17:16:03 +01:00
Tomasz Zieliński
285bafdbf4 Do not ban heroes in Prisons, they might be rehired after they are defeated.
Restore hero to pool if Prison fails to be placed.
2024-01-15 07:41:29 +01:00
kdmcser
f9252f2e90 Update Chinese translation for mapeditor 2024-01-13 17:57:36 +08:00
kdmcser
a2cda7f736 add Chinese mapeditor translation into its CMakeFiles.txt 2024-01-13 17:27:28 +08:00
Ivan Savenko
29eab0fdbe
Merge pull request #3476 from kdmcser/develop
Add Chinese translate for mapeditor
2024-01-12 21:54:22 +02:00
kdmcser
1d4862fc83 add Chinese translate for mapeditor 2024-01-12 23:12:54 +08:00
Alexander Wilms
781328f282 Convert C-style casts to the more verbose C++ style 2024-01-10 00:30:35 +00:00
Alexander Wilms
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00:00
godric3
78b73961d1 Fix saving map settings (allowed abilities, spells, arts and heroes) 2024-01-09 21:52:11 +01:00
Ivan Savenko
ef5686634d Removed no longer used code 2024-01-04 23:48:58 +02:00
Kryštof Černý
2bf0bb3ca4 cz consisteny 2023-12-29 16:56:04 +01:00
Kryštof Černý
c608a6dbdb
Apply suggestions from code review
Co-authored-by: Alexander Wilms <Alexander-Wilms@users.noreply.github.com>
2023-12-29 16:47:56 +01:00
Kryštof Černý
4429b20693 Update desktop files 2023-12-29 12:19:05 +01:00
Kryštof Černý
207b54fc6f Add Czech to cmakelists 2023-12-27 17:20:13 +01:00
Ivan Savenko
161fc6eb58
Merge pull request #3344 from cewbdex/czech-work
More Czech translation work
2023-12-24 19:28:29 +02:00
Ivan Savenko
9b40271ab1 Update editor and tests 2023-12-22 17:56:43 +02:00
Kryštof Černý
23c58861ff More Czech translation work 2023-12-18 17:15:50 +01:00
Kryštof Černý
a292bf1ce8 Translate editor 2023-12-14 11:10:27 +01:00
Laserlicht
4318e94bd0
regenerate translations; german update 2023-12-03 20:18:22 +01:00
Ivan Savenko
52050d0ef1 Fix build 2023-11-15 15:55:19 +02:00
Ivan Savenko
96c81be68e Win/loss conditions now use VariantIdentifier. Removed non-implemented
options
2023-11-15 15:55:19 +02:00
Ivan Savenko
10e110320b Remove std::vector<boo> from Json Serializer, simplify affected code 2023-11-15 15:55:18 +02:00
Ivan Savenko
eb167d94a6 Mod compatibility check is now in a separate class and not part of
ModHandler
2023-11-08 21:27:05 +02:00
Ivan Savenko
6b81012f31 Use variant identifier in netpacks where applicable 2023-11-08 14:00:23 +02:00
Tomasz Zieliński
c909bd766e Merge remote-tracking branch 'origin/develop' into fix_rmg_teams
# Conflicts:
#	lib/rmg/CMapGenOptions.cpp
#	lib/rmg/CMapGenOptions.h
2023-11-07 20:54:04 +01:00
gamestales-com
afc0d8665a #3151-windows-build-symlinks 2023-11-06 15:57:39 +01:00
Ivan Savenko
184f5a72cc Use toEntity/toXXX methods in Identifier instead VLC objects access 2023-11-03 16:03:29 +02:00
Ivan Savenko
b42f073f0c Stabilization 2023-11-01 18:26:57 +02:00
Ivan Savenko
8346d71c98 Remove more subID access 2023-11-01 14:44:05 +02:00
Ivan Savenko
7a09646009 Cleaned up dwelling randomization 2023-11-01 14:43:20 +02:00
Tomasz Zieliński
e105b23a37 Merge remote-tracking branch 'origin/develop' into fix_rmg_teams
# Conflicts:
#	Mods/vcmi/config/vcmi/rmg/heroes3/newcomers.JSON
#	Mods/vcmi/config/vcmi/rmg/heroes3/southOfHell.JSON
#	Mods/vcmi/config/vcmi/rmg/symmetric/2sm0k.JSON
#	Mods/vcmi/config/vcmi/rmg/symmetric/2sm2i(2).JSON
#	Mods/vcmi/config/vcmi/rmg/symmetric/3sb0b.JSON
#	Mods/vcmi/config/vcmi/rmg/symmetric/3sb0c.JSON
#	Mods/vcmi/config/vcmi/rmg/symmetric/5sb0a.JSON
#	Mods/vcmi/config/vcmi/rmg/symmetric/5sb0b.JSON
#	Mods/vcmi/config/vcmi/rmg/symmetric/7sb0b.JSON
#	Mods/vcmi/config/vcmi/rmg/symmetric/7sb0c.JSON
#	client/lobby/RandomMapTab.cpp
2023-10-30 20:08:13 +01:00
Ivan Savenko
29a78c14a2
Merge pull request #3113 from Alexander-Wilms/develop
Fix small issues
2023-10-30 11:02:28 +02:00
Andrii Danylchenko
b579ca8a33 #1912 trap, exception on adding duplicating hero 2023-10-29 11:03:37 +02:00
Tomasz Zieliński
07dac8b6d4 Works more or less 2023-10-28 20:30:38 +02:00
Alexander Wilms
a6db82f6f1 mapeditor/inspector/inspector.cpp: Directly assign to the "std::optional", without dereferencing it.
Assigning to an optional should directly target the optiona
2023-10-28 10:16:33 +00:00
nordsoft
b6b75beb29 Fixes for map editor
1) fix owner serialization for hero placeholder
2) fix roads/rivers layout
3) fix lasso
2023-10-24 23:58:26 +02:00
Ivan Savenko
3880ea58b9 Merge branch 'josch/dos2unix' into develop 2023-10-22 18:39:03 +03:00
Ivan Savenko
3867e512f7
Merge pull request #3064 from IvanSavenko/bonus_metaidentifier
Type-safe bonus system
2023-10-22 18:34:12 +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
b394158dc9 Bonus Source ID now uses metaidentifier 2023-10-22 16:55:18 +03:00