1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

map objects hierarchy now uses IGameInfoCallback

This commit is contained in:
Ivan Savenko
2025-05-14 15:50:13 +03:00
parent 6f20235d07
commit 4d4da0454f
111 changed files with 485 additions and 507 deletions

View File

@@ -19,7 +19,7 @@
VCMI_LIB_NAMESPACE_BEGIN
PathfinderOptions::PathfinderOptions(const CGameInfoCallback & cb)
PathfinderOptions::PathfinderOptions(const IGameInfoCallback & cb)
: useFlying(true)
, useWaterWalking(true)
, ignoreGuards(cb.getSettings().getBoolean(EGameSettings::PATHFINDER_IGNORE_GUARDS))
@@ -39,7 +39,7 @@ PathfinderOptions::PathfinderOptions(const CGameInfoCallback & cb)
{
}
PathfinderConfig::PathfinderConfig(std::shared_ptr<INodeStorage> nodeStorage, const CGameInfoCallback & callback, std::vector<std::shared_ptr<IPathfindingRule>> rules):
PathfinderConfig::PathfinderConfig(std::shared_ptr<INodeStorage> nodeStorage, const IGameInfoCallback & callback, std::vector<std::shared_ptr<IPathfindingRule>> rules):
nodeStorage(std::move(nodeStorage)),
rules(std::move(rules)),
options(callback)
@@ -59,7 +59,7 @@ std::vector<std::shared_ptr<IPathfindingRule>> SingleHeroPathfinderConfig::build
SingleHeroPathfinderConfig::~SingleHeroPathfinderConfig() = default;
SingleHeroPathfinderConfig::SingleHeroPathfinderConfig(CPathsInfo & out, const CGameInfoCallback & gs, const CGHeroInstance * hero)
SingleHeroPathfinderConfig::SingleHeroPathfinderConfig(CPathsInfo & out, const IGameInfoCallback & gs, const CGHeroInstance * hero)
: PathfinderConfig(std::make_shared<NodeStorage>(out, hero), gs, buildRuleSet())
, hero(hero)
{