1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-30 08:57:00 +02:00
Commit Graph

698 Commits

Author SHA1 Message Date
Ivan Savenko
9acab48bc3
Merge pull request #2268 from SoundSSGood/CArtifactInstance-rework
CArtifact CArtifactInstance refactoring
2023-07-11 14:36:08 +03:00
Tomasz Zieliński
700d8459ac Checking flags and conditions 2023-07-09 11:16:36 +02:00
Tomasz Zieliński
b4fcf20b19 Fix 2023-07-08 10:26:10 +02:00
Tomasz Zieliński
fabad20aa1 Compile fixes, cleanup 2023-07-08 10:21:36 +02:00
Tomasz Zieliński
3711ce846e Check road settings for connections 2023-07-08 09:11:20 +02:00
Tomasz Zieliński
730b36612c Respect GUI settings for roads. By default, all road types are enabled. 2023-07-08 08:44:10 +02:00
Tomasz Zieliński
27c4882237 Compile fix 2023-07-07 21:40:55 +02:00
Tomasz Zieliński
7e07ed65c8 - Check road connection for Shipyards 2023-07-07 21:27:24 +02:00
Tomasz Zieliński
1cad64c470 Move road flag to placeObject() method 2023-07-07 20:17:20 +02:00
Tomasz Zieliński
3889193a48 Reorganize namespaces 2023-07-07 16:32:17 +02:00
Tomasz Zieliński
0d3ac4a502 - Add new option for connection
- Store info about objects and roads in RequiredObjectInfo
2023-07-06 22:15:00 +02:00
Tomasz Zieliński
a592f5604b Add "bannedTerrains", "bannedMonsters" options for templates. 2023-07-06 17:30:23 +02:00
Tomasz Zieliński
9f2bfbc1d8 Improve serialization of IDs from mods, so they are resolved correctly after all mods are loaded. 2023-07-05 20:53:00 +02:00
SoundSSGood
fd9c7352a0 suggested changes 2023-07-03 22:54:03 +03:00
Tomasz Zieliński
73b78dd75e Handle "bannedTowns" (alredy used on Jebus). 2023-07-02 11:41:47 +02:00
Tomasz Zieliński
cb4d818241 Inherit terrain types only after all terrain Ids are resolved. 2023-07-02 09:28:51 +02:00
Tomasz Zieliński
04e2cf728e Allow all terrains from mods by default (including Wasteland). 2023-07-02 08:13:06 +02:00
Tomasz Zieliński
dc3dda7676 Fix new factions not appearing in random maps 2023-07-01 15:25:20 +02:00
SoundSSGood
060aecc61c CArtifact refactoring 2023-06-30 19:41:26 +03:00
DjWarmonger
a560eaea51
Merge pull request #2237 from vcmi/fictive_connections
Wide, fictive, repulsive connections
2023-06-25 19:57:08 +02:00
Tomasz Zieliński
43d666a2ff Refactor duplicated code 2023-06-25 18:31:54 +02:00
Tomasz Zieliński
a5ddc225ac Place objects away from connection even if it's empty (not guarded) 2023-06-23 21:43:49 +02:00
Tomasz Zieliński
64e8b9b2b9 Smarter scaling for forces between zones. 2023-06-23 21:43:12 +02:00
Ivan Savenko
6f743916db Moved CGCreature to a new file 2023-06-20 19:37:27 +03:00
Tomasz Zieliński
25707b6d5e Place zones in order given by template. Yields better results in a number of cases. 2023-06-18 20:23:25 +02:00
Tomasz Zieliński
8510af487e Place objects away from wide connection 2023-06-18 19:20:12 +02:00
Tomasz Zieliński
47726625c2 Do not generate passable connections for virtual connections. 2023-06-18 12:03:41 +02:00
Tomasz Zieliński
acc141d626 Fix unused variable 2023-06-17 19:31:16 +02:00
Tomasz Zieliński
65d10cf9f2 + Handle Wide Connections
+ Possibly hide fictive and repulsive connections, needs testing
2023-06-17 19:09:38 +02:00
DjWarmonger
02ea798c97
Merge pull request #2229 from vcmi/zone_placement_improvements
Zone placement improvements
2023-06-17 08:53:08 +02:00
Tomasz Zieliński
30f81297c3 Create only a single seer hut for every artifact we have. 2023-06-17 08:45:10 +02:00
Ivan Savenko
58661fc8ec Moved DwellingInstanceConstructor to a new file 2023-06-16 17:59:50 +03:00
Ivan Savenko
77b58bc66d Cleaned up object constructors to reduce duplicated code 2023-06-16 17:59:50 +03:00
DjWarmonger
c52b5d3bd0
Merge pull request #2216 from vcmi/water_prison_tavern
Water Prison & Tavern
2023-06-16 16:30:05 +02:00
Tomasz Zieliński
f1356dd5bf Merge remote-tracking branch 'origin/develop' into water_prison_tavern 2023-06-14 20:58:02 +02:00
Tomasz Zieliński
ce25ed4de2 Fix crash which coudl occur if we can't add any Seer Hut to RMG pool (Fear template). 2023-06-14 20:50:14 +02:00
Tomasz Zieliński
14d46cbed8 Keep the distance between zone guards and other objects, while trying to place them closer to zone centers at the same time. 2023-06-14 14:12:42 +02:00
Tomasz Zieliński
2603e11f48 Simplify and correct ZonePlacer main loop, make sure to save optimal solution at every step. 2023-06-14 14:07:31 +02:00
Tomasz Zieliński
e1f8ae94ac + Do not limit treasures to make space for more treasures if there are none ;eft
+ Make sure RMG won't get stuck in infinite loop for weird treasure values (eg. 0).
2023-06-12 22:15:59 +02:00
Tomasz Zieliński
3d3c97bf93 Fix potential infinite loop 2023-06-12 20:32:58 +02:00
Tomasz Zieliński
983633d73b Do not decrease the density of obstacles in zones of medium treasure value. For high values, decrease them more rapidly. 2023-06-10 18:02:26 +02:00
Tomasz Zieliński
65a8478b74 Fix override 2023-06-10 15:07:03 +02:00
Tomasz Zieliński
8ef25155df Remove dependencies of surface and underground zones 2023-06-10 14:58:12 +02:00
Tomasz Zieliński
b65870f31e A bunch of magic formulas to assure nice balance of blocked areas and obstacles on every template 2023-06-10 14:57:25 +02:00
Tomasz Zieliński
1bb2b5b571 + Maintain clear perimeter of a treasure pile.
+ Make sure that separate blocked areas remain unconnected so it's possible to pass between them.
2023-06-10 14:56:03 +02:00
Tomasz Zieliński
d5b799278e Allow center Town touch the blocked area, it's no longer a problem with correct pathfinder. 2023-06-09 21:22:44 +02:00
Tomasz Zieliński
682e9ae297 Unused variable 2023-06-08 20:05:51 +02:00
Tomasz Zieliński
52d33fc7a6 Generate all treasures of certain value beforehand and try to place them all, don't interrupt at first failure. 2023-06-08 19:51:21 +02:00
Tomasz Zieliński
66b6fba51f Use all tiles covered by treasure pile to determine distance to other treasures. 2023-06-08 19:31:38 +02:00
Tomasz Zieliński
d92ac6bcbe Do not exceed rolled treasure value - matches OH3. 2023-06-08 19:23:23 +02:00
Tomasz Zieliński
3e9e6aab2b Fix prison distribution 2023-06-07 15:08:50 +02:00
Tomasz Zieliński
7922d8be16 Prison from HoTA will be placed on water. 2023-06-07 13:00:24 +02:00
DjWarmonger
e98a50b45a
Merge pull request #2123 from Warzyw647/rmg-split-enum-monster-strength
Refactor enums and add zone monster strength "none" in rmg
2023-06-06 20:40:35 +02:00
Ivan Savenko
1e9eea30e1 Merge remote-tracking branch 'soundsgood/CArtHandler-rework' into develop 2023-06-05 18:53:17 +03:00
Tomasz Zieliński
cbe1c4a07d Remove random seed from map description. 2023-06-03 08:53:00 +02:00
Ivan Savenko
d6a357fd17 Split some map object files into smaller files. Reduced includes usage. 2023-06-02 21:47:37 +03:00
Ivan Savenko
acac42291e Remove excessive CMap.h includes 2023-05-31 23:18:38 +03:00
Ivan Savenko
62595cb039 Split massive CMap.h a bit 2023-05-31 23:01:57 +03:00
Warzyw647
bc4755a89a Merge branch 'develop' into rmg-split-enum-monster-strength 2023-05-31 19:53:19 +02:00
Warzyw647
4c513e8bb0 Water zones get monster strength ZONE_NONE during their creation instead of a hardcoded check for zone type WATER at guard creation time.
Also preliminary preparations for water zone customization in the template json.
2023-05-31 00:24:52 +02:00
Tomasz Zieliński
cd9bd491e0 Add option for single-thread generation. Still doesn't guarantee excactly identical maps :? 2023-05-24 18:02:11 +02:00
Warzyw647
af3c6abb5e Added zone guard strength "none" 2023-05-21 00:13:45 +02:00
Warzyw647
7afcc3b350 Merge branch 'rmg-split-enum-monster-strength' into rmg-no-monster-zone 2023-05-20 17:29:07 +02:00
Warzyw647
149ae9986c Merge branch 'rmg-refactor-enums' into rmg-no-monster-zone 2023-05-20 17:28:25 +02:00
Tomasz Zieliński
f3c795462f Remove comment which break the build 2023-05-20 17:08:44 +02:00
Tomasz Zieliński
4e927f644d Missing precompiled header 2023-05-20 15:41:03 +02:00
Tomasz Zieliński
b2b2798214 Use boost::thread instead of std::thread 2023-05-20 14:43:05 +02:00
Tomasz Zieliński
aa16f57b8a Remove unused variables 2023-05-20 14:28:18 +02:00
Tomasz Zieliński
a8b882e5bb Remove another pragma 2023-05-20 14:16:18 +02:00
Tomasz Zieliński
e25448e7cd Fix build on macos 2023-05-20 14:00:03 +02:00
Warzyw647
5363fd5db3 Changing other enums to enum classes and adding comments with reasons for why some enums stay as enum-in-namespace. 2023-05-20 13:29:55 +02:00
Tomasz Zieliński
91baa65c8c Remove no longer needed synchronization that also fails to compile. 2023-05-20 13:15:46 +02:00
Tomasz Zieliński
219e897db0 Added missing files. 2023-05-20 12:02:30 +02:00
Tomasz Zieliński
67c0fbc240 Merge remote-tracking branch 'origin/develop' into parellel_rmg
# Conflicts:
#	lib/rmg/modificators/WaterProxy.cpp
2023-05-20 11:59:39 +02:00
Tomasz Zieliński
15b254fded Give every Zone its own RNG 2023-05-20 11:46:32 +02:00
Tomasz Zieliński
5da8c96214 Fix include paths 2023-05-20 11:45:08 +02:00
Tomasz Zieliński
cf0515dcd3 Moved Modificators to separate folder 2023-05-20 10:17:37 +02:00
Tomasz Zieliński
5f99facd8f Optimization - don't add multiple copies of Modificators which only need one instance. 2023-05-20 09:58:08 +02:00
Tomasz Zieliński
71f882d5ba Refactored Functions.cpp, removed unused function. 2023-05-20 07:55:28 +02:00
Tomasz Zieliński
c27b8383e7 Cleanup 2023-05-20 07:23:00 +02:00
Tomasz Zieliński
02586214a1 Synchronize ConnectionPlacers 2023-05-20 07:06:27 +02:00
Tomasz Zieliński
72f8facc82 Fixed deadlock in WaterAdopter 2023-05-19 20:49:01 +02:00
Tomasz Zieliński
73d9f5bd0a Parallel RMG works fine for maps without water. 2023-05-19 20:30:15 +02:00
SoundSSGood
021f94a579 artifact utils 2023-05-17 17:00:31 +03:00
Ivan Savenko
cb8201876b
Merge pull request #1822 from rilian-la-te/spell-mechanics-v3
Bonus refactoring, part3 (save-incompatible)
2023-05-09 13:10:04 +03:00
Konstantin P
057a33c508 SpellSchool: use identifier instead of int
Needs redifinition of MAGIC_SCHOOL_SKILL in all mods
2023-05-07 20:37:32 +03:00
Tomasz Zieliński
19010dd834 Not needed 2023-05-07 09:15:20 +02:00
Tomasz Zieliński
966a24d27e Protect public access to Modificators with another mutex. 2023-05-07 08:24:08 +02:00
Tomasz Zieliński
a58094aefe Thread pool kinda works. 2023-05-07 07:48:12 +02:00
nordsoft
58aed364bf Don't place non-sailing boats in RMG 2023-05-07 03:24:52 +04:00
Tomasz Zieliński
3d25c2c6dc Fix thread pool closing 2023-05-06 19:47:28 +02:00
Tomasz Zieliński
a8545935c3 ThreadPool implementation. It runs, but dies from race conditions. 2023-05-06 18:54:19 +02:00
Tomasz Zieliński
a952a9e279 Remove unused code 2023-05-06 12:22:01 +02:00
Warzyw647
d74fdad432 Renamed enum EMonsterStrength to EGlobalMonsterStrength. Enum EZoneMonsterStrength unchanged. 2023-05-06 12:18:53 +02:00
Tomasz Zieliński
d22ec0ee0c Move Modificator to separate file. 2023-05-06 10:49:18 +02:00
Tomasz Zieliński
eb50ae3aa7 - Pre-distribute max number of Prisons
- Minor refactor for artifact and hero pool management
2023-05-05 10:30:36 +02:00
Tomasz Zieliński
d137f7157c Merge remote-tracking branch 'origin/develop' into parellel_rmg
# Conflicts:
#	lib/rmg/CZonePlacer.h
#	lib/rmg/TreasurePlacer.h
2023-05-05 09:00:44 +02:00
Tomasz Zieliński
35ec720555 Forget objects that were already replaced iwth an artifact. 2023-05-05 07:16:38 +02:00
Warzyw647
7f180b6e81 Split enum EMonsterStrength into EMonsterStrength and EZoneMonsterStrength.
Removed obsolete ZONE_ and GLOBAL_ from enum item names.
Simplified serialization of zone monster strength in preparation for adding zone monster strength: none.
2023-05-04 21:43:31 +02:00
Warzyw647
05e72e2e7f Don't remove zone guards in a zone with monsters: none, remove extra parentheses and add comments 2023-05-04 18:40:04 +02:00