Ivan Savenko
4aa73b40c9
Split CTownHandler into smaller chunks
2024-07-21 18:21:48 +00:00
Ivan Savenko
1aa391fdf8
Split CGeneralTextHandler file into 1 file per class form
...
All text processing code is now located in lib/texts.
No changes other than code being moved around and adjustment of includes
Moved without changes:
Languages.h -> texts/Languages.h
MetaString.* -> texts/MetaString.*
TextOperations.* -> texts/TextOperations.*
Split into parts:
CGeneralTextHandler.* -> texts/CGeneralTextHandler.*
-> texts/CLegacyConfigParser.*
-> texts/TextLocalizationContainer.*
-> texts/TextIdentifier.h
2024-07-20 12:55:17 +00:00
Ivan Savenko
5178e4842e
Moved generation of new rumors to server
2024-07-16 13:13:39 +00:00
Alexander Wilms
31e1d39f92
Fix issues introduced by fixing typos
2024-06-27 08:38:04 +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
b4c6906471
Merge branch 'vcmi/beta' into 'vcmi/develop'
2024-06-11 19:22:23 +00:00
Laserlicht
9c1ce214fc
thievesGuild support
2024-05-30 21:58:35 +02: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
Ivan Savenko
7461df161c
lib now uses shared_ptr for entities. Removed manual memory management.
2024-05-17 15:04:05 +00:00
Ivan Savenko
84bc6c42db
Added 'Serializeable' base class for classes serializeable by pointer
2024-05-16 18:40:59 +00:00
Ivan Savenko
8353bca34f
Small refactoring of adventure map spell casting:
...
- Removed duplicated checks for DD possibility
- Moved most of spell-specific code from AdventureMapInterface to library
code
- AdventureSpellMechanics class now provides methods to check whether
spellcast is possible, similarly to battle spells
- If it is not possible to cast adventure map spell (e.g. no mana or no
move points) game will show infowindow immediately on clicking spellbook
instead of on cast attempt
- If hero does not have movement points for a DD, game will show correct
error message
- Added game settings 'dimensionDoorFailureSpendsPoints' due to
discovered H3 logic
2024-04-10 20:04:08 +03:00
Dydzio
ecb2bcb2db
Fix TODO comments
2024-04-01 21:58:17 +02:00
Dydzio
3f94d316cb
Fix cursor & add way to access danger info for HotA-like DD cursor
2024-04-01 20:18:35 +02:00
Dydzio
3bb66de551
Serverside validation, setting for terrain compatibility before cast etc
2024-04-01 18:12:38 +02:00
Dydzio
e69c096f94
Move dimension door FoW limit check to lib
2024-04-01 15:13:18 +02:00
Dydzio
4f0a286167
Fix checks for tile visibility in tile click/hover handlers
2024-03-27 22:06:31 +01:00
Dydzio
982e67cea8
Working version of SoD dimension door spell
2024-03-24 23:58:04 +01:00
Ivan Savenko
7247038458
Merge pull request #3574 from SoundSSGood/altar-fixes
...
Artifacts altar related fixes
2024-02-01 22:27:41 +02:00
SoundSSGood
a42b60feb9
suggested changes
2024-02-01 13:28:08 +02:00
Ivan Savenko
2e4895766a
Implemented tracking of objects destroyed by players
2024-01-31 01:37:33 +02:00
SoundSSGood
652f009181
arts altar - arts holder
2024-01-27 15:28:21 +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
d5c4478816
Remove most of non-const access to VLC entities
2024-01-19 13:54:49 +02:00
Alexander Wilms
f08c6d1ce9
Fix issues created by type replacement script
2024-01-17 14:33:02 +00: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
dd88220b7c
Fixed potentially uninitialized class member
2023-12-17 19:44:45 +02:00
Ivan Savenko
76956cfe3a
Merge pull request #3188 from IvanSavenko/remove_identifier_implicit_int_conversion2
...
Remove implicit conversion of identifier to integer
2023-11-16 17:26:32 +02:00
Ivan Savenko
13763cad8e
Remove few more implicit conversions
2023-11-15 15:55:19 +02:00
Ivan Savenko
0842f5afee
Removed remaining usages of std::vector<bool>
2023-11-15 15:55:18 +02:00
Ivan Savenko
301ac2457a
Cleanup
2023-11-13 17:48:55 +02:00
Ivan Savenko
20ef3a69e7
Fix most of memleaks discovered by valgrind
2023-11-13 16:27:15 +02:00
SoundSSGood
7e6ab5e87b
fix test & fix build & suggested changes
2023-10-29 17:46:14 +02:00
SoundSSGood
3c5527a222
ArtifactLocation now use ID for artHolder identification part3
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
Ivan Savenko
ac925bb786
Renamed new types for consistency with code style
2023-10-22 16:55:19 +03:00
Ivan Savenko
80e6485965
MetaIdentifier now uses std::variant internally
2023-10-22 16:55:19 +03:00
Ivan Savenko
77facf9387
Implement missing functions, fixes linking errors
2023-10-22 16:54:56 +03:00
Ivan Savenko
0a10fc30b8
(lib) Bonus subtype is now stored as metaidentifier that can store any
...
other identifier inside it
2023-10-22 16:54:43 +03:00
Ivan Savenko
dd841bdaa7
Use enum instead of mix of bool's and int's for tile reveal
2023-10-16 00:12:38 +03:00
Ivan Savenko
98fd939ed6
Cartographer/Observatory is now configurable object
2023-10-16 00:12:38 +03:00
nordsoft
8335fffaea
Fix rumors
2023-10-11 00:58:32 +02:00
nordsoft
0ac893b80f
Rumors meta string
2023-09-27 23:22:45 +02:00
Ivan Savenko
41210c1dbf
Client-side support for multiple battles
2023-09-06 16:03:47 +03:00
Ivan Savenko
fc4dfda00f
Added support for concurrent battles to gamestate and server
2023-09-06 16:03:02 +03:00
Ivan Savenko
edd029c79c
Replace "currentPlayer" from gamestate with "activePlayers"
...
- Allows multiple active players at once, e.g. simturns
- Cleared up validation of netpacks by server, e.g. always check for
pack sender
2023-08-25 18:56:15 +03:00
Ivan Savenko
0240ee886d
Converted (almost) all namespace enum's to enum classes
2023-08-25 13:38:02 +03:00
Ivan Savenko
62cd8b12d4
Converted several namespace enums to enum class
2023-08-25 13:38:02 +03:00
Ivan Savenko
ec8d31bbfc
First step at unifying game identifiers code
2023-08-25 13:38:01 +03:00
nordsoft
3c9c302fd2
TurnTimerInfo
2023-08-14 02:16:25 +04:00
nordsoft
4b1224ec8c
Implement turn timer feature
2023-08-13 14:07:48 +04:00