1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00
Commit Graph

179 Commits

Author SHA1 Message Date
62cd8b12d4 Converted several namespace enums to enum class 2023-08-25 13:38:02 +03:00
6a08a96d0c Added createObject call as wrapper around NewObject netpack 2023-06-23 13:42:08 +03:00
2636a0dcc3 Moved MetaString to a new file 2023-06-20 19:37:27 +03:00
fc190b14bb Spell shrines can now be configured in json 2023-06-16 17:59:10 +03:00
351d596bdc Handle water Prisons and Taverns. 2023-06-08 09:17:08 +02:00
7db67a3101 int3 now has proper hasher function 2023-04-20 22:04:24 +03:00
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
c0b90432cb Change callback interface 2023-04-10 05:40:03 +04:00
e440343921 Bypass initial version of spell callback 2023-04-10 04:34:24 +04:00
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
9f8aa25297 Backpack limit part4 (Using cheats, buying) 2023-03-21 12:14:33 +02:00
e23766280f Backpack limit part2 (Pick up, Dig up, Object rewards) 2023-03-21 12:14:33 +02:00
4c4498b22a vcmi: modernize rest of lib 2023-03-16 17:55:20 +03:00
4617ce10e5 vcmi: allow showing more than one components in infobar
Up to 8, AFAIK. So, we can show multi-reward in infobox now.
One issue remain - cannot dynamically choose components size
based on text size.
2023-03-11 21:41:57 +03:00
4501036a04 Basic version of hero movement on map. Removed old code. 2023-03-05 17:48:02 +02:00
2c09bfb22a Fix code formatting 2022-12-30 15:51:13 +01:00
M
23de4a188b Change cartographer tile reveal logic to match H3 2022-12-30 15:09:09 +01:00
2855606a88 Enabled & fixed -Woverloaded-virtual warning from gcc/cland
- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
2022-12-07 21:50:45 +02:00
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
7e6ed0583c disable all scripting code when configuring without scripting modules 2022-09-21 19:31:42 +03:00
30b879ae5d Fixed: duplicated bonusing building. Improved: opposite bonus propagation 2021-09-12 14:30:54 +03:00
25d9ea1ddf Feature: Opposite Side Limiter 2021-09-04 14:15:38 +03:00
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
38fd05f655 Minor fix: apply Monday bonuses to heroes who have slept overnight 2020-09-28 01:32:33 +03:00
74e5c5bf05 CGameHandler: rename CPackForClient argument and add network logging 2018-04-04 14:24:32 +07:00
03cfd2cb78 Do not use StackLocation in netpacks 2018-03-17 13:24:12 +08:00
324717acbe Spelling fixes: privilaged -> privileged, retreive -> retrieve 2018-02-10 21:52:23 +03:00
e9bfbb70c1 Ambient sounds: implement chebyshev distance for getTilesInRange 2018-01-02 09:48:17 +01:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
a85b4cf2a5 * WIP on event condition format
* Hero portrait serialization
* Fix town spells serialization

* Added support for float exponential part in Json
* Added support for int64 in Json
* Added basic Hero definitions serialization
* Added rumors serialization
* Advanced player info serialization.
* Added Disposed heroes serialization, (!) not covered with tests yet
* Added Local event serialization
* Added Pandoras box serialization
* Added Seer hut reward serialization
* Added CQuest serialization
* Added API for map object instance names serialization.
* Added random dwelling options serialization
* Advanced town options serialization
* Advanced hero options serialization
* More map format tests
* A lot of fixes, cleanup and refactoring
2017-05-27 00:23:19 +03:00
c8bcb14d34 CCallbackBase: add CRandomGenerator to all callbacks
This is easiest way to make server RNG available to CBattleInfoCallback.

Now server, client and gamestate have own RNG instance.
Only server and gamestate RNGs are serialized.
2016-09-09 23:16:42 +03:00
2ba3b20928 Multiple changes to RNG usage to both client and server
Server should never use RNG from CGameState directly.
Instead server get's own RNG that's state is secret for client.
2016-09-09 23:16:42 +03:00
bdc369ffba Patrol: use manhattan distance for getting tiles in radius 2015-12-04 21:08:09 +03:00
e82dfb5a85 fixed mantiss 0002254 2015-09-04 18:08:25 +03:00
21aaad6972 MoveHero: add transit movement option
Transit is new option for hero movement. If it passed for movement then hero can get get on tile without visiting of object on it.
Currently it's will be only allowed is object under destination is teleport.
2015-03-08 17:04:09 +03:00
25656aa586 Add showTeleportDialog everywhere except actual code for AI and player
Just like TeleportDialog it's based off showBlockingDialog, but as number of package is higher when possible showTeleportDialog will be after other dialogs handling code.
2015-03-08 16:52:50 +03:00
a0689fa377 Refactoring of hoverText from objects:
- removed hoverText field
- split getHoverText() method into 3:
- - getObjectName() for generic name
- - getHoverText(Player) for player-specific text
- - getHoverText(Hero) for hero-specific strings
2014-06-24 20:39:47 +03:00
ad632d1e8a Moved FoW management from CGObjectInstance to callback 2014-06-24 20:39:47 +03:00
c6238588bd Rename new files. 2014-04-20 12:58:58 +04:00
ad84ae64b0 Clean up. 2014-04-20 12:40:15 +04:00
463073ebfa Move CPrivilagedInfoCallback, IGameEventCallback and CNonConstInfoCallback to IGameCallback.h 2014-04-20 11:13:37 +04:00
927eb33c11 Split IGameCallback to reduce memory required to debug compilation. 2014-04-19 21:44:21 +04:00
fe1b16a7ec Some preparation towards mantis #1743:
- refactored CRandomGenerator (added util methods, improved method names)
- usages of std::minstd_ran are replaced by CRandomGenerator (not in entire code base, C rand() usages are still not replaced)
- refactored getArtSync method of CArtHandler -> now named pickRandomArtifact
- fixed some compiler warnings
- updated source code URL in VCMI spec
2014-03-17 19:51:07 +00:00
a3cad2883f - Restored correct specialty serialization (#1599 and all its children)
- Fixed rare AI crash
- Fixed AI visiting some objects many times
- Some cleanup and refactoring
2014-02-17 17:28:39 +00:00
f6c1dace6c Minors:
- By default, cmake will keep debug info
- removed warnings from adventure map infobox (part of #1636)
- adventure map infobox will refresh on artifact changes (part of #1636)
- moved terrain music files to terrains.json file
- player should act before AI in all games, not only campaigns
2013-12-28 18:57:08 +00:00
ee1b0459e6 Extended building dependencies:
- buiding/structure lists must use object format. This may break some
outdated mods.
- generic support for logical expressions that consist from and/or/not
operators.
- string ID's for buidings are now actually used.
2013-12-02 11:58:02 +00:00
c786a3076a - Refactored victory loss condition checks
- Added toString() method to EVictoryLossCheckResult enum class to improve debugging
- Removed mostly unused CFunctionList2
- Added missing header files for vcmiclient project to CMakeLists
- Tweaked SDL suggests bpp message a bit
- Added showInfoDialogAndWait (info dialog and waits, used from client thread) and showOkDialog (callback to ok click, used from GUI thread) to player interface
- Added showOkDialog method to CInfoWindow (unused for now, but may be used later)
2013-11-30 09:43:31 +00:00
f82122d9be second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported
- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
2013-06-29 13:05:48 +00:00
2b45e13c5c c++03 -> c++11 switch:
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions

NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +00:00
9f5d1ba623 Fixed #1271. 2013-05-27 21:46:04 +00:00