1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-19 00:17:56 +02:00
Commit Graph

125 Commits

Author SHA1 Message Date
54a46b77a9 Extract library entity randomization logic to separate class 2025-05-19 18:51:42 +03:00
c0850f41b3 Pathfinder now uses IGameInfoCallback instead of CGameState 2025-05-19 17:53:15 +03:00
4d4da0454f map objects hierarchy now uses IGameInfoCallback 2025-05-14 18:33:20 +03:00
6f20235d07 Merge CPrivilegedInfoCallback into CGameInfoCallback 2025-05-14 13:42:20 +03:00
716da918f8 Completely remove IGameCallback class
- CClient now inherits directly from CPrivilegedInfoCallback, like
IGameCallback did before. However CClient no longer needs dummy
implementation of IGameEventCallback
- CGObjectInstance hierarchy now uses CPrivilegedInfoCallback for
callback. Actual events can only be emitted in calls that receive
IGameEventCallback pointer, e.g. heroVisit
- CGameHandler now inherits directly from both CPrivilegedInfoCallback
and IGameEventCallback as it did before via IGameCallback
2025-05-14 13:39:41 +03:00
4d57a8ed36 Prefer to pass CGameState as reference instead of pointer 2025-04-27 14:57:31 +03:00
a43c3fcb31 Restore save compatibility with 1.6 2025-04-27 14:57:31 +03:00
6d65641a43 Gamestate is now passed as shared pointer 2025-04-27 14:57:30 +03:00
16a06179cf Use ArtifactInstanceID in CGArtifact 2025-04-27 14:57:30 +03:00
745040def3 Access to heroes storage in CMap is now done via public methods 2025-04-27 14:57:30 +03:00
2ca1748e96 Artifact instances are now owned solely by CMap 2025-04-27 14:57:30 +03:00
09db3e4bef Reworked resource piles loading to fix wog maps with mithril 2025-01-25 11:40:21 +00:00
19c981fc56 Added similar screen for Obelisk, moved assets to dedicated folder 2025-01-06 13:05:45 +00:00
2272707175 Merge pull request #5117 from IvanSavenko/teleporter_ui
Added new right-click popup to teleporters
2024-12-21 16:17:15 +02:00
6d8e447ff3 Added new right-click popup to teleporters
Whirlpool, Subterranean Gates, and all Monoliths now show custom popup
on right-click that show all linked objects (exits and entrances).

Only revealed objects are visible, rest are hidden behind fow.

Exits, entrances, and bidirectional objects have different icon that
indicates direction.
2024-12-21 12:01:33 +00:00
f893c80192 Move UpgradeInfo class to header and source files 2024-12-19 14:13:09 +01:00
dd7d190a58 Implemented optional descriptions for market map objects
It is now possible to define description of an object with 'market'
handler that will be shown on right-clicking the object.

Similarly, added description to right-click popup to Hill Fort.
2024-10-30 13:20:21 +00:00
f8b1f40abb Merge pull request #4348 from MichalZr6/hill_fort_changes
Hill Fort unavailable upgrade and status bar new messages
2024-10-30 14:00:35 +02:00
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
edf43f5702 Get and translate messages on client side 2024-09-24 19:12:05 +02:00
303b0a6552 Fixes based on review remarks 2024-09-24 18:29:01 +02:00
dae9e1e316 Implement IOwnableObject interface for shipyard 2024-09-04 19:46:36 +00:00
d49a61645c All objects that can be owned by player now implement IOwnableObject 2024-08-28 12:51:28 +00:00
0fd9dbf240 Unified income handling, added IOwnableObject interface 2024-08-28 12:40:44 +00:00
ffaaa7da15 blockingDialog functions: the answer parameter can be negative 2024-08-09 00:28:28 +02:00
bfd1e8a7c8 calculate income 2024-07-25 02:51:00 +02:00
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
63bcf7d83c Replaced most of usages of CRandomGenerator with vstd::RNG in library 2024-07-16 13:13:07 +00:00
3bea383b59 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-21 12:58:36 +00:00
c68f2da977 Fix initialization of gold pile from random resource with fixed amount 2024-06-17 20:08:07 +00:00
84bc6c42db Added 'Serializeable' base class for classes serializeable by pointer 2024-05-16 18:40:59 +00:00
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
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
e67e4430ba Removed most of non-const static fields in lib. Reduced header includes. 2024-01-19 13:55:22 +02:00
a15366f5a5 Make IObjectInterface::cb non-static 2024-01-19 13:55:21 +02:00
39c3db04f3 Add missing antimagic functionality to antimagic garrisons 2023-12-21 18:09:33 +01:00
c872f8418f Implemented serialization of MapObjectSubID, refactoring of related code 2023-11-17 21:18:34 +02:00
abad4b01ce Remove explicit convesion to int in operators 2023-11-15 15:55:19 +02:00
6b81012f31 Use variant identifier in netpacks where applicable 2023-11-08 14:00:23 +02:00
d7d8177390 Show artifact description and icon on right click if UI tweaks are on 2023-11-06 20:37:17 +02:00
3634fb2158 Remove int <=> Identifier comparisons 2023-11-03 16:03:29 +02:00
8346d71c98 Remove more subID access 2023-11-01 14:44:05 +02:00
dcb8f4fc7b Moved object type randomization to object class 2023-11-01 14:43:20 +02:00
03e1169781 Reduced number of accesses to CGObjectInstance::subID 2023-11-01 14:43:20 +02:00
e10de0594e Scholar is now configurable object (partial) 2023-10-16 00:12:39 +03:00
bb05c2dea5 Implemented configurable shrine 2023-10-16 00:12:39 +03:00
98fd939ed6 Cartographer/Observatory is now configurable object 2023-10-16 00:12:38 +03:00
fd01a25352 Implemented basic version of configurable Witch Hut 2023-10-16 00:12:38 +03:00
ab373f08ab Use meta string for messages 2023-09-27 23:11:11 +02:00
e8453916cf Merge remote-tracking branch 'vcmi/beta' into develop 2023-09-08 18:49:06 +03:00