1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00
Commit Graph

159 Commits

Author SHA1 Message Date
godric3
31e4937a8c Editing hero primary skill in map editor should not be influenced by artifacts 2024-12-08 17:49:41 +01:00
godric3
01bb73b0cc fix imports 2024-12-03 21:28:21 +01:00
godric3
896a148a7a map editor: Add possibility to customize hero artifacts 2024-12-03 21:07:33 +01:00
godric3
fcf3679377 Initialize random dwelling added to map 2024-11-26 20:42:12 +01:00
Ivan Savenko
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
godric3
9e9f118b09 another attempt of using CGHeroInstance::NO_PATROLLING in map editor 2024-10-29 21:41:42 +01:00
godric3
37f7ce0ad6 improve translation for patrol radius 2024-10-29 21:22:10 +01:00
godric3
ed087b7a5b Use max ui32 value instead of -1 for NO_PATROLLING 2024-10-29 18:34:02 +01:00
godric3
da5bae301a try to fix build, use plain -1 in place of CGHeroInstance::NO_PATROLLING 2024-10-28 22:46:48 +01:00
godric3
911961da46 try to fix build 2024-10-28 19:59:03 +01:00
godric3
a9e04428c8 Possibility to set hero patrol radius in map editor 2024-10-28 18:30:30 +01:00
Ivan Savenko
c2e49bd10a
Merge pull request #4821 from IvanSavenko/flaggable
Basic support for configurable flaggable objects
2024-10-27 21:19:22 +02:00
godric3
1246333350 Initialize town's possibleSpells only if hasn't been initialized already(for example when copying existing town) 2024-10-26 12:15:40 +02:00
Ivan Savenko
8a5ac73438 Basic support for configurable flaggable objects
Converted CGLighthouse class into FlaggableMapObject

Bonus provided by Lighthouse/Flaggable is now defined in config and is
accessible to mods.
2024-10-25 16:48:10 +00:00
Ivan Savenko
604e3b5c67
Merge pull request #4763 from IvanSavenko/herohandler_split
Split CHeroHandler.cpp/.h into 1 file per class
2024-10-14 19:05:48 +03:00
Ivan Savenko
10ad0fc760 Split CHeroHandler.cpp/.h into 1 file per class
All parts of CHeroHandler.cpp are now in lib/entities/hero
Adjusted includes to use new paths
No functionality changes
2024-10-13 14:01:09 +00:00
Ivan Savenko
31095248ab Removed typeName and subtypeName properties from CGObjectInstance 2024-10-13 13:05:50 +00:00
Ivan Savenko
e221cdccab Fix initialization of hero type in map editor 2024-10-11 15:01:55 +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
1b4a8db4c5 Fix build 2024-09-22 00:11:21 +02:00
godric3
f51ef2de4c remove unused item data for artifact/spell/skill items and fix code style 2024-09-21 22:35:04 +02:00
godric3
e61ef459c6 Add all artifacts/spells/skills to quest widget lists and disable banned
Previous code added at most as many items as were in allowed lists, which caused to skip last items if some were banned.
2024-09-21 21:54:29 +02:00
godric3
514e81406d extract PlayerColor to QString conversion to helper function 2024-09-17 20:57:05 +02:00
godric3
9baccdeeae map editor: fix event players after conversion to std::set 2024-09-16 20:25:19 +02:00
godric3
8917c753bd adjust town event handling after introducing 8th creature in town 2024-09-16 20:16:36 +02:00
Ivan Savenko
a58e209cbd
Merge pull request #4490 from godric3/fix-campaign-hero-placeholder
Fix campaign hero placeholder
2024-09-09 23:39:20 +03:00
godric3
71ec25a4a5 make sonar happier 2024-08-24 13:34:22 +02:00
godric3
cda66c4196 attempt to fix hero placeholder while reading h3m 2024-08-22 17:09:23 +02:00
SoundSSGood
58bb2b58e3 IMarket suggestions
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-08-20 18:49:48 +03: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
38311244a4
Merge pull request #4402 from Laserlicht/8th_creature
support for 8th creature (Factory)
2024-08-14 17:04:32 +03:00
Laserlicht
1a06a2cc44 basic 8th creature support 2024-08-05 21:15:47 +02:00
godric3
e782d3984f fix some sonarcloud issues 2024-08-01 23:31:06 +02:00
godric3
27f83449f2 PR review fixes:
- change return of `getBuildingVariantsFromModel` to `QVariantList`
- change while to do-while where it makes sense
- moved constants outside of methods
- made building and resources name non editable
2024-08-01 22:36:01 +02:00
godric3
3fb3fef16b use range constructor or QVariantList::fromStdList based on Qt version 2024-07-29 19:03:17 +02:00
godric3
2b9461ed6e use custom roles instead of Qt::UserRole 2024-07-28 22:58:06 +02:00
godric3
d540ee1887 extract magic numbers to constants 2024-07-28 22:57:44 +02:00
godric3
67ab43526f reduce code duplication 2024-07-28 16:28:21 +02:00
godric3
3d3f388fb8 rename TownEvent to TownEventDialog 2024-07-28 16:28:21 +02:00
godric3
fa3fef8a0f change town events to vector + use getDefaultAllowed for spells 2024-07-28 16:28:21 +02:00
godric3
c212b1bf36 map editor: update translation + polish translation 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
godric3
db1a780030 map editor: fix unchecking when there is more then one child biulding 2024-07-28 16:28:21 +02:00
godric3
5c3c6d4baa map editor: Add bulk actions for buildings in TownBulidingsWidget 2024-07-28 16:28:21 +02:00
godric3
4d1c8bb1b7 map editor: auto update checkboxes of base/upgrade buildings in TownBulidingsWidget 2024-07-28 16:28:21 +02:00
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
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
7461df161c lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00