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

852 Commits

Author SHA1 Message Date
Ivan Savenko
16c7063eb4 Add '*' to list of characters banned for save game names 2024-06-04 14:11:22 +00:00
Ivan Savenko
2aec3cde2c Fix possible crash on replaying combat after manual run 2024-05-23 12:46:28 +00:00
Ivan Savenko
d1aa4ecd10
Merge pull request #4013 from IvanSavenko/shortcuts_additions
[1.5.2] Shortcuts additions
2024-05-21 14:18:55 +03:00
Ivan Savenko
d965226cbd Moved Exchange Window to new file, no functionality changes 2024-05-19 10:53:56 +00:00
Ivan Savenko
9bfe000724 Added semi-workaround method for network thread shutdown:
Currently closing game while network thread is waiting for something is
very bug-prone, since network thread may resume during shutdown and
access partially destroyed client state.

Now if exit has been requested, the very first step would be semi-
graceful shutdown of network thread (via exception throwing). This may
in theory skip some cleanup in non-RAII code, but since game is shutting
down this does not matters much.

This logic applies to:
- shutting down while network thread is waiting for dialogs
- shuttind down while network thread waiting for animations in combat
2024-05-18 11:04:10 +00:00
Ivan Savenko
1bc7c29111 Add workaround for visiting Altar of Sacrifice on 1.4 saves 2024-05-11 13:19:07 +00:00
Ivan Savenko
49691ef743 Unblock interface during turn of another human player 2024-04-30 17:51:31 +03:00
Ivan Savenko
26ffa3342b Fix locked UI on starting multiplayer game 2024-04-29 17:02:27 +03:00
Ivan Savenko
b54eede01c Always show dialog when player starts turn in multiplayer 2024-04-26 15:59:44 +03:00
SoundSSGood
25d2b468c3 CWindowWithArtifacts preparations 2024-04-23 16:06:58 +03:00
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