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

7198 Commits

Author SHA1 Message Date
Ivan Savenko
ff33fbd3a0
Merge pull request #4480 from IvanSavenko/update_prebuilts
Update ffmpeg
2024-08-21 15:57:50 +03:00
SoundSSGood
2e3e6b1553 market->getObjInstanceID() 2024-08-21 01:01:23 +03:00
Laserlicht
d8869a33da remove resource 2024-08-20 22:45:11 +02:00
Ivan Savenko
efcf1e1ba9 Add .ogv (HD Edition) as recognized extension for video 2024-08-20 19:23:55 +00:00
Laserlicht
01e55beef1
Merge branch 'develop' into resource_generation 2024-08-20 20:26:52 +02:00
Laserlicht
01c14ae9ce
Merge branch 'develop' into extended_statistic 2024-08-20 20:25:16 +02:00
SoundSSGood
58bb2b58e3 IMarket suggestions
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-08-20 18:49:48 +03:00
SoundSSGood
cd7ebea9e3 cleanup unused code 2024-08-20 18:49:47 +03:00
SoundSSGood
39bb6d5f39 IMarket now able to store artifacts 2024-08-20 18:49:47 +03:00
SoundSSGood
fd45b5144d IMarket serializeable 2024-08-20 18:49:47 +03:00
Ivan Savenko
85f6030c7c
Merge pull request #4318 from IvanSavenko/upscaled_render
Support for xBRZ upscaling filter
2024-08-20 14:23:30 +03:00
Laserlicht
c2b181dc0c Merge branch 'develop' into resource_generation 2024-08-19 23:43:24 +02:00
Laserlicht
17cb45f692 fix 2024-08-19 23:33:23 +02:00
Laserlicht
fff0159ef6 resource generation 2024-08-19 23:18:14 +02:00
Ivan Savenko
6fa2bb7e91 Deprecate previously hardcoded buildings 2024-08-19 11:47:13 +00:00
Ivan Savenko
22a126cf2d Restored replacement of town building bonuses via building upgrade 2024-08-19 11:47:13 +00:00
Ivan Savenko
2f3f3c21df Rename town building types to more clear names 2024-08-19 11:47:13 +00:00
Ivan Savenko
abfb467f68 Cleanup old code, add compatibility for 1.5 mods 2024-08-19 11:47:13 +00:00
Ivan Savenko
01a9509ccb Remove unused code, reduce includes 2024-08-19 11:47:13 +00:00
Ivan Savenko
f1e63792f0 Greatly simplify town buildings logic 2024-08-19 11:47:13 +00:00
Ivan Savenko
57430c101f Extracted common properties of buildings into a shared file 2024-08-19 11:47:13 +00:00
Ivan Savenko
5b49c7525a
Merge pull request #4475 from MichalZr6/CSpellHandler_allow_lowercase_x
Allow lowercase 'X' in spellRangeInHexes JSON property
2024-08-18 21:51:36 +03:00
MichalZr6
e7b94014e1 allow lowercase 'X' in spellRangeInHexes 2024-08-18 18:46:54 +02:00
Ivan Savenko
f0448acaa3 TBB is now a dependency of lib. Implemented multithreaded xBRZ scale 2024-08-17 15:25:26 +00:00
Ivan Savenko
4171026035 First iteration of upscaled rendering 2024-08-17 15:25:25 +00:00
Warzyw647
0f7c9e7657 Fix config setting blackMarketRestockPeriod.
When set to x it was restocking on all days except every x days.
2024-08-17 11:59:15 +02:00
Ivan Savenko
be42a8c58b Try to fix saving of corrupted random maps 2024-08-15 16:03:00 +00:00
Ivan Savenko
d09fb07362 Use throwing ::at to prevent undefined behavior 2024-08-15 13:14:51 +00:00
Laserlicht
5743f151a1 icon drawing 2024-08-15 00:21:02 +02:00
Laserlicht
b693ce120a code review 2024-08-14 22:36:54 +02:00
Laserlicht
a42afa2910 code review 2024-08-14 21:51:08 +02:00
Laserlicht
39aaa6fe32 data to clipboard; simplify types 2024-08-14 21:01:37 +02:00
Laserlicht
81b1704e39
Merge branch 'vcmi:develop' into extended_statistic 2024-08-14 20:32:47 +02:00
Laserlicht
7964f77f27 fix dragon utopia 2024-08-14 19:55:14 +02:00
Laserlicht
ec2163b974 add val; stat at end turn; events 2024-08-14 19:24:40 +02:00
Ivan Savenko
72896d4ed5 Added (mostly) complete schema for validation of rewardable 2024-08-14 17:04:44 +00:00
Ivan Savenko
2151a7fc88 Moved configuration of rewardable town building to 'configuration' entry 2024-08-14 17:04:43 +00:00
Ivan Savenko
fc7554797c Fix reset of configurable building state on new week 2024-08-14 17:04:43 +00:00
Ivan Savenko
19838e2654 Fix auto-visit of configurable objects on new day 2024-08-14 17:04:42 +00:00
Ivan Savenko
162535e6d8 Workaround on crash on visiting configurable building with "bonus"
duration
2024-08-14 17:03:25 +00:00
Ivan Savenko
67132b3e7f Fixed visitation of configurable town buildings by newly recruited heroes
and on building construction
2024-08-14 17:03:25 +00:00
Ivan Savenko
abdb23f78f Removed getMappedValue methods in favor of existing vstd method 2024-08-14 17:03:25 +00:00
Ivan Savenko
f4a78bb31f
Merge pull request #4439 from IvanSavenko/event_timing
Trigger map and town events on start of player turn
2024-08-14 19:01:17 +03:00
Ivan Savenko
49c5f650f7
Merge pull request #4437 from IvanSavenko/battle_sides
Unified handling of battle sides ID's
2024-08-14 18:37:05 +03:00
Ivan Savenko
350749a1a6 Removed no longer used netpacks 2024-08-14 14:13:50 +00:00
Ivan Savenko
26fdaacbe5 Map and town events are now processed on start of player turn instead of
on start of new day, in line with H3
2024-08-14 14:13:50 +00:00
Ivan Savenko
5523e08cb7 Players affected by event is now stored as std::set instead of bitmask 2024-08-14 14:13:49 +00:00
Ivan Savenko
5c7c4a7810
Merge pull request #4443 from IvanSavenko/fix_sonar
Fix miscellaneous issues discovered by Sonar
2024-08-14 17:12:27 +03:00
Ivan Savenko
6ab97bad7e
Merge pull request #4433 from IvanSavenko/spell_cleanup
Minor cleanup of SpellHandler
2024-08-14 17:05:22 +03:00
Ivan Savenko
ac717d57ea
Merge pull request #4445 from IvanSavenko/fix_ranged_attack
Do not try to shoot at 2nd hex of wide creatures
2024-08-14 17:05:12 +03:00
Ivan Savenko
38311244a4
Merge pull request #4402 from Laserlicht/8th_creature
support for 8th creature (Factory)
2024-08-14 17:04:32 +03:00
Ivan Savenko
1fb8ab5f70
Merge pull request #4429 from Laserlicht/regions
defining own regions extend
2024-08-14 17:04:13 +03:00
Ivan Savenko
cd6d55fe75 Do not try to shoot at 2nd hex of wide creatures 2024-08-14 10:38:59 +00:00
Laserlicht
e83a30ea11 darkened; added values 2024-08-14 02:49:54 +02:00
Laserlicht
cac778ffed fix 2024-08-13 00:50:10 +02:00
Laserlicht
9e9a6f1c5f
Merge branch 'develop' into extended_statistic 2024-08-13 00:49:51 +02:00
Laserlicht
47330653da basic diagram functionality 2024-08-12 21:47:59 +02:00
Ivan Savenko
97f1a310df Fix miscellaneous issues discovered by Sonar 2024-08-12 18:26:30 +00:00
Laserlicht
37283e51c3 basic diagram 2024-08-12 20:14:36 +02:00
Laserlicht
da38ad5f5c
code review 2024-08-12 17:57:34 +02:00
Ivan Savenko
39d3217d20
Merge pull request #4428 from Laserlicht/vcmp_rework
VCMP format -> change to zip
2024-08-12 17:20:22 +03:00
Ivan Savenko
170330109f
Merge pull request #4415 from godric3/map-editor-validate-spells
map editor: check hero and town spells during mod assessment
2024-08-12 17:20:01 +03:00
Ivan Savenko
f7c82d7909
Merge pull request #4400 from kdmcser/support_0_spellpower_and_knowledge
support configure for minimal primary skill values
2024-08-12 17:16:46 +03:00
godric3
78aa376d50 introduce getModScope into AObjectTypeHandler 2024-08-12 13:58:03 +02:00
godric3
0ef42a1d3d introduce modScope into ObstacleInfo 2024-08-12 13:57:27 +02:00
Laserlicht
a13d5fe3b7 review 2024-08-12 01:20:55 +02:00
Ivan Savenko
84f29183c8
Merge pull request #4391 from Laserlicht/bank_support
[HotA] Bank support
2024-08-12 00:24:32 +03:00
Ivan Savenko
2a05fbdd50 Unified handling of battle sides ID's
- Replaced BattleSide namespace-enum with enum class
- Merged two different BattleSide enum's into one
- Merged BattlePerspective enum into BattleSide enum
- Changed all places that use integers to represent battle side to use
BattleSide enum
- Added BattleSideArray convenience wrapper for std::array that is
always 2-elements in size and allows access to its elements using
BattleSide enum
2024-08-11 20:54:44 +00:00
Laserlicht
f42f1de347 extended statistic: Button and data transfer 2024-08-11 22:21:13 +02:00
Andrii Danylchenko
78dea24017 Visual logger colored text 2024-08-10 19:13:09 +03:00
godric3
c34956e912 introduce getModScope method toEntity class and subclasses 2024-08-10 16:08:04 +02:00
Laserlicht
d2e24e01b4
Merge branch 'develop' into regions 2024-08-10 15:50:45 +02:00
kdmcser
b402619351 not use separate function 2024-08-10 21:48:16 +08:00
Laserlicht
23438590c5 defining own regions 2024-08-10 15:27:22 +02:00
Laserlicht
661c374bf2 fixes & code review 2024-08-10 15:01:17 +02:00
Laserlicht
772224e46c enable translation for vcmp 2024-08-10 14:28:50 +02:00
Ivan Savenko
a4fa409d1f Parse spell range on load instead of on every cast attempt 2024-08-10 12:22:21 +00:00
Laserlicht
b16f721b39 respect headeronly 2024-08-10 13:57:13 +02:00
Laserlicht
d97fdfdefa zip format VCMP 2024-08-10 13:30:03 +02:00
Andrii Danylchenko
47c77826c3 Visual logger map texts 2024-08-10 13:04:35 +03:00
Andrii Danylchenko
9ffd6368d4 Add visual logger for battle interface 2024-08-10 10:54:20 +03:00
Andrii Danylchenko
8e79263b21
Merge pull request #4323 from vcmi/battle-ai-fixes
Battle ai fixes
2024-08-10 10:48:35 +03:00
Laserlicht
170f375179 code review 2024-08-10 00:29:30 +02:00
Ivan Savenko
a3b2c49c79 Remove leftovers from old VLC serialization code 2024-08-09 22:26:46 +00:00
Laserlicht
b4c25a148a
Merge branch 'develop' into bank_support 2024-08-09 23:36:59 +02:00
Ivan Savenko
85cf33e5a8
Merge pull request #4422 from MichalZr6/fix_unsigned_to_signed
blockingDialog functions: the `answer` parameter can be negative
2024-08-09 15:31:45 +03:00
Ivan Savenko
7d30b660ea
Merge pull request #4359 from Laserlicht/statistic
Writing some statistics and make it possible to export via csv
2024-08-09 15:31:13 +03:00
Ivan Savenko
ffb8efc415
Merge pull request #4225 from godric3/map-editor-town-configuration-improvements
Map editor town configuration improvements (buildings, spells, events)
2024-08-09 15:26:33 +03:00
MichalZr6
ffaaa7da15 blockingDialog functions: the answer parameter can be negative 2024-08-09 00:28:28 +02:00
kdmcser
79f5d260a4 use primary skill array 2024-08-08 22:03:54 +08:00
Laserlicht
e0ab760a2f code review 2024-08-07 21:26:22 +02:00
Ivan Savenko
65af198fbf
Merge pull request #4341 from vcmi/force_portal_connection
Add RMG connection option "forcePortal"
2024-08-07 13:07:45 +03:00
Laserlicht
475b769eef fix ToW 2024-08-07 01:35:50 +02:00
Laserlicht
14bcfad7b0 fix upgrade 2024-08-06 23:28:45 +02:00
Ivan Savenko
a4dd510735
Merge pull request #4358 from IvanSavenko/integer_divide
Add helper functions for integer division rounding
2024-08-06 18:10:03 +03:00
Ivan Savenko
3b6ff46d2b
Merge pull request #4360 from IvanSavenko/terminate_handler
Enabled terminate handler and call stack writing on all platforms
2024-08-06 18:09:51 +03:00
Laserlicht
758617e2df
order 2024-08-06 09:39:16 +02:00
Laserlicht
0c3778feda
id 2024-08-06 09:35:06 +02:00
Laserlicht
abd1a1940a fix recruitment & icons 2024-08-06 01:02:38 +02:00
Laserlicht
ebeeff5aa3 abstraction layer 2024-08-05 23:51:07 +02:00
Laserlicht
3afddbbf29 replaced constant 2024-08-05 23:03:19 +02:00
Laserlicht
1a06a2cc44 basic 8th creature support 2024-08-05 21:15:47 +02:00
kdmcser
87eb026184 support 0 spellpower and knowledge 2024-08-06 01:26:39 +08:00
Ivan Savenko
b7391f49f6 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-08-05 10:36:10 +00:00
Laserlicht
47327e1642 backend 2024-08-04 17:52:40 +02:00
Laserlicht
072af5bd6d basic support for bank 2024-08-04 15:44:57 +02:00
Laserlicht
611d5daa0f fix missing code + movement points used 2024-08-03 20:47:20 +02:00
Laserlicht
eca04cbc54 added 5 values 2024-08-03 19:53:05 +02:00
Laserlicht
de128eb471 add dwellings & expirience 2024-08-03 18:48:45 +02:00
Laserlicht
9d64059496 code review 2024-08-03 17:55:43 +02:00
Laserlicht
f0c0beb9e0
date according to iso8601 2024-08-03 16:39:46 +02:00
Ivan Savenko
81e6207df0 Add helper functions for integer division rounding
Added set of functions that perform integer division with different
rounding modes:
- divideAndCeil - rounds up to next integer
- divideAndRound - rounds to nearest integer
- divideAndFloor - rounds to previous integer (equivalent to default
division)

Intended for use in library, where usage of floating point might lead to
desync in multiplayer games.

Replaced some cases that I knew of, including recent handicap PR
2024-08-03 13:52:14 +00:00
Andrii Danylchenko
3d856bfa9d Merge remote-tracking branch 'origin/develop' into battle-ai-fixes 2024-08-03 12:54:25 +03:00
Laserlicht
58bfd27aad add some stats 2024-08-02 20:40:24 +02:00
Laserlicht
b3b7729a6c fix 2024-08-02 20:06:30 +02:00
Ivan Savenko
13b2008f79 Enabled terminate handler and call stack writing on all platforms
Attempt to get a bit more debug info from crashes. VCMI will now:
- use c++ terminate handler on any platform in release builds
- attempt to write call stack to log file using boost::callstack

Since I use std::set_terminate this will only affect c++ exceptions, e.g.
std::runtime_error and will not affect OS signals, e.g. SIGSEGV. Handling
signals is OS-specific and has a lot of limitations that I don't want to
investigate. Besides - most of our crashes are now caused by c++
exceptions.

Haven't tested on other platforms, but should at the very least write
exception information (`e.what()`) for all exceptions and function names
for methods exported from dll's (libvcmi.so & AI's). Possibly more, if
debug information is present.
2024-08-02 17:59:56 +00:00
Laserlicht
80dd97364a add additional statistic 2024-08-02 19:38:33 +02:00
Laserlicht
9ceb1c567d highscore refactoring 2024-08-02 19:37:46 +02:00
Ivan Savenko
5023e08ae8 Fix crash on testing for hero faction before deserializing hero type 2024-08-02 16:00:17 +00:00
Ivan Savenko
13108849ca Try to fix crash on transferring component of a composite artifact 2024-08-02 16:00:17 +00:00
Ivan Savenko
0ac1ef077d Workaround for hota witch hut preview 2024-08-02 16:00:07 +00:00
Ivan Savenko
8ce6bcdf3b Right-clicking dwellings will now show recruitable creatures (but not
their number) for all players
2024-08-02 15:03:25 +00:00
Laserlicht
86477c7b04 refactoring + values added 2024-08-02 01:18:39 +02:00
Laserlicht
33b2633775 refectoring: remove statsHLP 2024-08-02 00:04:41 +02:00
Laserlicht
f695f7038e cleanup 2024-08-01 23:56:06 +02:00
Laserlicht
06209d2556
Merge branch 'develop' into statistic 2024-08-01 23:37:45 +02:00
Laserlicht
2979bf1976 visitedRatio 2024-08-01 23:21:41 +02:00
Laserlicht
380d5bb05b refactoring & expanding 2024-08-01 22:36:32 +02:00
Laserlicht
4f0c3a3608
Merge branch 'develop' into handicap 2024-08-01 21:39:40 +02:00
Laserlicht
490f1bfee6 rework 2024-08-01 21:36:00 +02:00
Laserlicht
fb171ab3a2 statisic basic 2024-08-01 21:36:00 +02:00
Ivan Savenko
88eff2609b
Merge pull request #4332 from Laserlicht/campaign_highscores
fix campaign highscores
2024-08-01 21:16:50 +03:00
Tomasz Zieliński
4413f03276 Cleanup 2024-07-30 08:50:33 +02:00
Tomasz Zieliński
a7fa3c7d8b Ignore new connections for zone placement. 2024-07-30 05:07:05 +02:00
Laserlicht
f7376b8fd3
Merge branch 'vcmi:develop' into handicap 2024-07-29 23:10:20 +02:00
Laserlicht
48173ebfbf fix uninitialized var 2024-07-29 23:05:55 +02:00
Laserlicht
3e5df61946 code review 2024-07-29 22:54:42 +02:00
Tomasz Zieliński
d10711928f Allow connecting zone to itself (always through the portal) 2024-07-29 21:56:07 +02:00
Laserlicht
939dd62491
change variable name 2024-07-29 20:43:41 +02:00
Tomasz Zieliński
f4f416eb16 Add RMG option "forcePortal" 2024-07-29 20:36:23 +02:00
Ivan Savenko
48c92711f2 Fixed deserialization of new artifacts (and possibly some other objects)
Was broken in my previous PR, since pointer graph serialization was
enabled by default, leading to deserializationFix triggering on netpack
apply.

Cleaned up / clarified code
2024-07-29 18:19:15 +00:00
Ivan Savenko
15f37f8c4b Fix possible crash on invalid SPELL_LIKE_ATTACK ability 2024-07-29 17:13:31 +00:00
Ivan Savenko
434a2fb0fb Explicitly specify to use ranged or melee attack for damage estimation 2024-07-29 17:13:31 +00:00
Ivan Savenko
74fea5109b Show non-learnable spells from rewardable object as greyed-out 2024-07-29 17:13:31 +00:00
Ivan Savenko
f9348fc84a Do not hide spells from reward if hero can't learn them 2024-07-29 17:13:31 +00:00
Ivan Savenko
b6c22b2053 Fix typo 2024-07-29 17:13:31 +00:00
godric3
fa3fef8a0f change town events to vector + use getDefaultAllowed for spells 2024-07-28 16:28:21 +02:00
godric3
5578346dac map editor: Allow to customize town events 2024-07-28 16:28:21 +02:00
godric3
7aca2efb35 map editor: Allow to customize town spells 2024-07-28 16:28:21 +02:00
Andrii Danylchenko
9edb0afff8 BattleAI: fix dragonbreath retaliation 2024-07-28 14:41:32 +03:00
Ivan Savenko
6ac3752325
Merge pull request #4330 from Laserlicht/spellbook
check spellbook
2024-07-27 19:34:50 +03:00
Laserlicht
53c0d20a57 fix campaign highscores 2024-07-26 20:36:52 +02:00
Laserlicht
e46f5f705b
better approach 2024-07-26 20:34:47 +02:00
Ivan Savenko
ec63f3eeac
Merge pull request #4314 from IvanSavenko/tower_target_selection
Implemented simple target selection logic for arrow towers
2024-07-26 14:22:13 +03:00
Laserlicht
2e2d8f8833 fix 2024-07-26 02:24:53 +02:00
Laserlicht
977d8e041a
generate at least one resource / creature 2024-07-26 00:55:47 +02:00
Laserlicht
ec005593d3 growth handicap 2024-07-25 23:04:59 +02:00
Laserlicht
bfd1e8a7c8 calculate income 2024-07-25 02:51:00 +02:00
Laserlicht
268e0c8c44 change data structure 2024-07-25 00:28:49 +02:00
Laserlicht
832e1531fc handycap percent 2024-07-25 00:28:49 +02:00
Laserlicht
af2b6a0051 show handicap resources 2024-07-25 00:28:49 +02:00
Laserlicht
8edf77afcc basic handicap support 2024-07-25 00:28:01 +02:00
Andrii Danylchenko
dbcd7677ac
Merge pull request #4313 from vcmi/nkai-whirlpool
NKAI: whirlpool
2024-07-24 00:03:11 +03:00
Andrii Danylchenko
33e0eeaa8a BattleAI: fix dragon breath 2024-07-22 20:39:32 +03:00
Ivan Savenko
37cf788079
Merge pull request #4317 from IvanSavenko/split_townhandler
Split CTownHandler into smaller chunks
2024-07-22 17:42:48 +03:00
Ivan Savenko
e8aa6efbb9
Merge pull request #4261 from kaja47/shrinkage
Reduce size of Bonus struct from 320 bytes to 296 bytes.
2024-07-22 17:12:08 +03:00
K
c1e6bbddfe Reduce size of Bonus struct from 320 bytes to 296 bytes.
- Internal enums were resized to occupy single byte.
- Duration bitmask uses 16 bit integer directly instead of std::bitset<11> which consumed 8 bytes.
- Fields shuffled to minimise padding and keep the most useful data on first 2 cache lines.
2024-07-22 14:59:31 +02:00
Ivan Savenko
4aa73b40c9 Split CTownHandler into smaller chunks 2024-07-21 18:21:48 +00:00
Andrii Danylchenko
683c363946 NKAI: whirlpool 2024-07-21 17:20:54 +03:00
Ivan Savenko
5bd9a32d97 Implemented simple target selection logic for arrow towers 2024-07-21 13:16:33 +00:00
Ivan Savenko
550540f8ab
Merge pull request #4316 from IvanSavenko/crashfixes
Crashfixes
2024-07-21 16:15:28 +03:00
Ivan Savenko
31738e8f90 Always track already serialized pointers to avoid infinite recursion on
sending complex objects
2024-07-20 18:29:41 +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
2d3734656d Fix test 2024-07-19 12:17:06 +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
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
d55c4e3973
Merge pull request #4275 from IvanSavenko/music_modding
Additional options for music modding
2024-07-18 21:28:04 +03:00
Ivan Savenko
662254155a Merge branch 'vcmi/master' into 'vcmi/develop' 2024-07-17 13:57:36 +00:00
Alexander Wilms
b605dea6db JsonNode::JsonNode(): Also use reference for fileName argument in method definition 2024-07-17 14:37:58 +02:00
Alexander Wilms
c484244ba0
JsonNode::JsonNode(): Use reference for fileName argument
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-07-17 14:01:13 +02: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
Alexander Wilms
1ca8e9b3ae JsonParser::parse(): Print JSON if there were errors while parsing
In cases where the file name was not specified, the warning messages were not very useful.

Example:

```json
File <unknown> is not a valid JSON file!
At line 33, position 1 warning: Comma expected!

{
        "name" : "New Old Heroes",
        "description" : "New heroes based on old 3DO artwork and other game appearances. Requires Horn of the Abyss.",
        "modType" : "Heroes",
        "version" : "1.2.0",
        "author" : "Aphra",
        "contact" : "",

        "heroes" :
        [
                "config/gwenneth.json",
                "config/balindar.json",
                "config/nicolas.json",
                "config/kastore.json",
                "config/kydoimos.json",
                "config/athe.json",
                "config/miseria.json",
                "config/areshrak.json",
                "config/pactal.json",
                "config/zog.json"
        ],

        "changelog" :
    {
        "1.0.0"   : ["Initial release"],
        "1.1.0"   : ["Added Nicolas Gryphonheart and Kastore"],
        "1.1.1"   : ["Bug fixes"],
        "1.2.0"   : ["Added some HotA portrait-only campaign heroes"]
    },

        "depends" :
                [ "hota.neutralCreatures" ]
        "keepDisabled" : true
}
```
2024-07-17 13:17:43 +02:00
Ivan Savenko
1072356002
Merge pull request #4268 from IvanSavenko/pathnode_reduce
Reduce size of CGPathNode and AIPathNode
2024-07-17 13:08:05 +03:00
Ivan Savenko
34b6eaa25e Integrating changes from PR #4251 - add logging for rng 2024-07-16 15:31:58 +00:00
Andrii Danylchenko
d243a2fc12
Merge pull request #4259 from vcmi/fix-4203
BattleAI: fix moving to unreachable in case of back-to-back 2-hex
2024-07-16 16:41:50 +03:00
Ivan Savenko
1c63fefe02 Moved banks randomization to server-side with client netpack 2024-07-16 13:13:39 +00:00
Ivan Savenko
b07408e984 New objects are now created and initialized on server and sent to client 2024-07-16 13:13:39 +00:00
Ivan Savenko
d2839c8e52 Rewardable object randomization is now always server-sided 2024-07-16 13:13:39 +00:00
Ivan Savenko
388d65d6b2 Fix merge 2024-07-16 13:13:39 +00:00
Ivan Savenko
c4b8778e8b Remove unused code 2024-07-16 13:13:39 +00:00
Ivan Savenko
5178e4842e Moved generation of new rumors to server 2024-07-16 13:13:39 +00:00
Ivan Savenko
55bf75c43e Remove no longer used random seeds from StartInfo 2024-07-16 13:13:39 +00:00
Ivan Savenko
0d66ddbeec GameState now uses random generator from server. Blocked access to rmg
on client
2024-07-16 13:13:38 +00: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
60a51e98de Remove usage of std::function from CRandomGenerator 2024-07-16 13:13:07 +00:00
Ivan Savenko
30569a112c Fix crash on attempt to transfer component of a combined artifact 2024-07-16 13:08:15 +00:00
Ivan Savenko
ad9750ed3e
Merge pull request #4186 from SoundSSGood/end-of-battle-artifacts-transfer
End of battle artifacts transfer
2024-07-16 12:45:13 +03:00
Ivan Savenko
696cce7f7f
Merge pull request #4253 from smanolloff/random-port
Bind VCMI server to a random TCP port
2024-07-16 12:25:29 +03:00
Ivan Savenko
fd04320815
Merge pull request #4267 from IvanSavenko/sonar_fix
Fixed new issues detected by SonarCloud
2024-07-16 12:23:08 +03:00
Ivan Savenko
8e8d640923
Merge pull request #4276 from Alexander-Wilms/jsonparser-err-newline
JsonParser::error(): Don't add trailing newline
2024-07-16 12:21:23 +03:00