Commit Graph
99 Commits
Author SHA1 Message Date
Ivan Savenko 7b793bfd78 Merge pull request #6173 from Opuszek/improve_editor_performance
Improve editor performance
2025-10-07 11:51:37 +03:00
Opuszek faad200aed Improve editor performance 2025-10-06 20:34:17 +02:00
Ivan Savenko 85a9a62cd4 Merge pull request #6148 from MichalZr6/fix_remove_artifacts
Minor fixes for artifact removal during map load and handling null map objects
2025-10-05 11:55:02 +03:00
Laserlicht 5ae4db60e3 add mines support 2025-09-28 22:47:41 +02:00
Michał Zaremba 949b34a3cb Fix: deal with null map objects (reserved for heroes not on map) 2025-09-18 11:43:26 +02:00
Laserlicht 4552c1f562 map editor multi level support 2025-08-02 02:15:05 +02:00
Laserlicht ecfe09f6b1 multilevel support 2025-08-01 02:21:44 +02:00
Ivan Savenko 354253c27a Fix crash on h3c->vcmp conversion via editor 2025-06-18 12:07:30 +03:00
Michał Zaremba bf11b9b82a Fix callback propagation when copy-pasting objects 2025-06-15 23:47:12 +02:00
Michał Zaremba ebe746d0cf Integrate EditorCallback into mapeditor
EditorCallback being set up with std::unique_ptr stored in MapController.
2025-06-15 23:47:08 +02:00
MichalZr6 2ef964d859 Fix crash on copy-pasting objects 2025-06-15 23:35:16 +02:00
MichalZr6 e1b79326de Fixes following review
Add missing mod to CMap in checkRequiredMods
2025-05-17 23:23:12 +02:00
MichalZr6 ef95f34bdb Fix build 2025-05-13 12:51:40 +02:00
MichalZr6 f98155a785 Fixes following reviews 2025-05-13 12:51:40 +02:00
MichalZr6 9964545e7a PlayerSelectionDialog implementation + code cleanup 2025-05-13 12:51:40 +02:00
MichalZr6 87326ce9d9 prompt user for adding required mod
- when object is placed to map and its mod is not in the map's required mod list -> show question messagebox
- fix code in modAssessmentAll function
2025-05-13 12:51:40 +02:00
MichalZr6 e3a661f91a iterate objects only for grail special case 2025-05-13 12:51:40 +02:00
Ivan Savenko f70ad2c15b Reorganized artifact-related classes
- files now generally contain only 1 class (except for tightly coupled
classes)
- files are now located in lib/entities/artifact directory
- removed excessive includes

No changes to functionality
2025-04-29 13:29:08 +03:00
Ivan Savenko 93b18ee94b Fix some issues detected by Sonar & code review, fix build 2025-04-27 14:57:31 +03:00
Ivan Savenko d34b47bb20 Remove pointers from artifacts 2025-04-27 14:57:31 +03:00
Ivan Savenko 16a06179cf Use ArtifactInstanceID in CGArtifact 2025-04-27 14:57:30 +03:00
Ivan Savenko 745040def3 Access to heroes storage in CMap is now done via public methods 2025-04-27 14:57:30 +03:00
Ivan Savenko dda5c9f13a Map objects now use shared_ptr (editor) 2025-04-27 14:57:30 +03:00
Ivan Savenko 2ca1748e96 Artifact instances are now owned solely by CMap 2025-04-27 14:57:30 +03:00
Laserlicht 28169b051e campaign editor 2025-04-05 22:30:31 +02:00
Ivan Savenko 645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
godric3 025ad58561 map editor: check hero artifacts during mod assessment 2024-12-03 21:17:04 +01:00
Ivan Savenko ba9e3dca9d Mod management rework, part 1
- Replaced CModInfo class with constant ModDescription class
- Simplified mod loading logic
- Extracted some functionality from ModHandler into separate classes for
future reuse by Launcher
2024-11-26 13:55:46 +00:00
Ivan Savenko 08fbcd5239 TerrainTile now uses identifiers instead of pointers to VLC 2024-10-30 16:22:11 +00: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 152962354d Don't paste objects that cannot be placed, show warning only if error occurred 2024-10-26 12:20:13 +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 4bdc503186 Workaround for prison hero reset on loading map in editor 2024-10-13 08:28:37 +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
SoundSSGood 30fa2846aa ArtifactUtils::createArtifact ArtifactUtils::createNewArtifactInstance unified 2024-09-04 21:25:55 +03:00
Ivan Savenko 11e8b04ac5 Merge pull request #4463 from SoundSSGood/IMarket-refactoring
IMarket refactoring
2024-08-26 22:48:23 +03:00
MichalZr6 0be5a1a2ad Code review followup with additional refactor
Changes following review
2024-08-23 10:43:48 +02:00
SoundSSGoodandIvan Savenko 58bb2b58e3 IMarket suggestions
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-08-20 18:49:48 +03:00
godric3 78aa376d50 introduce getModScope into AObjectTypeHandler 2024-08-12 13:58:03 +02:00
godric3 c34956e912 introduce getModScope method toEntity class and subclasses 2024-08-10 16:08:04 +02:00
godric3 18e96171de map editor: check hero and town spells during mod assessment 2024-08-07 21:29:21 +02: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 3bea383b59 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-21 12:58:36 +00:00
Andrey Filipenkov b5cc3e8dc6 [editor] fix crash on quit with an opened map 2024-06-13 21:35:30 +03:00
Andrey Filipenkov 9438c5f9f7 code style 2024-06-13 21:35:30 +03:00
Ivan Savenko 7461df161c lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
godric3 acceca0139 map editor: Allow to customize hero spells 2024-03-24 10:01:20 +01:00