krs
54f8f2c636
Remove CCreatureHandler::loadBonuses
2024-11-10 15:10:38 +02:00
Ivan Savenko
d3af9f1c67
Removed pointer to VLC entity from CStackBasicDescriptor
2024-10-30 16:47:02 +00:00
Ivan Savenko
3dd4fa2528
Reduce usage of pointers to VLC entities
...
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.
CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.
VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town
VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class
2024-10-10 12:28:08 +00:00
godric3
c34956e912
introduce getModScope
method toEntity
class and subclasses
2024-08-10 16:08:04 +02:00
Ivan Savenko
63bcf7d83c
Replaced most of usages of CRandomGenerator with vstd::RNG in library
2024-07-16 13:13:07 +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
7461df161c
lib now uses shared_ptr for entities. Removed manual memory management.
2024-05-17 15:04:05 +00:00
Ivan Savenko
f309a4eb82
Exclude some AB creatures from randomization picks
...
This changes handling of several campaign-only creatures to be in line
with H3 - Sharpshooters, Enchanters and Azure/Rust/Faerie/Crystal
dragons.
Now these creatures will not be picked for
- random creatures in Refugee Camp
- as replacement for Random Monster object from map editor
Random map generator is not affected and can still pick this creatures
(confirmed to be same in H3)
2024-05-16 09:53:37 +00:00
Laserlicht
ab50bf9198
biography to description
2024-04-27 18:41:21 +02:00
Laserlicht
e4b60baa3b
creature/town biography/description
2024-04-12 23:35:39 +02:00
Ivan Savenko
c3957c2c2a
Moved json files to new directory, split on per-class basis
2024-02-14 13:08:24 +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
Ivan Savenko
a9866bb5c6
Added RandomGeneratorUtil::nextItemWeighted convenience method
2024-01-31 00:17:40 +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
f3277b7953
Define each identifier in a dedicated statement
2024-01-10 00:22:23 +00:00
Ivan Savenko
0842f5afee
Removed remaining usages of std::vector<bool>
2023-11-15 15:55:18 +02:00
Ivan Savenko
54103813dd
Remove no longer used serialization methods
2023-11-08 21:27:05 +02:00
Ivan Savenko
3880ea58b9
Merge branch 'josch/dos2unix' into develop
2023-10-22 18:39:03 +03:00
Ivan Savenko
ac925bb786
Renamed new types for consistency with code style
2023-10-22 16:55:19 +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
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
dfc72134f2
Removed unused property
2023-09-26 15:55:27 +03:00
Ivan Savenko
8dfdfffd87
Use ResourcePath for audio files
2023-09-04 18:22:34 +03:00
Ivan Savenko
823ffa7a07
Always use ResourcePath for referencing images and animations
2023-09-04 18:22:34 +03:00
Ivan Savenko
8dde8018d0
Implemented support for fixed monster def's from hota
2023-06-20 19:37:27 +03:00
Konstantin
05eccbc2bb
vcmi: split bonus to enumerator and HeroBonus.h
2023-05-03 18:01:06 +03:00
Konstantin
a6de9097be
vcmi: rename HeroBonus.h to Bonus.h
2023-05-02 11:20:58 +03:00
Konstantin
1d34c73c2d
vcmi: split CBonusSystemNode, BonusParams and prop
...
More splitting of HeroBonus.h
2023-05-02 00:54:53 +03:00
Konstantin
6fa1b2b19f
vcmi: move bonuses to its own folder
2023-05-02 00:53:50 +03:00
Konstantin P
e5f78a8997
vcmi: fix tests with latest develop
2023-04-27 20:59:55 +03:00
Konstantin
9db2e2068e
vcmi: fixup crash
2023-04-11 21:17:31 +04:00
Konstantin
4da97682be
vcmi: remove code duplication for native terrain
2023-04-10 19:28:17 +03:00
Konstantin
fedf7d377c
vcmi: remove TFaction
...
This is a huge change and will break save compatibility
2023-04-10 19:28:16 +03:00
Konstantin
9f8dcfc736
CCreatureHandler: load old stack exp as global effects
...
It is more robust and more logical.
2023-04-10 19:28:16 +03:00
Konstantin
6d9859932b
vcmi: add native terrain entity
...
Add interface which should be used on any object with native terrain
So far, it is faction, hero, creature and battle stack
2023-04-10 19:28:16 +03:00
Konstantin
11b237a23c
vcmi: massive refactoring v1
2023-04-05 22:33:12 +03:00
Ivan Savenko
c661419897
Merge pull request #1700 from rilian-la-te/resource-array
...
Modernize resourceSet.
2023-04-02 20:12:45 +03:00
Andrey Filipenkov
c0c19557af
fix method documentation
2023-03-20 11:35:19 +03:00
Konstantin
bbbbfe00f0
Modernize resourceSet
2023-03-17 02:26:54 +03:00
Ivan Savenko
383387ef29
Integrated defaultMods into mod system
2023-03-16 17:55:09 +02:00
Konstantin
4c4498b22a
vcmi: modernize rest of lib
2023-03-16 17:55:20 +03:00
Konstantin
a364e39b50
vcmi: remove old war machine code
2023-03-05 19:12:47 +03:00
Ivan Savenko
8c52cbcd00
Merge pull request #1429 from dydzio0614/creature-numeric-quantities
...
Implement numeric creature descriptions with config toggle on/off
2023-02-26 22:57:01 +02:00
Ivan Savenko
0ba74fea73
Merge pull request #1515 from IvanSavenko/time_based_animations
...
Time based animations
2023-02-01 12:25:54 +02:00
Ivan Savenko
c3a2dee45a
Code cleanup
2023-01-31 15:00:46 +02:00
Ivan Savenko
42df5626d9
Added Color class to replace SDL_Color
2023-01-30 00:12:43 +02:00
Ivan Savenko
a853045509
Removed unused value from creature config
2023-01-28 13:56:51 +02:00
Ivan Savenko
d34efaeb81
All battle effects now use time-based timings
2023-01-28 13:19:35 +02:00