1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
Commit Graph

842 Commits

Author SHA1 Message Date
Dydzio
19453aab41 Add handling for yes/no dialogs that can be safely skipped by player 2024-04-17 01:08:27 +02:00
Ivan Savenko
b0334b381e
Merge pull request #3724 from IvanSavenko/fix_server_shutdown
Simplified and fixed server restart procedure
2024-04-09 16:13:19 +03:00
Ivan Savenko
f73243eb1c
Merge pull request #3669 from SoundSSGood/market-window-unified
Market window and widgets
2024-04-09 12:48:25 +03:00
Ivan Savenko
80acd7e77c Simplified and fixed server restart procedure:
- Replaced several assertions with runtime_error's to detect them in
release builds
- Removed multiple dispatchMainThread calls in server shutdown code to
simplify debugging and code flow
- Moved handling of gameplay shutdown and score calculation from
PlayerInterface to ServerHandler (not perfect, but better than before)
2024-04-07 14:19:57 +03:00
Andrii Danylchenko
c7b5d254d7 Fix castel interface closing by turn timer 2024-04-06 11:42:39 +03:00
SoundSSGood
433d55cac3 Market window unified 2024-03-25 12:44:34 +02:00
SoundSSGood
0813fdbf8c market window 2024-03-25 12:44:33 +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
d4bedd8d8d Fixed handling of match server crash 2024-02-04 19:58:09 +02:00
Laserlicht
9e7fbc3ca2
use localstate 2024-01-31 21:29:04 +01:00
Laserlicht
ebb2cce8b8
rework town portal 2024-01-31 02:30:10 +01:00
Laserlicht
cad0d5db16
consider unlimited replay (or not) 2024-01-27 15:02:03 +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
2c4cad7d9c Slight simplification of bonus system node class 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
b2527c3775 Do not attempt to answer non-existing query 2024-01-18 22:21:07 +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
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
Alexander Wilms
ccac73fb69 Remove trailing semicolons from more macros 2024-01-16 19:46:21 +00:00
Laserlicht
f7a31865f3
basic touch introduction implementation 2023-11-14 21:52:30 +01:00
Ivan Savenko
07472d3b05
Merge pull request #3147 from IvanSavenko/serialization_refactor
Serialization refactor - remove VLC from saved games
2023-11-11 17:35:01 +02:00
Ivan Savenko
864462b84a Reduce excessive updates of garrisons. Fixes selection reset in simturns 2023-11-09 00:01:48 +02:00
Ivan Savenko
4a7fa9bf8c Simplified CTypeList class 2023-11-08 22:05:36 +02:00
Ivan Savenko
0b4fa20bdc
Merge pull request #3152 from SoundSSGood/CAltar-widget
Altar rework
2023-11-08 13:42:00 +02:00
Ivan Savenko
86a3806bec MetaString refactor to eliminate integer usage for identifiers
- entity names are now stored and serialized as text ID's
- added helper methods for convenience to get entities names to
metastring
2023-11-07 22:47:10 +02:00
SoundSSGood
75ebd954af Creatures altar & Artifacts altar 2023-11-06 14:31:32 +02:00
Ivan Savenko
10e50548e7 Converted Component class to use VariantIdentifier instead of int 2023-11-02 12:00:04 +02:00
SoundSSGood
ab2f6abb87 ArtifactLocation now use ID for artHolder identification part2 2023-10-29 17:46:13 +02:00
Ivan Savenko
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
Johannes Schauer Marin Rodrigues
a1a5bc28c2
convert line endings from CRLF (Windows) to LF (Linux/Unix)
Mixed line endings cause problems when exporting patches with
git-format-patch and then trying to "git am" a patch with mixed and
non-matching line endings. In such a situation git will fail to apply
the patch.

This commit runs the dos2unix tools on the remaining files with CRLF
(\r\n) line endings to convert them to line-feeds (\n) only.

Files that are Windows specific like *.vcxproj and *.props files were
not converted.

Closes: #3073
2023-10-19 16:23:21 +02:00
Laserlicht
f6071ed181
fix 2023-10-15 00:09:32 +02:00
Laserlicht
c96cc405ed
town now updates 2023-10-14 23:41:12 +02:00
nordsoft
d7d435dcb7 Add game pause 2023-10-08 16:03:57 +02:00
Ivan Savenko
39a92cdde3 Add query for dwellings dialog 2023-10-04 17:47:12 +03:00
Ivan Savenko
898733eed7 Added Query to track visit duration for Taverns and Markets 2023-10-04 17:47:12 +03:00
Ivan Savenko
e322d0a084
Merge pull request #2966 from IvanSavenko/simplify_ui_lock
Simplified locking of game UI state
2023-10-04 16:50:23 +03:00
Nordsoft91
c57d5545c2
Merge pull request #2971 from Nordsoft91/translations
Multi-language support for network game and for VMAPs
2023-10-02 20:41:42 +02:00
nordsoft
03c099d4fd First steps 2023-09-27 22:53:13 +02:00
Ivan Savenko
71ad9d6707 Fix crash on starting map as non-red player 2023-09-27 21:23:54 +03:00
Ivan Savenko
195320dcf2 Removed remaining references to 'pim' name 2023-09-27 18:50:01 +03:00
Ivan Savenko
0dcfd6e65c Removed optional locking in waitWhileDialog method 2023-09-27 18:44:08 +03:00
Ivan Savenko
d6b9fa8fbd Replaced CPlayerInterface::pim with CGuiHandler::interfaceLock
- Removed CPlayerInterface::pim since this lock does not actually
protects LOCPLINT but rather entire game UI state
- added more logical CGuiHandler::interfaceLock
- interface lock is now non-recursive and is locked only once by initial
caller that want to access GUI
2023-09-27 18:33:52 +03:00
Ivan Savenko
71a1ed816a
Merge pull request #2892 from Laserlicht/highscore_menu
Highscore Menu & end video
2023-09-27 15:48:47 +03:00
Laserlicht
242e0ffa4a
fix playername 2023-09-26 22:06:04 +02:00
Ivan Savenko
42030ed10f Fix hotseat 2023-09-26 17:28:50 +03:00
Ivan Savenko
49c148502b Correctly close dialogs on end of turn 2023-09-26 15:54:24 +03:00
Ivan Savenko
d257fb37f0 Use optional instead of Json for queries 2023-09-26 13:42:20 +03:00
Ivan Savenko
64c82c9133 Fixed UI locking in simturns 2023-09-26 13:42:20 +03:00
Laserlicht
c3373ea34c
code review 2023-09-25 18:06:40 +02:00
Laserlicht
8a0565eb9b
use vector 2023-09-23 22:15:05 +02:00