Tomasz Zieliński
dd55188b77
Option to define surface or underground level for obstacle set
2024-05-07 07:15:00 +02:00
Ivan Savenko
30e0a16ee9
Fix some 'new' issues reported by Sonar Cloud
2024-05-06 15:33:30 +00:00
Ivan Savenko
47c3e6f4b6
Simplified code
2024-05-02 17:53:36 +03:00
Ivan Savenko
08ce3a8338
Clarified code
2024-05-02 17:32:38 +03:00
Ivan Savenko
f6e5f09d50
Fix possible uninitialized variables
2024-05-02 17:32:27 +03:00
Ivan Savenko
b0effdbbf4
Merge pull request #3836 from vcmi/unpropagate_bonus
...
Fixes issue of bonuses not correctly removed
2024-04-28 13:10:23 +03:00
Tomasz Zieliński
04691c851f
Fixes issue of bonuses not correctly removed
2024-04-26 19:22:20 +02:00
Ivan Savenko
7f732b6d0a
Fix thrown exception on random monster initialization
2024-04-24 22:57:13 +03:00
Ivan Savenko
5454d01316
Provide more information in thrown exceptions for unfixed crashes
2024-04-22 16:40:43 +03:00
Ivan Savenko
a6dead7725
Fixed loading of text strings for hota quests
2024-04-22 13:49:17 +03:00
Ivan Savenko
ffec4b9154
Explicitly ban 'large' dwellings from random selection
...
Old code was relying on specific sorting order leading to easy to break
logic
2024-04-22 12:35:55 +03:00
Ivan Savenko
55756dbc43
Merge pull request #3785 from dydzio0614/bank-revisit-fix
...
Empty treasure bank does not ask for enter anymore
2024-04-22 11:06:58 +03:00
Ivan Savenko
1b469036a3
Merge pull request #3784 from dydzio0614/quick-dwellings-visit
...
Add handling for yes/no dialogs that can be safely skipped by player
2024-04-22 11:06:40 +03:00
Andrii Danylchenko
ae69311023
#3788 - fix passing wirlpool with only commander alive
2024-04-20 15:28:57 +03:00
Ivan Savenko
9353e24fa5
Merge pull request #3792 from IvanSavenko/bugfixing
...
Fixes for minor issues
2024-04-19 12:35:25 +03:00
Ivan Savenko
d8baa3c145
Merge pull request #3789 from dydzio0614/fix-sounds
...
Fix some missing/redundant sounds to match H3
2024-04-18 21:34:53 +03:00
Ivan Savenko
c87e60740b
Fixes hota prisons replacing every h3 prison on h3m maps
2024-04-18 19:13:32 +03:00
Dydzio
98375cc627
Limit showing empty message instantly to creature banks and dragon utopia
2024-04-17 22:08:17 +02:00
Dydzio
1401211145
Fix missing/redundant sounds to match H3
2024-04-17 21:02:43 +02:00
Dydzio
20eaf17a18
Empty treasure bank does not ask for enter anymore
2024-04-17 01:25:58 +02:00
Dydzio
19453aab41
Add handling for yes/no dialogs that can be safely skipped by player
2024-04-17 01:08:27 +02:00
Dydzio
f7dd80c732
Remove redundant double sound play on mine capture
2024-04-16 00:01:37 +02:00
DjWarmonger
0808a8b36f
Merge pull request #3714 from vcmi/biome_system
...
Biome system implementation
2024-04-13 21:32:13 +02:00
Tomasz Zieliński
f491f10d81
Final tweaks
2024-04-13 19:21:01 +02:00
Tomasz Zieliński
e28fd869aa
Remove empty obstacle sets, just in case.
2024-04-13 14:53:00 +02:00
Tomasz Zieliński
a7d0f0626a
Docs & final touches
2024-04-12 14:53:07 +02:00
Tomasz Zieliński
4fa7f0e93d
Also allow filtering biomes by faction(s)
2024-04-12 10:25:13 +02:00
Tomasz Zieliński
6899acc1d7
Fix alignments check
2024-04-12 09:38:45 +02:00
Tomasz Zieliński
1f81ddbac4
Fixes in object loading
2024-04-12 06:29:01 +02:00
Tomasz Zieliński
68bb36f7c7
Compile fixes
2024-04-11 18:38:50 +02:00
Tomasz Zieliński
a356fdaf2a
Allow filtering obstacles by faction aligmnment
2024-04-11 18:10:14 +02:00
SoundSSGood
738a89bb99
Market fix
2024-04-10 23:30:31 +03:00
Ivan Savenko
bcd4a8c961
Merge pull request #3736 from IvanSavenko/fix_server_translations
...
Do not translate strings on server side
2024-04-10 19:12:34 +03:00
Tomasz Zieliński
6c9d18a85c
Allow multiple terrains per biome
2024-04-10 09:40:12 +02:00
Tomasz Zieliński
5c4d1703ca
Fix for loading templates from other mods
2024-04-09 22:09:03 +02:00
Ivan Savenko
8aaa9e63dd
Fix build
2024-04-09 18:56:28 +03:00
Tomasz Zieliński
8d9489c368
Fix conflicts with templates loaded from mods
2024-04-09 17:29:33 +02:00
Ivan Savenko
42616cf4e8
Fix text formatting, fix todo's
2024-04-09 16:13:30 +03:00
Ivan Savenko
18ece6dcf6
Remove some usages of server-side translations
2024-04-09 16:13:30 +03:00
Ivan Savenko
9e49587749
Replace bonus string description with metastring that can properly
...
handle translations
2024-04-09 16:13:30 +03:00
Tomasz Zieliński
c7149103ce
Compile fix
2024-04-08 15:24:52 +02:00
Tomasz Zieliński
224e971c4b
Unused variable
2024-04-08 14:56:21 +02:00
Tomasz Zieliński
3e3959d360
Move all OH3 objects and obstacle sets to a mod
2024-04-08 12:50:41 +02:00
Ivan Savenko
4947baebee
Fix crash on loading vmap's
2024-04-08 13:16:34 +03:00
Tomasz Zieliński
b0cff23c37
Cleanup
2024-04-06 15:06:08 +02:00
Tomasz Zieliński
305e2bdf2f
Load obstacle sets from json in mods
2024-04-05 08:31:05 +02:00
Tomasz Zieliński
b1a5693612
Proof of concept with OH3 obstacles
2024-04-04 21:39:01 +02:00
Ivan Savenko
1f487dab49
Merge pull request #3685 from dydzio0614/small-fixes
...
Small fixes
2024-03-28 13:17:57 +02:00
Kris-Ja
05bbb45824
change MANA_PER_KNOWLEGDE to percentage
2024-03-23 20:28:49 +01:00
Tomasz Zieliński
a93dd25867
Update docs to be in line with existing code.
2024-03-14 10:22:15 +01:00
Tomasz Zieliński
69cfc83be3
Fix issue found by Sonarcloud
2024-03-09 08:17:46 +01:00
Tomasz Zieliński
87bf4b752a
Better implementation of granting multiple rewards
2024-03-09 07:38:11 +01:00
Tomasz Zieliński
fe8bcc5758
Merge remote-tracking branch 'origin/develop' into reward_select_all
...
# Conflicts:
# lib/mapObjects/CRewardableObject.cpp
2024-03-09 06:50:56 +01:00
Ivan Savenko
29860848a5
Cleanup
2024-02-26 12:55:49 +02:00
Ivan Savenko
08a27663f9
Reworked JsonNode constructors to more logical form
2024-02-26 12:55:49 +02:00
Ivan Savenko
110ef5f66e
Merge pull request #3614 from IvanSavenko/sonarcloud_fixes_2
...
Sonarcloud fixes 2
2024-02-14 16:44:58 +02:00
Ivan Savenko
3740f8b02f
Moved bonus parsing to a new file
2024-02-14 15:48:06 +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
c23953eac5
Remove custom casts
2024-02-14 12:56:37 +02:00
Alexander Wilms
522cb571b3
Remove redundant virtual
specifiers
...
`grep -nr virtual | grep -v googletest | grep override > ../redundant_virtual.txt`
```python
import os
with open("../redundant_virtual.txt") as f:
for line in f:
print()
line: str = line.strip()
print(line)
tmp = line.split(":")
file = tmp[0].strip()
code = tmp[-1].strip()
print(file)
print(code)
new_code = code.replace("virtual ", "", 1)
# https://superuser.com/a/802490/578501
command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
os.system(command)
```
2024-02-10 20:46:13 +01:00
Dydzio
4e927d6417
Fix missing gold component in "join for money" dialog
2024-02-07 21:57:25 +01:00
Ivan Savenko
18f9d29fd2
Fix typo
2024-02-07 00:15:20 +02:00
Ivan Savenko
9e09fe08e1
Fixed duplicated hero check - was used too early, before hero type is
...
loaded
2024-02-05 21:55:48 +02:00
Ivan Savenko
87059be67b
Added range checks to values read from h3m.
...
Fixes reading of morale/luck values (-3..3) as unsigned leading to
overflow.
2024-02-05 21:27:55 +02:00
Ivan Savenko
58ee72f684
Merge pull request #3588 from IvanSavenko/fix_regressions
...
Fix regressions
2024-02-01 22:27:52 +02:00
Ivan Savenko
7247038458
Merge pull request #3574 from SoundSSGood/altar-fixes
...
Artifacts altar related fixes
2024-02-01 22:27:41 +02:00
Ivan Savenko
e66a982c96
Fix backpack availability check in Grail digging
2024-02-01 18:21:54 +02:00
Ivan Savenko
049c352511
Added loss condition "lose part of Angelic Alliance" to Yog campaign
2024-01-31 12:52:16 +02:00
Ivan Savenko
2e4895766a
Implemented tracking of objects destroyed by players
2024-01-31 01:37:33 +02:00
Ivan Savenko
ccea7fc1fb
Yog will now only get Attack or Defence on leveling up
2024-01-31 00:18:10 +02:00
Ivan Savenko
a9866bb5c6
Added RandomGeneratorUtil::nextItemWeighted convenience method
2024-01-31 00:17:40 +02:00
Ivan Savenko
7992144763
Gem class is now Sorceress
2024-01-30 23:34:27 +02:00
Ivan Savenko
3abc26e789
Moved checks for campaign heroes to CGHeroInstance class
2024-01-30 23:33:58 +02:00
SoundSSGood
652f009181
arts altar - arts holder
2024-01-27 15:28:21 +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
ffd604c114
Removed unnecessary access to IHandler::objects
2024-01-19 13:56:06 +02:00
Ivan Savenko
6e629a6a5f
split getBonusLocalFirst into two distinct method:
...
- const method getFirstBonus that returns single matching bonusToString
- non-const method getLocalBonus that returns bonus from current node
2024-01-19 13:56:06 +02:00
Ivan Savenko
496c13b34a
Stabilization
2024-01-19 13:56:06 +02:00
Ivan Savenko
ea1f05d15a
Stabilization
2024-01-19 13:55:22 +02:00
Ivan Savenko
60ffb81b33
Replaced remaining placeholder code with callbacks
2024-01-19 13:55:22 +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
a15366f5a5
Make IObjectInterface::cb non-static
2024-01-19 13:55:21 +02:00
Ivan Savenko
d5c4478816
Remove most of non-const access to VLC entities
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
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
c21913f661
Fixed initialization of move points and mana for dismissed heroes
2024-01-15 23:16:48 +02:00
Ivan Savenko
2265890f69
Better detection of invalid mod data to avoid crash and notify modders
2024-01-15 18:19:21 +02:00
Ivan Savenko
cf47fbb729
Merge pull request #3435 from IvanSavenko/bugfixing
...
[1.4.3] Bugfixing
2024-01-06 13:06:07 +02:00
Ivan Savenko
51b7de4b98
Fix double off-by-one bug with CREATURE_GROWTH bonus
2024-01-05 16:57:44 +02:00
Ivan Savenko
edb2ecd751
Fix possible overflow errors on leveling up beyond int64_t limit
...
- added separate giveExperience method instead of weird changePrimSkill
- experience is now always used in form of int64_t
- max supported level reduced from 201 to 197 to fit into int64_t
- fixed undefined behavior in experience calculation
2024-01-04 23:57:36 +02:00
Joakim Thorén
01f602ab92
Fixes warning about usage of unused variable
2023-12-27 22:25:29 +01:00
Ivan Savenko
4835a1f695
Fix possible crash on abandoned mine with no valid resources
2023-12-24 22:05:47 +02:00
Ivan Savenko
ec5fcb3e7c
Do not ignore 'canRefuse' flag for select mode 'first' and 'random'
2023-12-23 00:35:51 +02:00
Dydzio
39c3db04f3
Add missing antimagic functionality to antimagic garrisons
2023-12-21 18:09:33 +01:00
Ivan Savenko
acc09ee51a
Merge pull request #3266 from Laserlicht/puzzle_cheat
...
implement missing OH3/HDmod cheats
2023-12-17 22:16:22 +02:00
Ivan Savenko
d187309eed
Fixed typo - different type was used to select ID and subID
2023-12-16 13:46:29 +02:00
Ivan Savenko
664da58d4f
Use MetaString in place of boost::format to avoid exceptions
2023-12-13 17:23:40 +02:00
Ivan Savenko
9385ae76c2
Fix reading of dimensions of h3 map objects
2023-12-11 21:15:46 +02:00
Ivan Savenko
543ee597b8
Fix localization-related error messages
2023-12-11 18:23:52 +02:00