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

186 Commits

Author SHA1 Message Date
Ivan Savenko
4aa73b40c9 Split CTownHandler into smaller chunks 2024-07-21 18:21:48 +00: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
df83fa33a1 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-05-31 09:34:21 +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
f3de2cfe1c Removed broken & unused serialization of player interface and AI 2024-05-17 16:35:53 +00:00
Ivan Savenko
84bc6c42db Added 'Serializeable' base class for classes serializeable by pointer 2024-05-16 18:40:59 +00: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
45c971a405 Replace throws() with nothrow 2024-02-14 12:07:07 +02: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
8346d71c98 Remove more subID access 2023-11-01 14:44:05 +02:00
Alexander Wilms
f01ec55d21 Use the "nullptr" literal.
"nullptr" should be used to denote the null pointer
2023-10-27 18:18:59 +00: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
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
8c0d78f1d9 Added initiator-player to packs that add/remove/move objects 2023-09-19 19:24:34 +03:00
Ivan Savenko
c8e6a7cd27 Fixed most common cases of movement actions 2023-09-16 20:07:26 +03:00
Ivan Savenko
f39fbe5151
Merge pull request #2757 from IvanSavenko/filesystem_refactor
Filesystem refactor - part 1
2023-09-07 10:51:02 +03:00
Ivan Savenko
036df2e0ad Support multiple battles in AI 2023-09-06 16:03:46 +03:00
Ivan Savenko
8dfdfffd87 Use ResourcePath for audio files 2023-09-04 18:22:34 +03:00
nordsoft
98f7ed9dfd Implement player start turn query 2023-08-28 18:56:36 +04:00
Ivan Savenko
62cd8b12d4 Converted several namespace enums to enum class 2023-08-25 13:38:02 +03:00
Ivan Savenko
013417fb7e Code cleanup 2023-08-21 17:55:49 +03:00
Ivan Savenko
aed8c411fc Minor rework & cleanup of combat replays 2023-07-27 19:25:55 +03:00
Ivan Savenko
1cbc6457ce Fix possible assertion failure on removing non-owned town 2023-07-04 20:28:02 +03:00
Ivan Savenko
7db67a3101 int3 now has proper hasher function 2023-04-20 22:04:24 +03:00
Konstantin
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
nordsoft
ce3028bd73 Intermediate commit 2023-04-06 19:34:07 +04:00
Konstantin
4617ce10e5 vcmi: allow showing more than one components in infobar
Up to 8, AFAIK. So, we can show multi-reward in infobox now.
One issue remain - cannot dynamically choose components size
based on text size.
2023-03-11 21:41:57 +03:00
Ivan Savenko
11e4d84749 Implemented View Earth / View Air spells 2023-03-05 17:48:02 +02:00
Ivan Savenko
2855606a88 Enabled & fixed -Woverloaded-virtual warning from gcc/cland
- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
2022-12-07 21:50:45 +02:00
Andrey Filipenkov
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
Dmitry Orlov
ea2931c6ea Fix: Get rid of 'Tile is not visible' error message 2022-01-30 12:31:07 +02:00
AlexVinS
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
Dydzio
545b07b8b8 Thread interruption fixes 2019-05-26 17:55:22 +02:00
Andrii Danylchenko
ffdf5ad180 AI: fix hero exchange logic, allow splitting weakest-fastest creature, refactoring 2019-03-17 11:54:02 +02:00
Andrii Danylchenko
35f696b695 AI pathfinding const api and updatePaths 2019-02-10 15:25:56 +02:00
AlexVinS
da20aa2388 Use the same cost value in Pathfinder and fuzzy evaluations. 2019-01-17 10:54:41 +03:00
Andrii Danylchenko
8fee46de7c AI: town portal support 2019-01-17 10:40:23 +03:00
Andrii Danylchenko
edc5abe49d AI: tweak explore to work with new pathfinding. 2019-01-07 14:07:36 +02:00
Andrii Danylchenko
5d022ba77c AI: CompleteQuest goal and summon boat spell support 2018-12-23 15:49:26 +03:00
Andrii Danylchenko
e1b922f7b8 AI goals refactoring (#524) 2018-12-01 11:30:37 +03:00
Andrii Danylchenko
49c872e4ec AI: replace SectorMap with new PathfinderManager 2018-10-06 16:35:31 +03:00
AlexVinS
99f167a44c AIhelper should be owned by AI instance. 2018-09-02 18:04:38 +03:00
Dydzio
3961b4ac93 Rename GetObj->VisitObj to reflect new functionality 2018-08-10 16:45:00 +02:00
Dydzio
2365946b62 Elementar GetObj - first attempt 2018-08-09 13:17:58 +02:00
DJWarmonger
a827c083d8 Remove useless code 2018-08-06 21:54:17 +02:00
DJWarmonger
36e44adc8c rebase 2018-08-06 10:02:59 +02:00
DJWarmonger
f5ba181173 Refactoring: Move SectorMap to separate file 2018-08-04 21:59:30 +02:00
DJWarmonger
6615870045 Rebase 2018-08-04 15:59:59 +02:00