mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-25 00:37:24 +02:00
Merge pull request #2175 from IvanSavenko/map_format_mappings
HotA map format support - object mapping
This commit is contained in:
@ -9,7 +9,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "../StdInc.h"
|
#include "../StdInc.h"
|
||||||
#include "../Engine/Nullkiller.h"
|
#include "../Engine/Nullkiller.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../Engine/Nullkiller.h"
|
#include "../Engine/Nullkiller.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "../StdInc.h"
|
#include "../StdInc.h"
|
||||||
#include "lib/mapping/CMap.h" //for victory conditions
|
#include "DangerHitMapAnalyzer.h"
|
||||||
|
|
||||||
#include "../Engine/Nullkiller.h"
|
#include "../Engine/Nullkiller.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
namespace NKAI
|
namespace NKAI
|
||||||
{
|
{
|
||||||
|
|
||||||
|
struct AIPath;
|
||||||
|
|
||||||
struct HitMapInfo
|
struct HitMapInfo
|
||||||
{
|
{
|
||||||
static HitMapInfo NoTreat;
|
static HitMapInfo NoTreat;
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include "../Goals/ExecuteHeroChain.h"
|
#include "../Goals/ExecuteHeroChain.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../Engine/Nullkiller.h"
|
#include "../Engine/Nullkiller.h"
|
||||||
#include "lib/mapping/CMap.h" //for victory conditions
|
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "../Goals/Composition.h"
|
#include "../Goals/Composition.h"
|
||||||
#include "../Goals/BuildThis.h"
|
#include "../Goals/BuildThis.h"
|
||||||
#include "../Goals/SaveResources.h"
|
#include "../Goals/SaveResources.h"
|
||||||
#include "lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "lib/CPathfinder.h"
|
#include "lib/CPathfinder.h"
|
||||||
#include "../Engine/Nullkiller.h"
|
#include "../Engine/Nullkiller.h"
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "../AIUtility.h"
|
#include "../AIUtility.h"
|
||||||
#include "../Goals/BuyArmy.h"
|
#include "../Goals/BuyArmy.h"
|
||||||
#include "../Engine/Nullkiller.h"
|
#include "../Engine/Nullkiller.h"
|
||||||
#include "lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "lib/CPathfinder.h"
|
#include "lib/CPathfinder.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "../Goals/CaptureObject.h"
|
#include "../Goals/CaptureObject.h"
|
||||||
#include "../Markers/DefendTown.h"
|
#include "../Markers/DefendTown.h"
|
||||||
#include "../Goals/ExchangeSwapTownHeroes.h"
|
#include "../Goals/ExchangeSwapTownHeroes.h"
|
||||||
#include "lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "lib/CPathfinder.h"
|
#include "lib/CPathfinder.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "../Markers/ArmyUpgrade.h"
|
#include "../Markers/ArmyUpgrade.h"
|
||||||
#include "GatherArmyBehavior.h"
|
#include "GatherArmyBehavior.h"
|
||||||
#include "../AIUtility.h"
|
#include "../AIUtility.h"
|
||||||
#include "lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "lib/CPathfinder.h"
|
#include "lib/CPathfinder.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "../AIUtility.h"
|
#include "../AIUtility.h"
|
||||||
#include "../Goals/RecruitHero.h"
|
#include "../Goals/RecruitHero.h"
|
||||||
#include "../Goals/ExecuteHeroChain.h"
|
#include "../Goals/ExecuteHeroChain.h"
|
||||||
#include "lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "lib/CPathfinder.h"
|
#include "lib/CPathfinder.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "../Goals/RecruitHero.h"
|
#include "../Goals/RecruitHero.h"
|
||||||
#include "../Goals/ExecuteHeroChain.h"
|
#include "../Goals/ExecuteHeroChain.h"
|
||||||
#include "../Goals/ExchangeSwapTownHeroes.h"
|
#include "../Goals/ExchangeSwapTownHeroes.h"
|
||||||
#include "lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "lib/mapObjects/MapObjects.h" //for victory conditions
|
#include "lib/mapObjects/MapObjects.h" //for victory conditions
|
||||||
#include "lib/CPathfinder.h"
|
#include "lib/CPathfinder.h"
|
||||||
#include "../Engine/Nullkiller.h"
|
#include "../Engine/Nullkiller.h"
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "AbstractGoal.h"
|
#include "AbstractGoal.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "AdventureSpellCast.h"
|
#include "AdventureSpellCast.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "BuildBoat.h"
|
#include "BuildBoat.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../Behaviors/CaptureObjectsBehavior.h"
|
#include "../Behaviors/CaptureObjectsBehavior.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "BuildThis.h"
|
#include "BuildThis.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../AIUtility.h"
|
#include "../AIUtility.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "CompleteQuest.h"
|
#include "CompleteQuest.h"
|
||||||
#include "../Behaviors/CaptureObjectsBehavior.h"
|
#include "../Behaviors/CaptureObjectsBehavior.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/VCMI_Lib.h"
|
#include "../../../lib/VCMI_Lib.h"
|
||||||
#include "../../../lib/CGeneralTextHandler.h"
|
#include "../../../lib/CGeneralTextHandler.h"
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "Composition.h"
|
#include "Composition.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../AIUtility.h"
|
#include "../AIUtility.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "DismissHero.h"
|
#include "DismissHero.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "ExchangeSwapTownHeroes.h"
|
#include "ExchangeSwapTownHeroes.h"
|
||||||
#include "ExecuteHeroChain.h"
|
#include "ExecuteHeroChain.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../Engine/Nullkiller.h"
|
#include "../Engine/Nullkiller.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "ExecuteHeroChain.h"
|
#include "ExecuteHeroChain.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../Engine/Nullkiller.h"
|
#include "../Engine/Nullkiller.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "Goals.h"
|
#include "Goals.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../AIUtility.h"
|
#include "../AIUtility.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "SaveResources.h"
|
#include "SaveResources.h"
|
||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../Behaviors/CaptureObjectsBehavior.h"
|
#include "../Behaviors/CaptureObjectsBehavior.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include "BattleAction.h"
|
#include "BattleAction.h"
|
||||||
#include "../../AIGateway.h"
|
#include "../../AIGateway.h"
|
||||||
#include "../../Goals/CompleteQuest.h"
|
#include "../../Goals/CompleteQuest.h"
|
||||||
#include "../../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "../../Goals/CaptureObject.h"
|
#include "../../Goals/CaptureObject.h"
|
||||||
#include "../../Goals/Invalid.h"
|
#include "../../Goals/Invalid.h"
|
||||||
#include "../../Goals/BuildBoat.h"
|
#include "../../Goals/BuildBoat.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
#include "BoatActions.h"
|
#include "BoatActions.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "SpecialAction.h"
|
#include "SpecialAction.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include "BuyArmyAction.h"
|
#include "BuyArmyAction.h"
|
||||||
#include "../../AIGateway.h"
|
#include "../../AIGateway.h"
|
||||||
#include "../../Goals/CompleteQuest.h"
|
#include "../../Goals/CompleteQuest.h"
|
||||||
#include "../../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include "QuestAction.h"
|
#include "QuestAction.h"
|
||||||
#include "../../AIGateway.h"
|
#include "../../AIGateway.h"
|
||||||
#include "../../Goals/CompleteQuest.h"
|
#include "../../Goals/CompleteQuest.h"
|
||||||
#include "../../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "../../Goals/AdventureSpellCast.h"
|
#include "../../Goals/AdventureSpellCast.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
#include "TownPortalAction.h"
|
#include "TownPortalAction.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "SpecialAction.h"
|
#include "SpecialAction.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
#include "../../Goals/AdventureSpellCast.h"
|
#include "../../Goals/AdventureSpellCast.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include "../AIGateway.h"
|
#include "../AIGateway.h"
|
||||||
#include "../Engine/Nullkiller.h"
|
#include "../Engine/Nullkiller.h"
|
||||||
#include "../../../CCallback.h"
|
#include "../../../CCallback.h"
|
||||||
#include "../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../lib/mapObjects/MapObjects.h"
|
#include "../../../lib/mapObjects/MapObjects.h"
|
||||||
#include "Actions/BuyArmyAction.h"
|
#include "Actions/BuyArmyAction.h"
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "../../AIGateway.h"
|
#include "../../AIGateway.h"
|
||||||
#include "../Actions/BoatActions.h"
|
#include "../Actions/BoatActions.h"
|
||||||
#include "../../../../CCallback.h"
|
#include "../../../../CCallback.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "../AINodeStorage.h"
|
#include "../AINodeStorage.h"
|
||||||
#include "../../AIGateway.h"
|
#include "../../AIGateway.h"
|
||||||
#include "../../../../CCallback.h"
|
#include "../../../../CCallback.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "../AINodeStorage.h"
|
#include "../AINodeStorage.h"
|
||||||
#include "../../AIGateway.h"
|
#include "../../AIGateway.h"
|
||||||
#include "../../../../CCallback.h"
|
#include "../../../../CCallback.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "../AINodeStorage.h"
|
#include "../AINodeStorage.h"
|
||||||
#include "../../AIGateway.h"
|
#include "../../AIGateway.h"
|
||||||
#include "../../../../CCallback.h"
|
#include "../../../../CCallback.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
|
|
||||||
namespace NKAI
|
namespace NKAI
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "../VCAI.h"
|
#include "../VCAI.h"
|
||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../AIhelper.h"
|
#include "../AIhelper.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
#include "../../../lib/mapObjects/CGTownInstance.h"
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
|
|
||||||
extern boost::thread_specific_ptr<CCallback> cb;
|
extern boost::thread_specific_ptr<CCallback> cb;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
#include "../../../lib/mapObjects/CGTownInstance.h"
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include "../VCAI.h"
|
#include "../VCAI.h"
|
||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../AIhelper.h"
|
#include "../AIhelper.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
|
|
||||||
extern boost::thread_specific_ptr<CCallback> cb;
|
extern boost::thread_specific_ptr<CCallback> cb;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
#include "../../../lib/mapObjects/CGTownInstance.h"
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
#include "../../../lib/mapObjects/CGMarket.h"
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "../VCAI.h"
|
#include "../VCAI.h"
|
||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../AIhelper.h"
|
#include "../AIhelper.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
#include "../../../lib/mapObjects/CQuest.h"
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
|
|
||||||
extern boost::thread_specific_ptr<CCallback> cb;
|
extern boost::thread_specific_ptr<CCallback> cb;
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
#include "../../../lib/CPlayerState.h"
|
#include "../../../lib/CPlayerState.h"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
#include "../../../lib/mapObjects/CGTownInstance.h"
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
#include "../../../lib/mapObjects/CGTownInstance.h"
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
|
|
||||||
|
|
||||||
extern boost::thread_specific_ptr<CCallback> cb;
|
extern boost::thread_specific_ptr<CCallback> cb;
|
||||||
extern boost::thread_specific_ptr<VCAI> ai;
|
extern boost::thread_specific_ptr<VCAI> ai;
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
#include "../FuzzyHelper.h"
|
#include "../FuzzyHelper.h"
|
||||||
#include "../ResourceManager.h"
|
#include "../ResourceManager.h"
|
||||||
#include "../BuildingManager.h"
|
#include "../BuildingManager.h"
|
||||||
#include "../../../lib/mapping/CMap.h" //for victory conditions
|
#include "../../../lib/mapping/CMapHeader.h" //for victory conditions
|
||||||
|
#include "../../../lib/mapObjects/CGTownInstance.h"
|
||||||
#include "../../../lib/CPathfinder.h"
|
#include "../../../lib/CPathfinder.h"
|
||||||
#include "../../../lib/StringConstants.h"
|
#include "../../../lib/StringConstants.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include "AIPathfinder.h"
|
#include "AIPathfinder.h"
|
||||||
#include "AIPathfinderConfig.h"
|
#include "AIPathfinderConfig.h"
|
||||||
#include "../../../CCallback.h"
|
#include "../../../CCallback.h"
|
||||||
#include "../../../lib/mapping/CMap.h"
|
#include "../../../lib/mapping/CMapDefines.h"
|
||||||
|
|
||||||
std::vector<std::shared_ptr<AINodeStorage>> AIPathfinder::storagePool;
|
std::vector<std::shared_ptr<AINodeStorage>> AIPathfinder::storagePool;
|
||||||
std::map<HeroPtr, std::shared_ptr<AINodeStorage>> AIPathfinder::storageMap;
|
std::map<HeroPtr, std::shared_ptr<AINodeStorage>> AIPathfinder::storageMap;
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "../../Goals/AdventureSpellCast.h"
|
#include "../../Goals/AdventureSpellCast.h"
|
||||||
#include "../../Goals/BuildBoat.h"
|
#include "../../Goals/BuildBoat.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
#include "BoatActions.h"
|
#include "BoatActions.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ISpecialAction.h"
|
#include "ISpecialAction.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
|
|
||||||
namespace AIPathfinding
|
namespace AIPathfinding
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "../../Goals/AdventureSpellCast.h"
|
#include "../../Goals/AdventureSpellCast.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
#include "TownPortalAction.h"
|
#include "TownPortalAction.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ISpecialAction.h"
|
#include "ISpecialAction.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
#include "../../Goals/AdventureSpellCast.h"
|
#include "../../Goals/AdventureSpellCast.h"
|
||||||
|
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
#include "AIPathfinderConfig.h"
|
#include "AIPathfinderConfig.h"
|
||||||
#include "../Goals/Goals.h"
|
#include "../Goals/Goals.h"
|
||||||
#include "../../../lib/CGameInfoCallback.h"
|
#include "../../../lib/CGameInfoCallback.h"
|
||||||
#include "../../../lib/mapping/CMap.h"
|
#include "../../../lib/mapping/CMapDefines.h"
|
||||||
|
#include "../../../lib/mapObjects/CQuest.h"
|
||||||
|
|
||||||
PathfindingManager::PathfindingManager(CPlayerSpecificInfoCallback * CB, VCAI * AI)
|
PathfindingManager::PathfindingManager(CPlayerSpecificInfoCallback * CB, VCAI * AI)
|
||||||
: ai(AI), cb(CB)
|
: ai(AI), cb(CB)
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "../../VCAI.h"
|
#include "../../VCAI.h"
|
||||||
#include "../Actions/BoatActions.h"
|
#include "../Actions/BoatActions.h"
|
||||||
#include "../../../../CCallback.h"
|
#include "../../../../CCallback.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
|
|
||||||
namespace AIPathfinding
|
namespace AIPathfinding
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "../AINodeStorage.h"
|
#include "../AINodeStorage.h"
|
||||||
#include "../../VCAI.h"
|
#include "../../VCAI.h"
|
||||||
#include "../../../../CCallback.h"
|
#include "../../../../CCallback.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
|
|
||||||
namespace AIPathfinding
|
namespace AIPathfinding
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "../AINodeStorage.h"
|
#include "../AINodeStorage.h"
|
||||||
#include "../../VCAI.h"
|
#include "../../VCAI.h"
|
||||||
#include "../../../../CCallback.h"
|
#include "../../../../CCallback.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
|
|
||||||
namespace AIPathfinding
|
namespace AIPathfinding
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "../AINodeStorage.h"
|
#include "../AINodeStorage.h"
|
||||||
#include "../../VCAI.h"
|
#include "../../VCAI.h"
|
||||||
#include "../../../../CCallback.h"
|
#include "../../../../CCallback.h"
|
||||||
#include "../../../../lib/mapping/CMap.h"
|
|
||||||
#include "../../../../lib/mapObjects/MapObjects.h"
|
#include "../../../../lib/mapObjects/MapObjects.h"
|
||||||
|
|
||||||
namespace AIPathfinding
|
namespace AIPathfinding
|
||||||
|
Binary file not shown.
@ -2,6 +2,6 @@
|
|||||||
"basepath" : "mapFormatIcons/",
|
"basepath" : "mapFormatIcons/",
|
||||||
"images" :
|
"images" :
|
||||||
[
|
[
|
||||||
{ "group" : 1, "frame" : 0, "file" : "vcmi1.png"}
|
{ "frame" : 3, "file" : "vcmi1.png"}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -53,13 +53,14 @@
|
|||||||
#include "../lib/spells/CSpellHandler.h"
|
#include "../lib/spells/CSpellHandler.h"
|
||||||
#include "../lib/CTownHandler.h"
|
#include "../lib/CTownHandler.h"
|
||||||
#include "../lib/mapObjects/CObjectClassesHandler.h" // For displaying correct UI when interacting with objects
|
#include "../lib/mapObjects/CObjectClassesHandler.h" // For displaying correct UI when interacting with objects
|
||||||
|
#include "../lib/mapObjects/CGTownInstance.h"
|
||||||
|
#include "../lib/mapObjects/MiscObjects.h"
|
||||||
#include "../lib/CStack.h"
|
#include "../lib/CStack.h"
|
||||||
#include "../lib/JsonNode.h"
|
#include "../lib/JsonNode.h"
|
||||||
#include "CMusicHandler.h"
|
#include "CMusicHandler.h"
|
||||||
#include "../lib/CondSh.h"
|
#include "../lib/CondSh.h"
|
||||||
#include "../lib/NetPacksBase.h"
|
#include "../lib/NetPacksBase.h"
|
||||||
#include "../lib/NetPacks.h"//todo: remove
|
#include "../lib/NetPacks.h"//todo: remove
|
||||||
#include "../lib/mapping/CMap.h"
|
|
||||||
#include "../lib/VCMIDirs.h"
|
#include "../lib/VCMIDirs.h"
|
||||||
#include "../lib/CStopWatch.h"
|
#include "../lib/CStopWatch.h"
|
||||||
#include "../lib/StartInfo.h"
|
#include "../lib/StartInfo.h"
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
#include "../lib/StartInfo.h"
|
#include "../lib/StartInfo.h"
|
||||||
#include "../lib/VCMIDirs.h"
|
#include "../lib/VCMIDirs.h"
|
||||||
#include "../lib/mapping/CCampaignHandler.h"
|
#include "../lib/mapping/CCampaignHandler.h"
|
||||||
#include "../lib/mapping/CMap.h"
|
|
||||||
#include "../lib/mapping/CMapInfo.h"
|
#include "../lib/mapping/CMapInfo.h"
|
||||||
#include "../lib/mapObjects/MiscObjects.h"
|
#include "../lib/mapObjects/MiscObjects.h"
|
||||||
#include "../lib/rmg/CMapGenOptions.h"
|
#include "../lib/rmg/CMapGenOptions.h"
|
||||||
|
@ -37,8 +37,9 @@
|
|||||||
#include "../../lib/CGeneralTextHandler.h"
|
#include "../../lib/CGeneralTextHandler.h"
|
||||||
#include "../../lib/spells/CSpellHandler.h"
|
#include "../../lib/spells/CSpellHandler.h"
|
||||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||||
|
#include "../../lib/mapObjects/CGTownInstance.h"
|
||||||
#include "../../lib/CPathfinder.h"
|
#include "../../lib/CPathfinder.h"
|
||||||
#include "../../lib/mapping/CMap.h"
|
#include "../../lib/mapping/CMapDefines.h"
|
||||||
|
|
||||||
std::shared_ptr<AdventureMapInterface> adventureInt;
|
std::shared_ptr<AdventureMapInterface> adventureInt;
|
||||||
|
|
||||||
|
@ -8,12 +8,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "../../lib/mapping/CCampaignHandler.h"
|
|
||||||
#include "../windows/CWindowObject.h"
|
#include "../windows/CWindowObject.h"
|
||||||
|
|
||||||
VCMI_LIB_NAMESPACE_BEGIN
|
VCMI_LIB_NAMESPACE_BEGIN
|
||||||
|
|
||||||
class CCampaignState;
|
class CCampaignState;
|
||||||
|
struct CampaignRegions;
|
||||||
|
|
||||||
VCMI_LIB_NAMESPACE_END
|
VCMI_LIB_NAMESPACE_END
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "../../lib/CGeneralTextHandler.h"
|
#include "../../lib/CGeneralTextHandler.h"
|
||||||
#include "../../lib/StartInfo.h"
|
#include "../../lib/StartInfo.h"
|
||||||
#include "../../lib/mapping/CMapInfo.h"
|
#include "../../lib/mapping/CMapInfo.h"
|
||||||
#include "../../lib/mapping/CMap.h"
|
#include "../../lib/mapping/CMapHeader.h"
|
||||||
#include "../gui/CGuiHandler.h"
|
#include "../gui/CGuiHandler.h"
|
||||||
#include "../CGameInfo.h"
|
#include "../CGameInfo.h"
|
||||||
#include "../CPlayerInterface.h"
|
#include "../CPlayerInterface.h"
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "../../CCallback.h"
|
#include "../../CCallback.h"
|
||||||
|
|
||||||
#include "../CGameInfo.h"
|
#include "../CGameInfo.h"
|
||||||
|
#include "../../lib/CModHandler.h"
|
||||||
#include "../../lib/NetPacksLobby.h"
|
#include "../../lib/NetPacksLobby.h"
|
||||||
#include "../../lib/CGeneralTextHandler.h"
|
#include "../../lib/CGeneralTextHandler.h"
|
||||||
#include "../../lib/mapping/CMapInfo.h"
|
#include "../../lib/mapping/CMapInfo.h"
|
||||||
@ -134,7 +135,7 @@ void CLobbyScreen::startScenario(bool allowOnlyAI)
|
|||||||
{
|
{
|
||||||
logGlobal->warn("Incompatibility exception during start scenario: %s", e.what());
|
logGlobal->warn("Incompatibility exception during start scenario: %s", e.what());
|
||||||
|
|
||||||
auto errorMsg = VLC->generaltexth->translate("vcmi.server.errors.modsIncompatibility") + '\n';
|
auto errorMsg = CGI->generaltexth->translate("vcmi.server.errors.modsIncompatibility") + '\n';
|
||||||
errorMsg += e.what();
|
errorMsg += e.what();
|
||||||
|
|
||||||
CInfoWindow::showInfoDialog(errorMsg, CInfoWindow::TCompsInfo(), PlayerColor(1));
|
CInfoWindow::showInfoDialog(errorMsg, CInfoWindow::TCompsInfo(), PlayerColor(1));
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "../../lib/StartInfo.h"
|
#include "../../lib/StartInfo.h"
|
||||||
#include "../../lib/filesystem/Filesystem.h"
|
#include "../../lib/filesystem/Filesystem.h"
|
||||||
#include "../../lib/mapping/CMapInfo.h"
|
#include "../../lib/mapping/CMapInfo.h"
|
||||||
#include "../../lib/mapping/CMap.h"
|
#include "../../lib/mapping/CMapHeader.h"
|
||||||
|
|
||||||
CSavingScreen::CSavingScreen()
|
CSavingScreen::CSavingScreen()
|
||||||
: CSelectionBase(ESelectionScreen::saveGame)
|
: CSelectionBase(ESelectionScreen::saveGame)
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "../../lib/CGeneralTextHandler.h"
|
#include "../../lib/CGeneralTextHandler.h"
|
||||||
#include "../../lib/StartInfo.h"
|
#include "../../lib/StartInfo.h"
|
||||||
#include "../../lib/mapping/CMapInfo.h"
|
#include "../../lib/mapping/CMapInfo.h"
|
||||||
|
#include "../../lib/mapping/CMapHeader.h"
|
||||||
|
|
||||||
CScenarioInfoScreen::CScenarioInfoScreen()
|
CScenarioInfoScreen::CScenarioInfoScreen()
|
||||||
{
|
{
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "../../lib/CThreadHelper.h"
|
#include "../../lib/CThreadHelper.h"
|
||||||
#include "../../lib/filesystem/Filesystem.h"
|
#include "../../lib/filesystem/Filesystem.h"
|
||||||
#include "../../lib/mapping/CMapInfo.h"
|
#include "../../lib/mapping/CMapInfo.h"
|
||||||
|
#include "../../lib/mapping/CMapHeader.h"
|
||||||
#include "../../lib/serializer/Connection.h"
|
#include "../../lib/serializer/Connection.h"
|
||||||
|
|
||||||
ISelectionScreenInfo::ISelectionScreenInfo(ESelectionScreen ScreenType)
|
ISelectionScreenInfo::ISelectionScreenInfo(ESelectionScreen ScreenType)
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
|
#include "OptionsTab.h"
|
||||||
|
|
||||||
#include "CSelectionBase.h"
|
#include "CSelectionBase.h"
|
||||||
#include "OptionsTab.h"
|
|
||||||
|
|
||||||
#include "../CGameInfo.h"
|
#include "../CGameInfo.h"
|
||||||
#include "../CServerHandler.h"
|
#include "../CServerHandler.h"
|
||||||
@ -29,8 +29,8 @@
|
|||||||
#include "../../lib/CArtHandler.h"
|
#include "../../lib/CArtHandler.h"
|
||||||
#include "../../lib/CTownHandler.h"
|
#include "../../lib/CTownHandler.h"
|
||||||
#include "../../lib/CHeroHandler.h"
|
#include "../../lib/CHeroHandler.h"
|
||||||
#include "../../lib/mapping/CMap.h"
|
|
||||||
#include "../../lib/mapping/CMapInfo.h"
|
#include "../../lib/mapping/CMapInfo.h"
|
||||||
|
#include "../../lib/mapping/CMapHeader.h"
|
||||||
|
|
||||||
OptionsTab::OptionsTab() : humanPlayers(0)
|
OptionsTab::OptionsTab() : humanPlayers(0)
|
||||||
{
|
{
|
||||||
@ -441,13 +441,15 @@ void OptionsTab::SelectedBox::clickRight(tribool down, bool previousState)
|
|||||||
}
|
}
|
||||||
|
|
||||||
OptionsTab::PlayerOptionsEntry::PlayerOptionsEntry(const PlayerSettings & S, const OptionsTab & parent)
|
OptionsTab::PlayerOptionsEntry::PlayerOptionsEntry(const PlayerSettings & S, const OptionsTab & parent)
|
||||||
: pi(SEL->getPlayerInfo(S.color.getNum())), s(S), parentTab(parent)
|
: pi(std::make_unique<PlayerInfo>(SEL->getPlayerInfo(S.color.getNum())))
|
||||||
|
, s(std::make_unique<PlayerSettings>(S))
|
||||||
|
, parentTab(parent)
|
||||||
{
|
{
|
||||||
OBJ_CONSTRUCTION;
|
OBJ_CONSTRUCTION;
|
||||||
defActions |= SHARE_POS;
|
defActions |= SHARE_POS;
|
||||||
|
|
||||||
int serial = 0;
|
int serial = 0;
|
||||||
for(int g = 0; g < s.color.getNum(); ++g)
|
for(int g = 0; g < s->color.getNum(); ++g)
|
||||||
{
|
{
|
||||||
auto itred = SEL->getPlayerInfo(g);
|
auto itred = SEL->getPlayerInfo(g);
|
||||||
if(itred.canComputerPlay || itred.canHumanPlay)
|
if(itred.canComputerPlay || itred.canHumanPlay)
|
||||||
@ -458,7 +460,7 @@ OptionsTab::PlayerOptionsEntry::PlayerOptionsEntry(const PlayerSettings & S, con
|
|||||||
pos.y += 122 + serial * 50;
|
pos.y += 122 + serial * 50;
|
||||||
|
|
||||||
assert(CSH->mi && CSH->mi->mapHeader);
|
assert(CSH->mi && CSH->mi->mapHeader);
|
||||||
const PlayerInfo & p = SEL->getPlayerInfo(s.color.getNum());
|
const PlayerInfo & p = SEL->getPlayerInfo(s->color.getNum());
|
||||||
assert(p.canComputerPlay || p.canHumanPlay); //someone must be able to control this player
|
assert(p.canComputerPlay || p.canHumanPlay); //someone must be able to control this player
|
||||||
if(p.canHumanPlay && p.canComputerPlay)
|
if(p.canHumanPlay && p.canComputerPlay)
|
||||||
whoCanPlay = HUMAN_OR_CPU;
|
whoCanPlay = HUMAN_OR_CPU;
|
||||||
@ -478,29 +480,29 @@ OptionsTab::PlayerOptionsEntry::PlayerOptionsEntry(const PlayerSettings & S, con
|
|||||||
"ADOPOPNL.bmp", "ADOPPPNL.bmp", "ADOPTPNL.bmp", "ADOPSPNL.bmp"
|
"ADOPOPNL.bmp", "ADOPPPNL.bmp", "ADOPTPNL.bmp", "ADOPSPNL.bmp"
|
||||||
}};
|
}};
|
||||||
|
|
||||||
background = std::make_shared<CPicture>(bgs[s.color.getNum()], 0, 0);
|
background = std::make_shared<CPicture>(bgs[s->color.getNum()], 0, 0);
|
||||||
labelPlayerName = std::make_shared<CLabel>(55, 10, EFonts::FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, s.name);
|
labelPlayerName = std::make_shared<CLabel>(55, 10, EFonts::FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, s->name);
|
||||||
labelWhoCanPlay = std::make_shared<CMultiLineLabel>(Rect(6, 23, 45, (int)graphics->fonts[EFonts::FONT_TINY]->getLineHeight()*2), EFonts::FONT_TINY, ETextAlignment::CENTER, Colors::WHITE, CGI->generaltexth->arraytxt[206 + whoCanPlay]);
|
labelWhoCanPlay = std::make_shared<CMultiLineLabel>(Rect(6, 23, 45, (int)graphics->fonts[EFonts::FONT_TINY]->getLineHeight()*2), EFonts::FONT_TINY, ETextAlignment::CENTER, Colors::WHITE, CGI->generaltexth->arraytxt[206 + whoCanPlay]);
|
||||||
|
|
||||||
if(SEL->screenType == ESelectionScreen::newGame)
|
if(SEL->screenType == ESelectionScreen::newGame)
|
||||||
{
|
{
|
||||||
buttonTownLeft = std::make_shared<CButton>(Point(107, 5), "ADOPLFA.DEF", CGI->generaltexth->zelp[132], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::TOWN, -1, s.color));
|
buttonTownLeft = std::make_shared<CButton>(Point(107, 5), "ADOPLFA.DEF", CGI->generaltexth->zelp[132], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::TOWN, -1, s->color));
|
||||||
buttonTownRight = std::make_shared<CButton>(Point(168, 5), "ADOPRTA.DEF", CGI->generaltexth->zelp[133], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::TOWN, +1, s.color));
|
buttonTownRight = std::make_shared<CButton>(Point(168, 5), "ADOPRTA.DEF", CGI->generaltexth->zelp[133], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::TOWN, +1, s->color));
|
||||||
buttonHeroLeft = std::make_shared<CButton>(Point(183, 5), "ADOPLFA.DEF", CGI->generaltexth->zelp[148], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::HERO, -1, s.color));
|
buttonHeroLeft = std::make_shared<CButton>(Point(183, 5), "ADOPLFA.DEF", CGI->generaltexth->zelp[148], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::HERO, -1, s->color));
|
||||||
buttonHeroRight = std::make_shared<CButton>(Point(244, 5), "ADOPRTA.DEF", CGI->generaltexth->zelp[149], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::HERO, +1, s.color));
|
buttonHeroRight = std::make_shared<CButton>(Point(244, 5), "ADOPRTA.DEF", CGI->generaltexth->zelp[149], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::HERO, +1, s->color));
|
||||||
buttonBonusLeft = std::make_shared<CButton>(Point(259, 5), "ADOPLFA.DEF", CGI->generaltexth->zelp[164], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::BONUS, -1, s.color));
|
buttonBonusLeft = std::make_shared<CButton>(Point(259, 5), "ADOPLFA.DEF", CGI->generaltexth->zelp[164], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::BONUS, -1, s->color));
|
||||||
buttonBonusRight = std::make_shared<CButton>(Point(320, 5), "ADOPRTA.DEF", CGI->generaltexth->zelp[165], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::BONUS, +1, s.color));
|
buttonBonusRight = std::make_shared<CButton>(Point(320, 5), "ADOPRTA.DEF", CGI->generaltexth->zelp[165], std::bind(&IServerAPI::setPlayerOption, CSH, LobbyChangePlayerOption::BONUS, +1, s->color));
|
||||||
}
|
}
|
||||||
|
|
||||||
hideUnavailableButtons();
|
hideUnavailableButtons();
|
||||||
|
|
||||||
if(SEL->screenType != ESelectionScreen::scenarioInfo && SEL->getPlayerInfo(s.color.getNum()).canHumanPlay)
|
if(SEL->screenType != ESelectionScreen::scenarioInfo && SEL->getPlayerInfo(s->color.getNum()).canHumanPlay)
|
||||||
{
|
{
|
||||||
flag = std::make_shared<CButton>(
|
flag = std::make_shared<CButton>(
|
||||||
Point(-43, 2),
|
Point(-43, 2),
|
||||||
flags[s.color.getNum()],
|
flags[s->color.getNum()],
|
||||||
CGI->generaltexth->zelp[180],
|
CGI->generaltexth->zelp[180],
|
||||||
std::bind(&OptionsTab::onSetPlayerClicked, &parentTab, s)
|
std::bind(&OptionsTab::onSetPlayerClicked, &parentTab, *s)
|
||||||
);
|
);
|
||||||
flag->hoverable = true;
|
flag->hoverable = true;
|
||||||
flag->block(CSH->isGuest());
|
flag->block(CSH->isGuest());
|
||||||
@ -508,9 +510,9 @@ OptionsTab::PlayerOptionsEntry::PlayerOptionsEntry(const PlayerSettings & S, con
|
|||||||
else
|
else
|
||||||
flag = nullptr;
|
flag = nullptr;
|
||||||
|
|
||||||
town = std::make_shared<SelectedBox>(Point(119, 2), s, TOWN);
|
town = std::make_shared<SelectedBox>(Point(119, 2), *s, TOWN);
|
||||||
hero = std::make_shared<SelectedBox>(Point(195, 2), s, HERO);
|
hero = std::make_shared<SelectedBox>(Point(195, 2), *s, HERO);
|
||||||
bonus = std::make_shared<SelectedBox>(Point(271, 2), s, BONUS);
|
bonus = std::make_shared<SelectedBox>(Point(271, 2), *s, BONUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionsTab::onSetPlayerClicked(const PlayerSettings & ps) const
|
void OptionsTab::onSetPlayerClicked(const PlayerSettings & ps) const
|
||||||
@ -524,9 +526,9 @@ void OptionsTab::PlayerOptionsEntry::hideUnavailableButtons()
|
|||||||
if(!buttonTownLeft)
|
if(!buttonTownLeft)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const bool foreignPlayer = CSH->isGuest() && !CSH->isMyColor(s.color);
|
const bool foreignPlayer = CSH->isGuest() && !CSH->isMyColor(s->color);
|
||||||
|
|
||||||
if((pi.allowedFactions.size() < 2 && !pi.isFactionRandom) || foreignPlayer)
|
if((pi->allowedFactions.size() < 2 && !pi->isFactionRandom) || foreignPlayer)
|
||||||
{
|
{
|
||||||
buttonTownLeft->disable();
|
buttonTownLeft->disable();
|
||||||
buttonTownRight->disable();
|
buttonTownRight->disable();
|
||||||
@ -537,7 +539,7 @@ void OptionsTab::PlayerOptionsEntry::hideUnavailableButtons()
|
|||||||
buttonTownRight->enable();
|
buttonTownRight->enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if((pi.defaultHero() != -1 || s.castle < 0) //fixed hero
|
if((pi->defaultHero() != -1 || s->castle < 0) //fixed hero
|
||||||
|| foreignPlayer) //or not our player
|
|| foreignPlayer) //or not our player
|
||||||
{
|
{
|
||||||
buttonHeroLeft->disable();
|
buttonHeroLeft->disable();
|
||||||
|
@ -9,8 +9,12 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../lib/StartInfo.h"
|
#include "../windows/CWindowObject.h"
|
||||||
#include "../../lib/mapping/CMap.h"
|
|
||||||
|
VCMI_LIB_NAMESPACE_BEGIN
|
||||||
|
struct PlayerSettings;
|
||||||
|
struct PlayerInfo;
|
||||||
|
VCMI_LIB_NAMESPACE_END
|
||||||
|
|
||||||
class CSlider;
|
class CSlider;
|
||||||
class CLabel;
|
class CLabel;
|
||||||
@ -18,6 +22,9 @@ class CMultiLineLabel;
|
|||||||
class CFilledTexture;
|
class CFilledTexture;
|
||||||
class CAnimImage;
|
class CAnimImage;
|
||||||
class CComponentBox;
|
class CComponentBox;
|
||||||
|
class CTextBox;
|
||||||
|
class CButton;
|
||||||
|
|
||||||
/// The options tab which is shown at the map selection phase.
|
/// The options tab which is shown at the map selection phase.
|
||||||
class OptionsTab : public CIntObject
|
class OptionsTab : public CIntObject
|
||||||
{
|
{
|
||||||
@ -99,8 +106,8 @@ public:
|
|||||||
|
|
||||||
struct PlayerOptionsEntry : public CIntObject
|
struct PlayerOptionsEntry : public CIntObject
|
||||||
{
|
{
|
||||||
PlayerInfo pi;
|
std::unique_ptr<PlayerInfo> pi;
|
||||||
PlayerSettings s;
|
std::unique_ptr<PlayerSettings> s;
|
||||||
std::shared_ptr<CLabel> labelPlayerName;
|
std::shared_ptr<CLabel> labelPlayerName;
|
||||||
std::shared_ptr<CMultiLineLabel> labelWhoCanPlay;
|
std::shared_ptr<CMultiLineLabel> labelWhoCanPlay;
|
||||||
std::shared_ptr<CPicture> background;
|
std::shared_ptr<CPicture> background;
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
#include "../../lib/CGeneralTextHandler.h"
|
#include "../../lib/CGeneralTextHandler.h"
|
||||||
#include "../../lib/mapping/CMapInfo.h"
|
#include "../../lib/mapping/CMapInfo.h"
|
||||||
#include "../../lib/mapping/CMap.h"
|
#include "../../lib/mapping/CMapHeader.h"
|
||||||
|
#include "../../lib/mapping/MapFormat.h"
|
||||||
#include "../../lib/rmg/CMapGenOptions.h"
|
#include "../../lib/rmg/CMapGenOptions.h"
|
||||||
#include "../../lib/CModHandler.h"
|
#include "../../lib/CModHandler.h"
|
||||||
#include "../../lib/rmg/CRmgTemplateStorage.h"
|
#include "../../lib/rmg/CRmgTemplateStorage.h"
|
||||||
@ -137,7 +138,7 @@ void RandomMapTab::updateMapInfoByHost()
|
|||||||
mapInfo = std::make_shared<CMapInfo>();
|
mapInfo = std::make_shared<CMapInfo>();
|
||||||
mapInfo->isRandomMap = true;
|
mapInfo->isRandomMap = true;
|
||||||
mapInfo->mapHeader = std::make_unique<CMapHeader>();
|
mapInfo->mapHeader = std::make_unique<CMapHeader>();
|
||||||
mapInfo->mapHeader->version = EMapFormat::SOD;
|
mapInfo->mapHeader->version = EMapFormat::VCMI;
|
||||||
mapInfo->mapHeader->name = CGI->generaltexth->allTexts[740];
|
mapInfo->mapHeader->name = CGI->generaltexth->allTexts[740];
|
||||||
mapInfo->mapHeader->description = CGI->generaltexth->allTexts[741];
|
mapInfo->mapHeader->description = CGI->generaltexth->allTexts[741];
|
||||||
mapInfo->mapHeader->difficulty = 1; // Normal
|
mapInfo->mapHeader->difficulty = 1; // Normal
|
||||||
|
@ -36,7 +36,8 @@
|
|||||||
#include "../../lib/GameSettings.h"
|
#include "../../lib/GameSettings.h"
|
||||||
#include "../../lib/filesystem/Filesystem.h"
|
#include "../../lib/filesystem/Filesystem.h"
|
||||||
#include "../../lib/mapping/CMapInfo.h"
|
#include "../../lib/mapping/CMapInfo.h"
|
||||||
#include "../../lib/mapping/CMap.h"
|
#include "../../lib/mapping/CMapHeader.h"
|
||||||
|
#include "../../lib/mapping/MapFormat.h"
|
||||||
#include "../../lib/mapping/CCampaignHandler.h"
|
#include "../../lib/mapping/CCampaignHandler.h"
|
||||||
#include "../../lib/serializer/Connection.h"
|
#include "../../lib/serializer/Connection.h"
|
||||||
|
|
||||||
@ -528,6 +529,26 @@ void SelectionTab::restoreLastSelection()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SelectionTab::isMapSupported(const CMapInfo & info)
|
||||||
|
{
|
||||||
|
switch (info.mapHeader->version)
|
||||||
|
{
|
||||||
|
case EMapFormat::ROE:
|
||||||
|
return CGI->settings()->getValue(EGameSettings::MAP_FORMAT_RESTORATION_OF_ERATHIA)["supported"].Bool();
|
||||||
|
case EMapFormat::AB:
|
||||||
|
return CGI->settings()->getValue(EGameSettings::MAP_FORMAT_ARMAGEDDONS_BLADE)["supported"].Bool();
|
||||||
|
case EMapFormat::SOD:
|
||||||
|
return CGI->settings()->getValue(EGameSettings::MAP_FORMAT_SHADOW_OF_DEATH)["supported"].Bool();
|
||||||
|
case EMapFormat::WOG:
|
||||||
|
return CGI->settings()->getValue(EGameSettings::MAP_FORMAT_IN_THE_WAKE_OF_GODS)["supported"].Bool();
|
||||||
|
case EMapFormat::HOTA:
|
||||||
|
return CGI->settings()->getValue(EGameSettings::MAP_FORMAT_HORN_OF_THE_ABYSS)["supported"].Bool();
|
||||||
|
case EMapFormat::VCMI:
|
||||||
|
return CGI->settings()->getValue(EGameSettings::MAP_FORMAT_JSON_VCMI)["supported"].Bool();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void SelectionTab::parseMaps(const std::unordered_set<ResourceID> & files)
|
void SelectionTab::parseMaps(const std::unordered_set<ResourceID> & files)
|
||||||
{
|
{
|
||||||
logGlobal->debug("Parsing %d maps", files.size());
|
logGlobal->debug("Parsing %d maps", files.size());
|
||||||
@ -539,9 +560,7 @@ void SelectionTab::parseMaps(const std::unordered_set<ResourceID> & files)
|
|||||||
auto mapInfo = std::make_shared<CMapInfo>();
|
auto mapInfo = std::make_shared<CMapInfo>();
|
||||||
mapInfo->mapInit(file.getName());
|
mapInfo->mapInit(file.getName());
|
||||||
|
|
||||||
EMapFormat maxSupported = static_cast<EMapFormat>(CGI->settings()->getInteger(EGameSettings::TEXTS_MAP_VERSION));
|
if (isMapSupported(*mapInfo))
|
||||||
|
|
||||||
if(mapInfo->mapHeader->version == EMapFormat::VCMI || mapInfo->mapHeader->version <= maxSupported)
|
|
||||||
allItems.push_back(mapInfo);
|
allItems.push_back(mapInfo);
|
||||||
}
|
}
|
||||||
catch(std::exception & e)
|
catch(std::exception & e)
|
||||||
@ -676,7 +695,7 @@ void SelectionTab::ListItem::updateItem(std::shared_ptr<CMapInfo> info, bool sel
|
|||||||
labelMapSizeLetter->setText(info->getMapSizeName());
|
labelMapSizeLetter->setText(info->getMapSizeName());
|
||||||
labelMapSizeLetter->setColor(color);
|
labelMapSizeLetter->setColor(color);
|
||||||
iconFormat->enable();
|
iconFormat->enable();
|
||||||
iconFormat->setFrame(info->getMapSizeFormatIconId().first, info->getMapSizeFormatIconId().second);
|
iconFormat->setFrame(info->getMapSizeFormatIconId());
|
||||||
iconVictoryCondition->enable();
|
iconVictoryCondition->enable();
|
||||||
iconVictoryCondition->setFrame(info->mapHeader->victoryIconIndex, 0);
|
iconVictoryCondition->setFrame(info->mapHeader->victoryIconIndex, 0);
|
||||||
iconLossCondition->enable();
|
iconLossCondition->enable();
|
||||||
|
@ -93,6 +93,7 @@ private:
|
|||||||
ESelectionScreen tabType;
|
ESelectionScreen tabType;
|
||||||
Rect inputNameRect;
|
Rect inputNameRect;
|
||||||
|
|
||||||
|
bool isMapSupported(const CMapInfo & info);
|
||||||
void parseMaps(const std::unordered_set<ResourceID> & files);
|
void parseMaps(const std::unordered_set<ResourceID> & files);
|
||||||
void parseSaves(const std::unordered_set<ResourceID> & files);
|
void parseSaves(const std::unordered_set<ResourceID> & files);
|
||||||
void parseCampaigns(const std::unordered_set<ResourceID> & files);
|
void parseCampaigns(const std::unordered_set<ResourceID> & files);
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
#include "../../lib/filesystem/Filesystem.h"
|
#include "../../lib/filesystem/Filesystem.h"
|
||||||
#include "../../lib/filesystem/CCompressedStream.h"
|
#include "../../lib/filesystem/CCompressedStream.h"
|
||||||
#include "../../lib/VCMIDirs.h"
|
#include "../../lib/VCMIDirs.h"
|
||||||
#include "../../lib/mapping/CMap.h"
|
|
||||||
#include "../../lib/CStopWatch.h"
|
#include "../../lib/CStopWatch.h"
|
||||||
#include "../../lib/NetPacksLobby.h"
|
#include "../../lib/NetPacksLobby.h"
|
||||||
#include "../../lib/CThreadHelper.h"
|
#include "../../lib/CThreadHelper.h"
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "../../lib/TerrainHandler.h"
|
#include "../../lib/TerrainHandler.h"
|
||||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||||
#include "../../lib/mapObjects/MiscObjects.h"
|
#include "../../lib/mapObjects/MiscObjects.h"
|
||||||
#include "../../lib/mapping/CMap.h"
|
#include "../../lib/mapping/CMapDefines.h"
|
||||||
|
|
||||||
struct NeighborTilesInfo
|
struct NeighborTilesInfo
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
#include "../../lib/CConfigHandler.h"
|
#include "../../lib/CConfigHandler.h"
|
||||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||||
#include "../../lib/mapping/CMap.h"
|
|
||||||
|
|
||||||
BasicMapView::~BasicMapView() = default;
|
BasicMapView::~BasicMapView() = default;
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#include "../../CCallback.h"
|
#include "../../CCallback.h"
|
||||||
|
|
||||||
#include "../lib/mapObjects/CGHeroInstance.h"
|
#include "../lib/mapObjects/CGHeroInstance.h"
|
||||||
|
#include "../lib/mapObjects/CGTownInstance.h"
|
||||||
#include "../lib/CArtHandler.h"
|
#include "../lib/CArtHandler.h"
|
||||||
#include "../lib/CBuildingHandler.h"
|
#include "../lib/CBuildingHandler.h"
|
||||||
#include "../lib/CConfigHandler.h"
|
#include "../lib/CConfigHandler.h"
|
||||||
@ -63,7 +64,6 @@
|
|||||||
#include "../lib/CTownHandler.h"
|
#include "../lib/CTownHandler.h"
|
||||||
#include "../lib/GameConstants.h"
|
#include "../lib/GameConstants.h"
|
||||||
#include "../lib/bonuses/Bonus.h"
|
#include "../lib/bonuses/Bonus.h"
|
||||||
#include "../lib/mapping/CMap.h"
|
|
||||||
#include "../lib/NetPacksBase.h"
|
#include "../lib/NetPacksBase.h"
|
||||||
#include "../lib/StartInfo.h"
|
#include "../lib/StartInfo.h"
|
||||||
#include "../lib/TextOperations.h"
|
#include "../lib/TextOperations.h"
|
||||||
|
@ -85,11 +85,13 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
|
|||||||
${MAIN_LIB_DIR}/mapping/CCampaignHandler.cpp
|
${MAIN_LIB_DIR}/mapping/CCampaignHandler.cpp
|
||||||
${MAIN_LIB_DIR}/mapping/CDrawRoadsOperation.cpp
|
${MAIN_LIB_DIR}/mapping/CDrawRoadsOperation.cpp
|
||||||
${MAIN_LIB_DIR}/mapping/CMap.cpp
|
${MAIN_LIB_DIR}/mapping/CMap.cpp
|
||||||
|
${MAIN_LIB_DIR}/mapping/CMapHeader.cpp
|
||||||
${MAIN_LIB_DIR}/mapping/CMapEditManager.cpp
|
${MAIN_LIB_DIR}/mapping/CMapEditManager.cpp
|
||||||
${MAIN_LIB_DIR}/mapping/CMapInfo.cpp
|
${MAIN_LIB_DIR}/mapping/CMapInfo.cpp
|
||||||
${MAIN_LIB_DIR}/mapping/CMapOperation.cpp
|
${MAIN_LIB_DIR}/mapping/CMapOperation.cpp
|
||||||
${MAIN_LIB_DIR}/mapping/CMapService.cpp
|
${MAIN_LIB_DIR}/mapping/CMapService.cpp
|
||||||
${MAIN_LIB_DIR}/mapping/MapEditUtils.cpp
|
${MAIN_LIB_DIR}/mapping/MapEditUtils.cpp
|
||||||
|
${MAIN_LIB_DIR}/mapping/MapIdentifiersH3M.cpp
|
||||||
${MAIN_LIB_DIR}/mapping/MapFeaturesH3M.cpp
|
${MAIN_LIB_DIR}/mapping/MapFeaturesH3M.cpp
|
||||||
${MAIN_LIB_DIR}/mapping/MapFormatH3M.cpp
|
${MAIN_LIB_DIR}/mapping/MapFormatH3M.cpp
|
||||||
${MAIN_LIB_DIR}/mapping/MapReaderH3M.cpp
|
${MAIN_LIB_DIR}/mapping/MapReaderH3M.cpp
|
||||||
@ -205,6 +207,7 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
|
|||||||
${MAIN_LIB_DIR}/CGeneralTextHandler.cpp
|
${MAIN_LIB_DIR}/CGeneralTextHandler.cpp
|
||||||
${MAIN_LIB_DIR}/CHeroHandler.cpp
|
${MAIN_LIB_DIR}/CHeroHandler.cpp
|
||||||
${MAIN_LIB_DIR}/CModHandler.cpp
|
${MAIN_LIB_DIR}/CModHandler.cpp
|
||||||
|
${MAIN_LIB_DIR}/CModVersion.cpp
|
||||||
${MAIN_LIB_DIR}/CPathfinder.cpp
|
${MAIN_LIB_DIR}/CPathfinder.cpp
|
||||||
${MAIN_LIB_DIR}/CPlayerState.cpp
|
${MAIN_LIB_DIR}/CPlayerState.cpp
|
||||||
${MAIN_LIB_DIR}/CRandomGenerator.cpp
|
${MAIN_LIB_DIR}/CRandomGenerator.cpp
|
||||||
@ -381,13 +384,16 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
|
|||||||
${MAIN_LIB_DIR}/mapping/CDrawRoadsOperation.h
|
${MAIN_LIB_DIR}/mapping/CDrawRoadsOperation.h
|
||||||
${MAIN_LIB_DIR}/mapping/CMapDefines.h
|
${MAIN_LIB_DIR}/mapping/CMapDefines.h
|
||||||
${MAIN_LIB_DIR}/mapping/CMapEditManager.h
|
${MAIN_LIB_DIR}/mapping/CMapEditManager.h
|
||||||
|
${MAIN_LIB_DIR}/mapping/CMapHeader.h
|
||||||
${MAIN_LIB_DIR}/mapping/CMap.h
|
${MAIN_LIB_DIR}/mapping/CMap.h
|
||||||
${MAIN_LIB_DIR}/mapping/CMapInfo.h
|
${MAIN_LIB_DIR}/mapping/CMapInfo.h
|
||||||
${MAIN_LIB_DIR}/mapping/CMapOperation.h
|
${MAIN_LIB_DIR}/mapping/CMapOperation.h
|
||||||
${MAIN_LIB_DIR}/mapping/CMapService.h
|
${MAIN_LIB_DIR}/mapping/CMapService.h
|
||||||
${MAIN_LIB_DIR}/mapping/MapEditUtils.h
|
${MAIN_LIB_DIR}/mapping/MapEditUtils.h
|
||||||
|
${MAIN_LIB_DIR}/mapping/MapIdentifiersH3M.h
|
||||||
${MAIN_LIB_DIR}/mapping/MapFeaturesH3M.h
|
${MAIN_LIB_DIR}/mapping/MapFeaturesH3M.h
|
||||||
${MAIN_LIB_DIR}/mapping/MapFormatH3M.h
|
${MAIN_LIB_DIR}/mapping/MapFormatH3M.h
|
||||||
|
${MAIN_LIB_DIR}/mapping/MapFormat.h
|
||||||
${MAIN_LIB_DIR}/mapping/MapReaderH3M.h
|
${MAIN_LIB_DIR}/mapping/MapReaderH3M.h
|
||||||
${MAIN_LIB_DIR}/mapping/MapFormatJson.h
|
${MAIN_LIB_DIR}/mapping/MapFormatJson.h
|
||||||
${MAIN_LIB_DIR}/mapping/ObstacleProxy.h
|
${MAIN_LIB_DIR}/mapping/ObstacleProxy.h
|
||||||
@ -497,6 +503,7 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
|
|||||||
${MAIN_LIB_DIR}/CGeneralTextHandler.h
|
${MAIN_LIB_DIR}/CGeneralTextHandler.h
|
||||||
${MAIN_LIB_DIR}/CHeroHandler.h
|
${MAIN_LIB_DIR}/CHeroHandler.h
|
||||||
${MAIN_LIB_DIR}/CModHandler.h
|
${MAIN_LIB_DIR}/CModHandler.h
|
||||||
|
${MAIN_LIB_DIR}/CModVersion.h
|
||||||
${MAIN_LIB_DIR}/CondSh.h
|
${MAIN_LIB_DIR}/CondSh.h
|
||||||
${MAIN_LIB_DIR}/ConstTransitivePtr.h
|
${MAIN_LIB_DIR}/ConstTransitivePtr.h
|
||||||
${MAIN_LIB_DIR}/Color.h
|
${MAIN_LIB_DIR}/Color.h
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
{
|
|
||||||
// Conversion table of buildings between vcmi and H3
|
|
||||||
"table": [
|
|
||||||
{ "town": -1, "h3": 0, "vcmi": 11 },
|
|
||||||
{ "town": -1, "h3": 1, "vcmi": 12 },
|
|
||||||
{ "town": -1, "h3": 2, "vcmi": 13 },
|
|
||||||
{ "town": -1, "h3": 3, "vcmi": 7 },
|
|
||||||
{ "town": -1, "h3": 4, "vcmi": 8 },
|
|
||||||
{ "town": -1, "h3": 5, "vcmi": 9 },
|
|
||||||
{ "town": -1, "h3": 6, "vcmi": 5 },
|
|
||||||
{ "town": -1, "h3": 7, "vcmi": 16 },
|
|
||||||
{ "town": -1, "h3": 8, "vcmi": 14 },
|
|
||||||
{ "town": -1, "h3": 9, "vcmi": 15 },
|
|
||||||
{ "town": -1, "h3": 10, "vcmi": 17 },
|
|
||||||
{ "town": -1, "h3": 11, "vcmi": 0 },
|
|
||||||
{ "town": -1, "h3": 12, "vcmi": 1 },
|
|
||||||
{ "town": -1, "h3": 13, "vcmi": 2 },
|
|
||||||
{ "town": -1, "h3": 14, "vcmi": 3 },
|
|
||||||
{ "town": -1, "h3": 15, "vcmi": 4 },
|
|
||||||
{ "town": -1, "h3": 16, "vcmi": 6 },
|
|
||||||
{ "town": -1, "h3": 17, "vcmi": 26 },
|
|
||||||
{ "town": -1, "h3": 18, "vcmi": 17 },
|
|
||||||
{ "town": -1, "h3": 19, "vcmi": 22 },
|
|
||||||
{ "town": -1, "h3": 20, "vcmi": 22 },
|
|
||||||
{ "town": -1, "h3": 21, "vcmi": 23 },
|
|
||||||
{ "town": -1, "h3": 22, "vcmi": 30 },
|
|
||||||
{ "town": -1, "h3": 23, "vcmi": 37 },
|
|
||||||
{ "town": -1, "h3": 24, "vcmi": -1 },
|
|
||||||
{ "town": -1, "h3": 25, "vcmi": 31 },
|
|
||||||
{ "town": -1, "h3": 26, "vcmi": 38 },
|
|
||||||
{ "town": -1, "h3": 27, "vcmi": -2 },
|
|
||||||
{ "town": -1, "h3": 28, "vcmi": 32 },
|
|
||||||
{ "town": -1, "h3": 29, "vcmi": 39 },
|
|
||||||
{ "town": -1, "h3": 30, "vcmi": -3 },
|
|
||||||
{ "town": -1, "h3": 31, "vcmi": 33 },
|
|
||||||
{ "town": -1, "h3": 32, "vcmi": 40 },
|
|
||||||
{ "town": -1, "h3": 33, "vcmi": -4 },
|
|
||||||
{ "town": -1, "h3": 34, "vcmi": 34 },
|
|
||||||
{ "town": -1, "h3": 35, "vcmi": 41 },
|
|
||||||
{ "town": -1, "h3": 36, "vcmi": -5 },
|
|
||||||
{ "town": -1, "h3": 37, "vcmi": 35 },
|
|
||||||
{ "town": -1, "h3": 38, "vcmi": 42 },
|
|
||||||
{ "town": -1, "h3": 39, "vcmi": 36 },
|
|
||||||
{ "town": -1, "h3": 40, "vcmi": 43 },
|
|
||||||
{ "town": 0, "h3": 20, "vcmi": 21 },
|
|
||||||
{ "town": 1, "h3": 19, "vcmi": 21 },
|
|
||||||
{ "town": 2, "h3": 18, "vcmi": 22 },
|
|
||||||
{ "town": 2, "h3": 19, "vcmi": 23 },
|
|
||||||
{ "town": 2, "h3": 20, "vcmi": 21 },
|
|
||||||
{ "town": 3, "h3": 20, "vcmi": 23 },
|
|
||||||
{ "town": 3, "h3": 18, "vcmi": 21 },
|
|
||||||
{ "town": 4, "h3": 19, "vcmi": 21 },
|
|
||||||
{ "town": 5, "h3": 20, "vcmi": 23 },
|
|
||||||
{ "town": 5, "h3": 18, "vcmi": 21 },
|
|
||||||
{ "town": 6, "h3": 19, "vcmi": 21 },
|
|
||||||
{ "town": 7, "h3": 20, "vcmi": 17 },
|
|
||||||
{ "town": 7, "h3": 18, "vcmi": 22 },
|
|
||||||
{ "town": 7, "h3": 19, "vcmi": 21 },
|
|
||||||
{ "town": 8, "h3": 18, "vcmi": 21 }
|
|
||||||
]
|
|
||||||
}
|
|
@ -122,7 +122,128 @@
|
|||||||
"terrain" : 10,
|
"terrain" : 10,
|
||||||
"river" : 5,
|
"river" : 5,
|
||||||
"road" : 4,
|
"road" : 4,
|
||||||
"mapVersion" : 28 // max supported version, SoD
|
},
|
||||||
|
|
||||||
|
"mapFormat" : {
|
||||||
|
"restorationOfErathia" : {
|
||||||
|
"supported" : true,
|
||||||
|
"iconIndex" : 0,
|
||||||
|
|
||||||
|
"buildingsCommon": {
|
||||||
|
"townHall" : 0,
|
||||||
|
"cityHall" : 1,
|
||||||
|
"capitol" : 2,
|
||||||
|
|
||||||
|
"fort" : 3,
|
||||||
|
"citadel" : 4,
|
||||||
|
"castle" : 5,
|
||||||
|
|
||||||
|
"tavern" : 6,
|
||||||
|
"blacksmith" : 7,
|
||||||
|
"marketplace" : 8,
|
||||||
|
"resourceSilo" : 9,
|
||||||
|
|
||||||
|
"mageGuild1" : 11,
|
||||||
|
"mageGuild2" : 12,
|
||||||
|
"mageGuild3" : 13,
|
||||||
|
"mageGuild4" : 14,
|
||||||
|
"mageGuild5" : 15,
|
||||||
|
|
||||||
|
"shipyard" : 16,
|
||||||
|
"grail" : 17,
|
||||||
|
|
||||||
|
"dwellingLvl1" : 22,
|
||||||
|
"dwellingUpLvl1" : 23,
|
||||||
|
"horde1" : 24,
|
||||||
|
"dwellingLvl2" : 25,
|
||||||
|
"dwellingUpLvl2" : 26,
|
||||||
|
"horde2" : 27,
|
||||||
|
"dwellingLvl3" : 28,
|
||||||
|
"dwellingUpLvl3" : 29,
|
||||||
|
"horde3" : 30,
|
||||||
|
"dwellingLvl4" : 31,
|
||||||
|
"dwellingUpLvl4" : 32,
|
||||||
|
"horde4" : 33,
|
||||||
|
"dwellingLvl5" : 34,
|
||||||
|
"dwellingUpLvl5" : 35,
|
||||||
|
"horde5" : 36,
|
||||||
|
|
||||||
|
"dwellingLvl6" : 37,
|
||||||
|
"dwellingUpLvl6" : 38,
|
||||||
|
"dwellingLvl7" : 39,
|
||||||
|
"dwellingUpLvl7" : 40
|
||||||
|
},
|
||||||
|
|
||||||
|
"buildings" : {
|
||||||
|
"castle" : {
|
||||||
|
"special1" : 18, // lighthouse
|
||||||
|
"special2" : 20, // stables
|
||||||
|
"special3" : 19 // brotherhoodOfSword
|
||||||
|
},
|
||||||
|
"rampart" : {
|
||||||
|
"special1" : 18, // mysticPond
|
||||||
|
"special2" : 19, // fountainOfFortune
|
||||||
|
"special3" : 20 // treasury
|
||||||
|
},
|
||||||
|
"tower" : {
|
||||||
|
"special1" : 10, // artifactMerchants
|
||||||
|
"special2" : 20, // lookoutTower
|
||||||
|
"special3" : 18, // library
|
||||||
|
"special4" : 19 // wallOfKnowledge
|
||||||
|
},
|
||||||
|
"inferno" : {
|
||||||
|
"special2" : 18, // brimstoneStormclouds
|
||||||
|
"special3" : 19, // castleGate
|
||||||
|
"special4" : 20 // orderOfFire
|
||||||
|
},
|
||||||
|
"necropolis" : {
|
||||||
|
"special1" : 18, // coverOfDarkness
|
||||||
|
"special2" : 19, // necromancyAmplifier
|
||||||
|
"special3" : 20 // skeletonTransformer
|
||||||
|
},
|
||||||
|
"dungeon" : {
|
||||||
|
"special1" : 10, // artifactMerchants
|
||||||
|
"special2" : 18, // manaVortex
|
||||||
|
"special3" : 19, // portalOfSummoning
|
||||||
|
"special4" : 20 // battleScholarAcademy
|
||||||
|
},
|
||||||
|
"stronghold" : {
|
||||||
|
"special1" : 18, // escapeTunnel
|
||||||
|
"special2" : 19, // freelancersGuild
|
||||||
|
"special3" : 20, // ballistaYard
|
||||||
|
"special4" : 21 // hallOfValhalla
|
||||||
|
},
|
||||||
|
"fortress" : {
|
||||||
|
"special1" : 20, // cageOfWarlords
|
||||||
|
"special2" : 19, // bloodObelisk
|
||||||
|
"special3" : 18 // glyphsOfFear
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"armageddonsBlade" : {
|
||||||
|
"supported" : true,
|
||||||
|
"iconIndex" : 1,
|
||||||
|
"buildings" : {
|
||||||
|
"conflux" : {
|
||||||
|
"special1" : 10, // artifactMerchants
|
||||||
|
"special2" : 18 // magicUniversity
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"shadowOfDeath" : {
|
||||||
|
"supported" : true,
|
||||||
|
"iconIndex" : 2
|
||||||
|
},
|
||||||
|
"jsonVCMI" : {
|
||||||
|
"supported" : true,
|
||||||
|
"iconIndex" : 3
|
||||||
|
},
|
||||||
|
"hornOfTheAbyss" : {
|
||||||
|
"supported" : false
|
||||||
|
},
|
||||||
|
"inTheWakeOfGods" : {
|
||||||
|
"supported" : false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"heroes" :
|
"heroes" :
|
||||||
|
@ -1,379 +0,0 @@
|
|||||||
// REFERENCE ONLY - THIS CONFIG FILE IS NOT USED BY VCMI
|
|
||||||
// CONTAINS LIST OF HOTA OBJECTS AND THEIR H3M IDENTIFIERS
|
|
||||||
|
|
||||||
{
|
|
||||||
"boat" : {
|
|
||||||
"lastReservedIndex" : 5,
|
|
||||||
"types" : {
|
|
||||||
//NOTE: H3 range: 0-2
|
|
||||||
"hotaBoat4" : {
|
|
||||||
"index" : 3
|
|
||||||
},
|
|
||||||
"hotaBoat5" : {
|
|
||||||
"index" : 4
|
|
||||||
},
|
|
||||||
"hotaBoat6" : {
|
|
||||||
"index" : 5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hillFort" : {
|
|
||||||
"lastReservedIndex" : 1,
|
|
||||||
"types" : {
|
|
||||||
"hotaHillFort" : {
|
|
||||||
"index" : 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"schoolOfMagic" : {
|
|
||||||
"lastReservedIndex" : 1,
|
|
||||||
"types" : {
|
|
||||||
"hotaSchoolOfMagic" : {
|
|
||||||
"index" : 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"creatureBank" : {
|
|
||||||
"lastReservedIndex" : 26,
|
|
||||||
"types" : {
|
|
||||||
//NOTE: H3 range: 0-6
|
|
||||||
"hotaBeholderSanctuary" : {
|
|
||||||
"index" : 21
|
|
||||||
},
|
|
||||||
"hotaTempleOfTheSea" : {
|
|
||||||
"index" : 22
|
|
||||||
},
|
|
||||||
"hotaPirateCave" : {
|
|
||||||
"index" : 23
|
|
||||||
},
|
|
||||||
"hotaMansion" : {
|
|
||||||
"index" : 24
|
|
||||||
},
|
|
||||||
"hotaSpit" : {
|
|
||||||
"index" : 25
|
|
||||||
},
|
|
||||||
"hotaRedTower" : {
|
|
||||||
"index" : 26
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hotaIce" : {
|
|
||||||
"index" : 40,
|
|
||||||
"handler": "static",
|
|
||||||
"lastReservedIndex" : 7,
|
|
||||||
"types" : {
|
|
||||||
"hotaIce1" : {
|
|
||||||
"index" : 0
|
|
||||||
},
|
|
||||||
"hotaIce2" : {
|
|
||||||
"index" : 1
|
|
||||||
},
|
|
||||||
"hotaIce3" : {
|
|
||||||
"index" : 2
|
|
||||||
},
|
|
||||||
"hotaIce4" : {
|
|
||||||
"index" : 3
|
|
||||||
},
|
|
||||||
"hotaIce5" : {
|
|
||||||
"index" : 4
|
|
||||||
},
|
|
||||||
"hotaIce6" : {
|
|
||||||
"index" : 5
|
|
||||||
},
|
|
||||||
"hotaIce7" : {
|
|
||||||
"index" : 6
|
|
||||||
}
|
|
||||||
"hotaIce8" : {
|
|
||||||
"index" : 7
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hotaStatic" : {
|
|
||||||
"index" :139,
|
|
||||||
"handler": "static",
|
|
||||||
"lastReservedIndex" : 26,
|
|
||||||
"types" : {
|
|
||||||
"hotaCrates0" : {
|
|
||||||
"index" : 0
|
|
||||||
},
|
|
||||||
"hotaCrates1" : {
|
|
||||||
"index" : 1
|
|
||||||
},
|
|
||||||
"hotaBag" : {
|
|
||||||
"index" : 2
|
|
||||||
},
|
|
||||||
"hotaCrates3" : {
|
|
||||||
"index" : 3
|
|
||||||
},
|
|
||||||
"hotaJaws" : {
|
|
||||||
"index" : 4
|
|
||||||
},
|
|
||||||
"hotaRopesPile" : {
|
|
||||||
"index" : 5
|
|
||||||
},
|
|
||||||
"hotaFrog" : {
|
|
||||||
"index" : 6
|
|
||||||
},
|
|
||||||
"hotaFrogs" : {
|
|
||||||
"index" : 7
|
|
||||||
},
|
|
||||||
"hotaHen" : {
|
|
||||||
"index" : 8
|
|
||||||
},
|
|
||||||
"hotaRooster" : {
|
|
||||||
"index" : 9
|
|
||||||
},
|
|
||||||
"hotaPortu" : {
|
|
||||||
"index" : 10
|
|
||||||
},
|
|
||||||
"hotaDestroyedMercenaryCamp" : {
|
|
||||||
"index" : 11
|
|
||||||
},
|
|
||||||
"hotaDestroyedFountain" : {
|
|
||||||
"index" : 12
|
|
||||||
},
|
|
||||||
"hotaPig" : {
|
|
||||||
"index" : 13
|
|
||||||
},
|
|
||||||
"hotaHornAltar" : {
|
|
||||||
"index" : 14
|
|
||||||
},
|
|
||||||
"hotaBoatWreckage" : {
|
|
||||||
"index" : 15
|
|
||||||
},
|
|
||||||
"hotaPalisade" : {
|
|
||||||
"index" : 16
|
|
||||||
},
|
|
||||||
"hotaWaterfall" : {
|
|
||||||
"index" : 17
|
|
||||||
},
|
|
||||||
"hotaFlames" : {
|
|
||||||
"index" : 18
|
|
||||||
},
|
|
||||||
"hotaDestroyedUndegroundGate" : {
|
|
||||||
"index" : 19
|
|
||||||
},
|
|
||||||
"hotaPredatoryPlant" : {
|
|
||||||
"index" : 20
|
|
||||||
},
|
|
||||||
"hotaBridge" : {
|
|
||||||
"index" : 21
|
|
||||||
},
|
|
||||||
"hotaBones" : {
|
|
||||||
"index" : 22
|
|
||||||
},
|
|
||||||
"hotaPond" : {
|
|
||||||
"index" : 24
|
|
||||||
},
|
|
||||||
"hotaPillar" : {
|
|
||||||
"index" : 25
|
|
||||||
},
|
|
||||||
"hotaPond2" : {
|
|
||||||
"index" : 26
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hotaNature" : {
|
|
||||||
"index" :140,
|
|
||||||
"handler": "static",
|
|
||||||
"lastReservedIndex" : 8,
|
|
||||||
"types" : {
|
|
||||||
"hotaWaterball" : {
|
|
||||||
"index" : 0
|
|
||||||
},
|
|
||||||
"hotaRock" : {
|
|
||||||
"index" : 1
|
|
||||||
},
|
|
||||||
"hotaTreesTropical" : {
|
|
||||||
"index" : 2
|
|
||||||
},
|
|
||||||
"hotaIce" : {
|
|
||||||
"index" : 3
|
|
||||||
},
|
|
||||||
"hotaMissing" : {
|
|
||||||
"index" : 4
|
|
||||||
},
|
|
||||||
"hotaSnowHill" : {
|
|
||||||
"index" : 5
|
|
||||||
},
|
|
||||||
"hotaMountains" : {
|
|
||||||
"index" : 6
|
|
||||||
},
|
|
||||||
"hotaTrees" : {
|
|
||||||
"index" : 7
|
|
||||||
},
|
|
||||||
"hotaLakeWater" : {
|
|
||||||
"index" : 8
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hotaTerrains" : {
|
|
||||||
"index" :141,
|
|
||||||
"handler": "static",
|
|
||||||
"lastReservedIndex" : 2,
|
|
||||||
"types" : {
|
|
||||||
"hotaIce" : {
|
|
||||||
"index" : 0
|
|
||||||
},
|
|
||||||
"hotaDunes" : {
|
|
||||||
"index" : 1
|
|
||||||
},
|
|
||||||
"hotaFieldsOfGlory" : {
|
|
||||||
"index" : 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hotaWarehouses" : {
|
|
||||||
"index" :142,
|
|
||||||
"handler": "static",
|
|
||||||
"lastReservedIndex" : 6,
|
|
||||||
"types" : {
|
|
||||||
"hotaWarehouseWood" : {
|
|
||||||
"index" : 0
|
|
||||||
},
|
|
||||||
"hotaWarehouseMercury" : {
|
|
||||||
"index" : 1
|
|
||||||
},
|
|
||||||
"hotaWarehouseOre" : {
|
|
||||||
"index" : 2
|
|
||||||
},
|
|
||||||
"hotaWarehouseSulfur" : {
|
|
||||||
"index" : 3
|
|
||||||
},
|
|
||||||
"hotaWarehouseCrystal" : {
|
|
||||||
"index" : 4
|
|
||||||
},
|
|
||||||
"hotaWarehouseGems" : {
|
|
||||||
"index" : 5
|
|
||||||
},
|
|
||||||
"hotaWarehouseGold" : {
|
|
||||||
"index" : 6
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hotaInteractive" : {
|
|
||||||
"index" :144,
|
|
||||||
"handler": "static",
|
|
||||||
"lastReservedIndex" : 11,
|
|
||||||
"types" : {
|
|
||||||
"hotaTempleOfLoyalty" : {
|
|
||||||
"index" : 0
|
|
||||||
},
|
|
||||||
"hotaSkeletonTransformer" : {
|
|
||||||
"index" : 1
|
|
||||||
},
|
|
||||||
"hotaMagicArena" : {
|
|
||||||
"index" : 2
|
|
||||||
},
|
|
||||||
"hotaWateringPlace" : {
|
|
||||||
"index" : 3
|
|
||||||
},
|
|
||||||
"hotaMineralSpring" : {
|
|
||||||
"index" : 4
|
|
||||||
},
|
|
||||||
"hotaHermitShack" : {
|
|
||||||
"index" : 5
|
|
||||||
},
|
|
||||||
"hotaGazebo" : {
|
|
||||||
"index" : 6
|
|
||||||
},
|
|
||||||
"hotaJunkman" : {
|
|
||||||
"index" : 7
|
|
||||||
},
|
|
||||||
"hotaDerrick" : {
|
|
||||||
"index" : 8
|
|
||||||
},
|
|
||||||
"hotaWarlockLab" : {
|
|
||||||
"index" : 9
|
|
||||||
},
|
|
||||||
"hotaProspector" : {
|
|
||||||
"index" : 10
|
|
||||||
},
|
|
||||||
"hotaTrailblazer" : {
|
|
||||||
"index" : 11
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hotaWaterObjects" : {
|
|
||||||
"index" :145,
|
|
||||||
"handler": "static",
|
|
||||||
"lastReservedIndex" : 3,
|
|
||||||
"types" : {
|
|
||||||
"hotaGenieBottle" : {
|
|
||||||
"index" : 0
|
|
||||||
},
|
|
||||||
"hotaBarrelWater" : {
|
|
||||||
"index" : 1
|
|
||||||
},
|
|
||||||
"hotaCrateWater" : {
|
|
||||||
"index" : 2
|
|
||||||
},
|
|
||||||
"hotaManaBottle" : {
|
|
||||||
"index" : 3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hotaInteractive2" : {
|
|
||||||
"index" :146,
|
|
||||||
"handler": "static",
|
|
||||||
"lastReservedIndex" : 3,
|
|
||||||
"types" : {
|
|
||||||
"hotaWarAcademy" : {
|
|
||||||
"index" : 0
|
|
||||||
},
|
|
||||||
"hotaObservatory" : {
|
|
||||||
"index" : 1
|
|
||||||
},
|
|
||||||
"hotaAltarOfMana" : {
|
|
||||||
"index" : 2
|
|
||||||
}
|
|
||||||
"hotaTownGates" : {
|
|
||||||
"index" : 3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hotaStatic2" : {
|
|
||||||
"index" :154,
|
|
||||||
"handler": "static",
|
|
||||||
"lastReservedIndex" : 1,
|
|
||||||
"types" : {
|
|
||||||
"hotaOilLake" : {
|
|
||||||
"index" : 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hotaLyuc" : {
|
|
||||||
"index" :160,
|
|
||||||
"handler": "static",
|
|
||||||
"lastReservedIndex" : 1,
|
|
||||||
"types" : {
|
|
||||||
"hotaLyuc" : {
|
|
||||||
"index" : 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"hotaLyuc2" : {
|
|
||||||
"index" :204,
|
|
||||||
"handler": "static",
|
|
||||||
"lastReservedIndex" : 1,
|
|
||||||
"types" : {
|
|
||||||
"hotaLyuc2" : {
|
|
||||||
"index" : 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -109,39 +109,33 @@
|
|||||||
"lastReservedIndex" : 2,
|
"lastReservedIndex" : 2,
|
||||||
"base" : {
|
"base" : {
|
||||||
"aiValue" : 0,
|
"aiValue" : 0,
|
||||||
|
"layer" : "sail",
|
||||||
|
"onboardAssaultAllowed" : true,
|
||||||
|
"onboardVisitAllowed" : true,
|
||||||
"base" : {
|
"base" : {
|
||||||
"visitableFrom" : [ "+++", "+-+", "+++" ],
|
"visitableFrom" : [ "+++", "+-+", "+++" ],
|
||||||
"mask" : [ "VVV", "VAV" ]
|
"mask" : [ "VVV", "VAV" ]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"types" : {
|
"types" : {
|
||||||
"evil" :
|
"evil" : // Necropolis
|
||||||
{
|
{
|
||||||
"index" : 0,
|
"index" : 0,
|
||||||
"layer" : "sail",
|
|
||||||
"actualAnimation" : "AB01_.def",
|
"actualAnimation" : "AB01_.def",
|
||||||
"overlayAnimation" : "ABM01_.def",
|
"overlayAnimation" : "ABM01_.def",
|
||||||
"onboardAssaultAllowed" : true,
|
|
||||||
"onboardVisitAllowed" : true,
|
|
||||||
"flagAnimations" : ["ABF01L", "ABF01G", "ABF01R", "ABF01D", "ABF01B", "ABF01P", "ABF01W", "ABF01K"]
|
"flagAnimations" : ["ABF01L", "ABF01G", "ABF01R", "ABF01D", "ABF01B", "ABF01P", "ABF01W", "ABF01K"]
|
||||||
},
|
},
|
||||||
"good" :
|
"good" : // Castle
|
||||||
{
|
{
|
||||||
"index" : 1,
|
"index" : 1,
|
||||||
"layer" : "sail",
|
|
||||||
"actualAnimation" : "AB02_.def",
|
"actualAnimation" : "AB02_.def",
|
||||||
"overlayAnimation" : "ABM02_.def",
|
"overlayAnimation" : "ABM02_.def",
|
||||||
"onboardAssaultAllowed" : true,
|
|
||||||
"onboardVisitAllowed" : true,
|
|
||||||
"flagAnimations" : ["ABF02L", "ABF02G", "ABF02R", "ABF02D", "ABF02B", "ABF02P", "ABF02W", "ABF02K"]
|
"flagAnimations" : ["ABF02L", "ABF02G", "ABF02R", "ABF02D", "ABF02B", "ABF02P", "ABF02W", "ABF02K"]
|
||||||
},
|
},
|
||||||
"neutral" : {
|
"neutral" : { // Fortress
|
||||||
"index" : 2,
|
"index" : 2,
|
||||||
"layer" : "sail",
|
|
||||||
"actualAnimation" : "AB03_.def",
|
"actualAnimation" : "AB03_.def",
|
||||||
"overlayAnimation" : "ABM03_.def",
|
"overlayAnimation" : "ABM03_.def",
|
||||||
"onboardAssaultAllowed" : true,
|
|
||||||
"onboardVisitAllowed" : true,
|
|
||||||
"flagAnimations" : ["ABF03L", "ABF03G", "ABF03R", "ABF03D", "ABF03B", "ABF03P", "ABF03W", "ABF03K"]
|
"flagAnimations" : ["ABF03L", "ABF03G", "ABF03R", "ABF03D", "ABF03B", "ABF03P", "ABF03W", "ABF03K"]
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
"N", "N", "T",
|
"N", "N", "T",
|
||||||
"N", "T", "T"
|
"N", "T", "T"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "73,74", "dirt" : "45" }
|
"mapping" : { "normal" : "73,74", "dirt" : "45", "hota" : "118,119" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "x2",
|
"id" : "x2",
|
||||||
@ -44,7 +44,7 @@
|
|||||||
"D", "N", "N",
|
"D", "N", "N",
|
||||||
"N", "N", "S"
|
"N", "N", "S"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "75" }
|
"mapping" : { "normal" : "75", "hota" : "120" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "x3",
|
"id" : "x3",
|
||||||
@ -54,7 +54,7 @@
|
|||||||
"S", "N", "N",
|
"S", "N", "N",
|
||||||
"N", "N", "D"
|
"N", "N", "D"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "76" }
|
"mapping" : { "normal" : "76", "hota" : "121" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "x4",
|
"id" : "x4",
|
||||||
@ -64,7 +64,7 @@
|
|||||||
"N", "N", "D",
|
"N", "N", "D",
|
||||||
"S", "D", "D"
|
"S", "D", "D"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "77" }
|
"mapping" : { "normal" : "77", "hota" : "122" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "x5",
|
"id" : "x5",
|
||||||
@ -74,7 +74,7 @@
|
|||||||
"N", "N", "D",
|
"N", "N", "D",
|
||||||
"D", "D", "S"
|
"D", "D", "S"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "78" }
|
"mapping" : { "normal" : "78", "hota" : "123" }
|
||||||
},
|
},
|
||||||
// No transition
|
// No transition
|
||||||
{
|
{
|
||||||
@ -85,7 +85,7 @@
|
|||||||
"N", "N", "N",
|
"N", "N", "N",
|
||||||
"N", "N", "N"
|
"N", "N", "N"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "49-72", "dirt" : "21-44", "sand" : "0-23", "water" : "20-32", "rock": "0-7" }
|
"mapping" : { "normal" : "49-72", "dirt" : "21-44", "sand" : "0-23", "water" : "20-32", "rock": "0-7", "hota" : "77-117" }
|
||||||
},
|
},
|
||||||
// Mixed transitions
|
// Mixed transitions
|
||||||
{
|
{
|
||||||
@ -96,7 +96,7 @@
|
|||||||
"N", "N", "N",
|
"N", "N", "N",
|
||||||
"N", "N", "T"
|
"N", "N", "T"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "40, 42", "dirt" : "20" }
|
"mapping" : { "normal" : "40, 42", "dirt" : "20", "hota" : "68, 70" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "m2",
|
"id" : "m2",
|
||||||
@ -106,7 +106,7 @@
|
|||||||
"N", "N", "N",
|
"N", "N", "N",
|
||||||
"N", "N", "S"
|
"N", "N", "S"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "41" }
|
"mapping" : { "normal" : "41", "hota" : "69" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "m3",
|
"id" : "m3",
|
||||||
@ -116,7 +116,7 @@
|
|||||||
"N", "N", "D",
|
"N", "N", "D",
|
||||||
"S", "D,N", "D,N"
|
"S", "D,N", "D,N"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "43" }
|
"mapping" : { "normal" : "43", "hota" : "71" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "m4",
|
"id" : "m4",
|
||||||
@ -126,7 +126,7 @@
|
|||||||
"N", "N", "D",
|
"N", "N", "D",
|
||||||
"D,N", "D", "D,N"
|
"D,N", "D", "D,N"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "44" }
|
"mapping" : { "normal" : "44", "hota" : "72" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "m5",
|
"id" : "m5",
|
||||||
@ -136,7 +136,7 @@
|
|||||||
"N", "N", "D",
|
"N", "N", "D",
|
||||||
"N", "N", "S"
|
"N", "N", "S"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "45" }
|
"mapping" : { "normal" : "45", "hota" : "73" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "m6",
|
"id" : "m6",
|
||||||
@ -146,7 +146,7 @@
|
|||||||
"N", "N", "N",
|
"N", "N", "N",
|
||||||
"D,N", "D", "S"
|
"D,N", "D", "S"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "46" }
|
"mapping" : { "normal" : "46", "hota" : "74" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "m7",
|
"id" : "m7",
|
||||||
@ -157,7 +157,7 @@
|
|||||||
"D-1,N", "D-1,N", "?"
|
"D-1,N", "D-1,N", "?"
|
||||||
],
|
],
|
||||||
"minPoints" : 1,
|
"minPoints" : 1,
|
||||||
"mapping" : { "normal" : "47" }
|
"mapping" : { "normal" : "47", "hota" : "75" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "m8",
|
"id" : "m8",
|
||||||
@ -168,7 +168,7 @@
|
|||||||
"?", "S", "?"
|
"?", "S", "?"
|
||||||
],
|
],
|
||||||
"minPoints" : 1,
|
"minPoints" : 1,
|
||||||
"mapping" : { "normal" : "48" }
|
"mapping" : { "normal" : "48", "hota" : "76" }
|
||||||
},
|
},
|
||||||
// Standard transitions
|
// Standard transitions
|
||||||
{
|
{
|
||||||
@ -179,7 +179,7 @@
|
|||||||
"T", "N", "N",
|
"T", "N", "N",
|
||||||
"?", "N", "N"
|
"?", "N", "N"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "4-7, 24-27", "dirt" : "4-7", "water" : "4-7", "rock": "2D:16-19" }
|
"mapping" : { "normal" : "4-7, 24-27", "dirt" : "4-7", "water" : "4-7", "rock": "2D:16-19", "hota" : "6-13, 40-47" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "s3",
|
"id" : "s3",
|
||||||
@ -189,7 +189,7 @@
|
|||||||
"N", "N", "N",
|
"N", "N", "N",
|
||||||
"N", "N", "N"
|
"N", "N", "N"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "8-11, 28-31", "dirt" : "8-11", "water" : "8-11", "rock": "2D:20-23" }
|
"mapping" : { "normal" : "8-11, 28-31", "dirt" : "8-11", "water" : "8-11", "rock": "2D:20-23", "hota" : "14-21,48-55" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "s4",
|
"id" : "s4",
|
||||||
@ -200,7 +200,7 @@
|
|||||||
"N", "s2-1,m7-1,m8-1", "T"
|
"N", "s2-1,m7-1,m8-1", "T"
|
||||||
],
|
],
|
||||||
"minPoints" : 2,
|
"minPoints" : 2,
|
||||||
"mapping" : { "normal" : "12-15, 32-35", "dirt" : "12-15", "water" : "12-15", "rock": "4D:24-31" }
|
"mapping" : { "normal" : "12-15, 32-35", "dirt" : "12-15", "water" : "12-15", "rock": "4D:24-31", "hota" : "22-27,56-61" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "s5",
|
"id" : "s5",
|
||||||
@ -211,7 +211,7 @@
|
|||||||
"?,x1-1,s1-1", "s6-1,m1-1,m2-1,N", "N"
|
"?,x1-1,s1-1", "s6-1,m1-1,m2-1,N", "N"
|
||||||
],
|
],
|
||||||
"minPoints" : 1,
|
"minPoints" : 1,
|
||||||
"mapping" : { "normal" : "16-17, 36-37", "dirt" : "16-17", "water" : "16-17", "rock": "4D:32-39" }
|
"mapping" : { "normal" : "16-17, 36-37", "dirt" : "16-17", "water" : "16-17", "rock": "4D:32-39", "hota" : "28-30,62-64" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "s6",
|
"id" : "s6",
|
||||||
@ -222,7 +222,7 @@
|
|||||||
"N", "s5-1,N", "T"
|
"N", "s5-1,N", "T"
|
||||||
],
|
],
|
||||||
"minPoints" : 1,
|
"minPoints" : 1,
|
||||||
"mapping" : { "normal" : "18-19, 38-39", "dirt" : "18-19", "water" : "18-19", "rock": "4D:40-47" }
|
"mapping" : { "normal" : "18-19, 38-39", "dirt" : "18-19", "water" : "18-19", "rock": "4D:40-47", "hota" : "31-33,65-67" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id" : "s1",
|
"id" : "s1",
|
||||||
@ -232,7 +232,7 @@
|
|||||||
"?", "N", "N",
|
"?", "N", "N",
|
||||||
"T", "N", "N"
|
"T", "N", "N"
|
||||||
],
|
],
|
||||||
"mapping" : { "normal" : "0-3, 20-23", "dirt" : "0-3", "water" : "0-3", "rock": "4D:8-15" }
|
"mapping" : { "normal" : "0-3, 20-23", "dirt" : "0-3", "water" : "0-3", "rock": "4D:8-15", "hota" : "0-5,34-39" }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"terrainType" :
|
"terrainType" :
|
||||||
|
@ -1752,6 +1752,10 @@ void CGameState::initTowns()
|
|||||||
vti->setNameTranslated(vti->getTown()->getRandomNameTranslated(nameID));
|
vti->setNameTranslated(vti->getTown()->getRandomNameTranslated(nameID));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const BuildingID basicDwellings[] = { BuildingID::DWELL_FIRST, BuildingID::DWELL_LVL_2, BuildingID::DWELL_LVL_3, BuildingID::DWELL_LVL_4, BuildingID::DWELL_LVL_5, BuildingID::DWELL_LVL_6, BuildingID::DWELL_LVL_7 };
|
||||||
|
static const BuildingID upgradedDwellings[] = { BuildingID::DWELL_UP_FIRST, BuildingID::DWELL_LVL_2_UP, BuildingID::DWELL_LVL_3_UP, BuildingID::DWELL_LVL_4_UP, BuildingID::DWELL_LVL_5_UP, BuildingID::DWELL_LVL_6_UP, BuildingID::DWELL_LVL_7_UP };
|
||||||
|
static const BuildingID hordes[] = { BuildingID::HORDE_PLACEHOLDER1, BuildingID::HORDE_PLACEHOLDER2, BuildingID::HORDE_PLACEHOLDER3, BuildingID::HORDE_PLACEHOLDER4, BuildingID::HORDE_PLACEHOLDER5, BuildingID::HORDE_PLACEHOLDER6, BuildingID::HORDE_PLACEHOLDER7 };
|
||||||
|
|
||||||
//init buildings
|
//init buildings
|
||||||
if(vstd::contains(vti->builtBuildings, BuildingID::DEFAULT)) //give standard set of buildings
|
if(vstd::contains(vti->builtBuildings, BuildingID::DEFAULT)) //give standard set of buildings
|
||||||
{
|
{
|
||||||
@ -1762,8 +1766,6 @@ void CGameState::initTowns()
|
|||||||
|
|
||||||
auto definesBuildingsChances = VLC->settings()->getVector(EGameSettings::TOWNS_STARTING_DWELLING_CHANCES);
|
auto definesBuildingsChances = VLC->settings()->getVector(EGameSettings::TOWNS_STARTING_DWELLING_CHANCES);
|
||||||
|
|
||||||
BuildingID basicDwellings[] = { BuildingID::DWELL_FIRST, BuildingID::DWELL_LVL_2, BuildingID::DWELL_LVL_3, BuildingID::DWELL_LVL_4, BuildingID::DWELL_LVL_5, BuildingID::DWELL_LVL_6, BuildingID::DWELL_LVL_7 };
|
|
||||||
|
|
||||||
for(int i = 0; i < definesBuildingsChances.size(); i++)
|
for(int i = 0; i < definesBuildingsChances.size(); i++)
|
||||||
{
|
{
|
||||||
if((getRandomGenerator().nextInt(1,100) <= definesBuildingsChances[i]))
|
if((getRandomGenerator().nextInt(1,100) <= definesBuildingsChances[i]))
|
||||||
@ -1773,23 +1775,26 @@ void CGameState::initTowns()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// village hall must always exist
|
||||||
|
vti->builtBuildings.insert(BuildingID::VILLAGE_HALL);
|
||||||
|
|
||||||
//init hordes
|
//init hordes
|
||||||
for (int i = 0; i < GameConstants::CREATURES_PER_TOWN; i++)
|
for (int i = 0; i < GameConstants::CREATURES_PER_TOWN; i++)
|
||||||
{
|
{
|
||||||
if (vstd::contains(vti->builtBuildings, (BuildingID::HORDE_PLACEHOLDER1 - i))) //if we have horde for this level
|
if (vstd::contains(vti->builtBuildings, hordes[i])) //if we have horde for this level
|
||||||
{
|
{
|
||||||
vti->builtBuildings.erase(BuildingID(BuildingID::HORDE_PLACEHOLDER1 - i));//remove old ID
|
vti->builtBuildings.erase(hordes[i]);//remove old ID
|
||||||
if (vti->getTown()->hordeLvl.at(0) == i)//if town first horde is this one
|
if (vti->getTown()->hordeLvl.at(0) == i)//if town first horde is this one
|
||||||
{
|
{
|
||||||
vti->builtBuildings.insert(BuildingID::HORDE_1);//add it
|
vti->builtBuildings.insert(BuildingID::HORDE_1);//add it
|
||||||
//if we have upgraded dwelling as well
|
//if we have upgraded dwelling as well
|
||||||
if (vstd::contains(vti->builtBuildings, (BuildingID::DWELL_UP_FIRST + i)))
|
if (vstd::contains(vti->builtBuildings, upgradedDwellings[i]))
|
||||||
vti->builtBuildings.insert(BuildingID::HORDE_1_UPGR);//add it as well
|
vti->builtBuildings.insert(BuildingID::HORDE_1_UPGR);//add it as well
|
||||||
}
|
}
|
||||||
if (vti->getTown()->hordeLvl.at(1) == i)//if town second horde is this one
|
if (vti->getTown()->hordeLvl.at(1) == i)//if town second horde is this one
|
||||||
{
|
{
|
||||||
vti->builtBuildings.insert(BuildingID::HORDE_2);
|
vti->builtBuildings.insert(BuildingID::HORDE_2);
|
||||||
if (vstd::contains(vti->builtBuildings, (BuildingID::DWELL_UP_FIRST + i)))
|
if (vstd::contains(vti->builtBuildings, upgradedDwellings[i]))
|
||||||
vti->builtBuildings.insert(BuildingID::HORDE_2_UPGR);
|
vti->builtBuildings.insert(BuildingID::HORDE_2_UPGR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1815,9 +1820,9 @@ void CGameState::initTowns()
|
|||||||
for(CCastleEvent &ev : vti->events)
|
for(CCastleEvent &ev : vti->events)
|
||||||
{
|
{
|
||||||
for (int i = 0; i<GameConstants::CREATURES_PER_TOWN; i++)
|
for (int i = 0; i<GameConstants::CREATURES_PER_TOWN; i++)
|
||||||
if (vstd::contains(ev.buildings,(-31-i))) //if we have horde for this level
|
if (vstd::contains(ev.buildings,hordes[i])) //if we have horde for this level
|
||||||
{
|
{
|
||||||
ev.buildings.erase(BuildingID(-31-i));
|
ev.buildings.erase(hordes[i]);
|
||||||
if (vti->getTown()->hordeLvl.at(0) == i)
|
if (vti->getTown()->hordeLvl.at(0) == i)
|
||||||
ev.buildings.insert(BuildingID::HORDE_1);
|
ev.buildings.insert(BuildingID::HORDE_1);
|
||||||
if (vti->getTown()->hordeLvl.at(1) == i)
|
if (vti->getTown()->hordeLvl.at(1) == i)
|
||||||
|
@ -582,53 +582,6 @@ JsonNode addMeta(JsonNode config, const std::string & meta)
|
|||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
CModInfo::Version CModInfo::Version::GameVersion()
|
|
||||||
{
|
|
||||||
return Version(VCMI_VERSION_MAJOR, VCMI_VERSION_MINOR, VCMI_VERSION_PATCH);
|
|
||||||
}
|
|
||||||
|
|
||||||
CModInfo::Version CModInfo::Version::fromString(std::string from)
|
|
||||||
{
|
|
||||||
int major = 0;
|
|
||||||
int minor = 0;
|
|
||||||
int patch = 0;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
auto pointPos = from.find('.');
|
|
||||||
major = std::stoi(from.substr(0, pointPos));
|
|
||||||
if(pointPos != std::string::npos)
|
|
||||||
{
|
|
||||||
from = from.substr(pointPos + 1);
|
|
||||||
pointPos = from.find('.');
|
|
||||||
minor = std::stoi(from.substr(0, pointPos));
|
|
||||||
if(pointPos != std::string::npos)
|
|
||||||
patch = std::stoi(from.substr(pointPos + 1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(const std::invalid_argument &)
|
|
||||||
{
|
|
||||||
return Version();
|
|
||||||
}
|
|
||||||
return Version(major, minor, patch);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string CModInfo::Version::toString() const
|
|
||||||
{
|
|
||||||
return std::to_string(major) + '.' + std::to_string(minor) + '.' + std::to_string(patch);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CModInfo::Version::compatible(const Version & other, bool checkMinor, bool checkPatch) const
|
|
||||||
{
|
|
||||||
return (major == other.major &&
|
|
||||||
(!checkMinor || minor >= other.minor) &&
|
|
||||||
(!checkPatch || minor > other.minor || (minor == other.minor && patch >= other.patch)));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CModInfo::Version::isNull() const
|
|
||||||
{
|
|
||||||
return major == 0 && minor == 0 && patch == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
CModInfo::CModInfo():
|
CModInfo::CModInfo():
|
||||||
checksum(0),
|
checksum(0),
|
||||||
explicitlyEnabled(false),
|
explicitlyEnabled(false),
|
||||||
@ -650,11 +603,11 @@ CModInfo::CModInfo(const std::string & identifier, const JsonNode & local, const
|
|||||||
validation(PENDING),
|
validation(PENDING),
|
||||||
config(addMeta(config, identifier))
|
config(addMeta(config, identifier))
|
||||||
{
|
{
|
||||||
version = Version::fromString(config["version"].String());
|
version = CModVersion::fromString(config["version"].String());
|
||||||
if(!config["compatibility"].isNull())
|
if(!config["compatibility"].isNull())
|
||||||
{
|
{
|
||||||
vcmiCompatibleMin = Version::fromString(config["compatibility"]["min"].String());
|
vcmiCompatibleMin = CModVersion::fromString(config["compatibility"]["min"].String());
|
||||||
vcmiCompatibleMax = Version::fromString(config["compatibility"]["max"].String());
|
vcmiCompatibleMax = CModVersion::fromString(config["compatibility"]["max"].String());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!config["language"].isNull())
|
if (!config["language"].isNull())
|
||||||
@ -715,8 +668,8 @@ void CModInfo::loadLocalData(const JsonNode & data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//check compatibility
|
//check compatibility
|
||||||
implicitlyEnabled &= (vcmiCompatibleMin.isNull() || Version::GameVersion().compatible(vcmiCompatibleMin));
|
implicitlyEnabled &= (vcmiCompatibleMin.isNull() || CModVersion::GameVersion().compatible(vcmiCompatibleMin));
|
||||||
implicitlyEnabled &= (vcmiCompatibleMax.isNull() || vcmiCompatibleMax.compatible(Version::GameVersion()));
|
implicitlyEnabled &= (vcmiCompatibleMax.isNull() || vcmiCompatibleMax.compatible(CModVersion::GameVersion()));
|
||||||
|
|
||||||
if(!implicitlyEnabled)
|
if(!implicitlyEnabled)
|
||||||
logGlobal->warn("Mod %s is incompatible with current version of VCMI and cannot be enabled", name);
|
logGlobal->warn("Mod %s is incompatible with current version of VCMI and cannot be enabled", name);
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "JsonNode.h"
|
#include "JsonNode.h"
|
||||||
|
#include "CModVersion.h"
|
||||||
|
|
||||||
#ifdef __UCLIBC__
|
#ifdef __UCLIBC__
|
||||||
#undef major
|
#undef major
|
||||||
@ -186,30 +187,6 @@ public:
|
|||||||
PASSED
|
PASSED
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DLL_LINKAGE Version
|
|
||||||
{
|
|
||||||
int major = 0;
|
|
||||||
int minor = 0;
|
|
||||||
int patch = 0;
|
|
||||||
|
|
||||||
Version() = default;
|
|
||||||
Version(int mj, int mi, int p): major(mj), minor(mi), patch(p) {}
|
|
||||||
|
|
||||||
static Version GameVersion();
|
|
||||||
static Version fromString(std::string from);
|
|
||||||
std::string toString() const;
|
|
||||||
|
|
||||||
bool compatible(const Version & other, bool checkMinor = false, bool checkPatch = false) const;
|
|
||||||
bool isNull() const;
|
|
||||||
|
|
||||||
template <typename Handler> void serialize(Handler &h, const int version)
|
|
||||||
{
|
|
||||||
h & major;
|
|
||||||
h & minor;
|
|
||||||
h & patch;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/// identifier, identical to name of folder with mod
|
/// identifier, identical to name of folder with mod
|
||||||
std::string identifier;
|
std::string identifier;
|
||||||
|
|
||||||
@ -218,14 +195,14 @@ public:
|
|||||||
std::string description;
|
std::string description;
|
||||||
|
|
||||||
/// version of the mod
|
/// version of the mod
|
||||||
Version version;
|
CModVersion version;
|
||||||
|
|
||||||
/// Base language of mod, all mod strings are assumed to be in this language
|
/// Base language of mod, all mod strings are assumed to be in this language
|
||||||
std::string baseLanguage;
|
std::string baseLanguage;
|
||||||
|
|
||||||
/// vcmi versions compatible with the mod
|
/// vcmi versions compatible with the mod
|
||||||
|
|
||||||
Version vcmiCompatibleMin, vcmiCompatibleMax;
|
CModVersion vcmiCompatibleMin, vcmiCompatibleMax;
|
||||||
|
|
||||||
/// list of mods that should be loaded before this one
|
/// list of mods that should be loaded before this one
|
||||||
std::set <TModID> dependencies;
|
std::set <TModID> dependencies;
|
||||||
@ -381,7 +358,7 @@ public:
|
|||||||
for(const auto & m : newActiveMods)
|
for(const auto & m : newActiveMods)
|
||||||
|
|
||||||
{
|
{
|
||||||
CModInfo::Version mver;
|
CModVersion mver;
|
||||||
h & mver;
|
h & mver;
|
||||||
|
|
||||||
if(allMods.count(m) && (allMods[m].version.isNull() || mver.isNull() || allMods[m].version.compatible(mver)))
|
if(allMods.count(m) && (allMods[m].version.isNull() || mver.isNull() || allMods[m].version.compatible(mver)))
|
||||||
|
63
lib/CModVersion.cpp
Normal file
63
lib/CModVersion.cpp
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* CModVersion.h, part of VCMI engine
|
||||||
|
*
|
||||||
|
* Authors: listed in file AUTHORS in main folder
|
||||||
|
*
|
||||||
|
* License: GNU General Public License v2.0 or later
|
||||||
|
* Full text of license available in license.txt file, in main folder
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "StdInc.h"
|
||||||
|
#include "CModVersion.h"
|
||||||
|
|
||||||
|
VCMI_LIB_NAMESPACE_BEGIN
|
||||||
|
|
||||||
|
CModVersion CModVersion::GameVersion()
|
||||||
|
{
|
||||||
|
return CModVersion(VCMI_VERSION_MAJOR, VCMI_VERSION_MINOR, VCMI_VERSION_PATCH);
|
||||||
|
}
|
||||||
|
|
||||||
|
CModVersion CModVersion::fromString(std::string from)
|
||||||
|
{
|
||||||
|
int major = 0;
|
||||||
|
int minor = 0;
|
||||||
|
int patch = 0;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
auto pointPos = from.find('.');
|
||||||
|
major = std::stoi(from.substr(0, pointPos));
|
||||||
|
if(pointPos != std::string::npos)
|
||||||
|
{
|
||||||
|
from = from.substr(pointPos + 1);
|
||||||
|
pointPos = from.find('.');
|
||||||
|
minor = std::stoi(from.substr(0, pointPos));
|
||||||
|
if(pointPos != std::string::npos)
|
||||||
|
patch = std::stoi(from.substr(pointPos + 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(const std::invalid_argument &)
|
||||||
|
{
|
||||||
|
return CModVersion();
|
||||||
|
}
|
||||||
|
return CModVersion(major, minor, patch);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CModVersion::toString() const
|
||||||
|
{
|
||||||
|
return std::to_string(major) + '.' + std::to_string(minor) + '.' + std::to_string(patch);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CModVersion::compatible(const CModVersion & other, bool checkMinor, bool checkPatch) const
|
||||||
|
{
|
||||||
|
return (major == other.major &&
|
||||||
|
(!checkMinor || minor >= other.minor) &&
|
||||||
|
(!checkPatch || minor > other.minor || (minor == other.minor && patch >= other.patch)));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CModVersion::isNull() const
|
||||||
|
{
|
||||||
|
return major == 0 && minor == 0 && patch == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
VCMI_LIB_NAMESPACE_END
|
39
lib/CModVersion.h
Normal file
39
lib/CModVersion.h
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* CModVersion.h, part of VCMI engine
|
||||||
|
*
|
||||||
|
* Authors: listed in file AUTHORS in main folder
|
||||||
|
*
|
||||||
|
* License: GNU General Public License v2.0 or later
|
||||||
|
* Full text of license available in license.txt file, in main folder
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
VCMI_LIB_NAMESPACE_BEGIN
|
||||||
|
|
||||||
|
struct DLL_LINKAGE CModVersion
|
||||||
|
{
|
||||||
|
int major = 0;
|
||||||
|
int minor = 0;
|
||||||
|
int patch = 0;
|
||||||
|
|
||||||
|
CModVersion() = default;
|
||||||
|
CModVersion(int mj, int mi, int p): major(mj), minor(mi), patch(p) {}
|
||||||
|
|
||||||
|
static CModVersion GameVersion();
|
||||||
|
static CModVersion fromString(std::string from);
|
||||||
|
std::string toString() const;
|
||||||
|
|
||||||
|
bool compatible(const CModVersion & other, bool checkMinor = false, bool checkPatch = false) const;
|
||||||
|
bool isNull() const;
|
||||||
|
|
||||||
|
template <typename Handler> void serialize(Handler &h, const int version)
|
||||||
|
{
|
||||||
|
h & major;
|
||||||
|
h & minor;
|
||||||
|
h & patch;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
VCMI_LIB_NAMESPACE_END
|
@ -477,7 +477,6 @@ public:
|
|||||||
HORDE_PLACEHOLDER3 = -32,
|
HORDE_PLACEHOLDER3 = -32,
|
||||||
HORDE_PLACEHOLDER2 = -31,
|
HORDE_PLACEHOLDER2 = -31,
|
||||||
HORDE_PLACEHOLDER1 = -30,
|
HORDE_PLACEHOLDER1 = -30,
|
||||||
HORDE_BUILDING_CONVERTER = -29, //-1 => -30
|
|
||||||
NONE = -1,
|
NONE = -1,
|
||||||
FIRST_REGULAR_ID = 0,
|
FIRST_REGULAR_ID = 0,
|
||||||
MAGES_GUILD_1 = 0, MAGES_GUILD_2, MAGES_GUILD_3, MAGES_GUILD_4, MAGES_GUILD_5,
|
MAGES_GUILD_1 = 0, MAGES_GUILD_2, MAGES_GUILD_3, MAGES_GUILD_4, MAGES_GUILD_5,
|
||||||
|
@ -71,6 +71,12 @@ void GameSettings::load(const JsonNode & input)
|
|||||||
{EGameSettings::HEROES_RETREAT_ON_WIN_WITHOUT_TROOPS, "heroes", "retreatOnWinWithoutTroops" },
|
{EGameSettings::HEROES_RETREAT_ON_WIN_WITHOUT_TROOPS, "heroes", "retreatOnWinWithoutTroops" },
|
||||||
{EGameSettings::HEROES_STARTING_STACKS_CHANCES, "heroes", "startingStackChances" },
|
{EGameSettings::HEROES_STARTING_STACKS_CHANCES, "heroes", "startingStackChances" },
|
||||||
{EGameSettings::HEROES_BACKPACK_CAP, "heroes", "backpackSize" },
|
{EGameSettings::HEROES_BACKPACK_CAP, "heroes", "backpackSize" },
|
||||||
|
{EGameSettings::MAP_FORMAT_RESTORATION_OF_ERATHIA, "mapFormat", "restorationOfErathia" },
|
||||||
|
{EGameSettings::MAP_FORMAT_ARMAGEDDONS_BLADE, "mapFormat", "armageddonsBlade" },
|
||||||
|
{EGameSettings::MAP_FORMAT_SHADOW_OF_DEATH, "mapFormat", "shadowOfDeath" },
|
||||||
|
{EGameSettings::MAP_FORMAT_HORN_OF_THE_ABYSS, "mapFormat", "hornOfTheAbyss" },
|
||||||
|
{EGameSettings::MAP_FORMAT_IN_THE_WAKE_OF_GODS, "mapFormat", "inTheWakeOfGods" },
|
||||||
|
{EGameSettings::MAP_FORMAT_JSON_VCMI, "mapFormat", "jsonVCMI" },
|
||||||
{EGameSettings::MARKETS_BLACK_MARKET_RESTOCK_PERIOD, "markets", "blackMarketRestockPeriod" },
|
{EGameSettings::MARKETS_BLACK_MARKET_RESTOCK_PERIOD, "markets", "blackMarketRestockPeriod" },
|
||||||
{EGameSettings::MODULE_COMMANDERS, "modules", "commanders" },
|
{EGameSettings::MODULE_COMMANDERS, "modules", "commanders" },
|
||||||
{EGameSettings::MODULE_STACK_ARTIFACT, "modules", "stackArtifact" },
|
{EGameSettings::MODULE_STACK_ARTIFACT, "modules", "stackArtifact" },
|
||||||
@ -80,7 +86,6 @@ void GameSettings::load(const JsonNode & input)
|
|||||||
{EGameSettings::TEXTS_FACTION, "textData", "faction" },
|
{EGameSettings::TEXTS_FACTION, "textData", "faction" },
|
||||||
{EGameSettings::TEXTS_HERO, "textData", "hero" },
|
{EGameSettings::TEXTS_HERO, "textData", "hero" },
|
||||||
{EGameSettings::TEXTS_HERO_CLASS, "textData", "heroClass" },
|
{EGameSettings::TEXTS_HERO_CLASS, "textData", "heroClass" },
|
||||||
{EGameSettings::TEXTS_MAP_VERSION, "textData", "mapVersion" },
|
|
||||||
{EGameSettings::TEXTS_OBJECT, "textData", "object" },
|
{EGameSettings::TEXTS_OBJECT, "textData", "object" },
|
||||||
{EGameSettings::TEXTS_RIVER, "textData", "river" },
|
{EGameSettings::TEXTS_RIVER, "textData", "river" },
|
||||||
{EGameSettings::TEXTS_ROAD, "textData", "road" },
|
{EGameSettings::TEXTS_ROAD, "textData", "road" },
|
||||||
|
@ -46,12 +46,17 @@ enum class EGameSettings
|
|||||||
TEXTS_FACTION,
|
TEXTS_FACTION,
|
||||||
TEXTS_HERO,
|
TEXTS_HERO,
|
||||||
TEXTS_HERO_CLASS,
|
TEXTS_HERO_CLASS,
|
||||||
TEXTS_MAP_VERSION,
|
|
||||||
TEXTS_OBJECT,
|
TEXTS_OBJECT,
|
||||||
TEXTS_RIVER,
|
TEXTS_RIVER,
|
||||||
TEXTS_ROAD,
|
TEXTS_ROAD,
|
||||||
TEXTS_SPELL,
|
TEXTS_SPELL,
|
||||||
TEXTS_TERRAIN,
|
TEXTS_TERRAIN,
|
||||||
|
MAP_FORMAT_RESTORATION_OF_ERATHIA,
|
||||||
|
MAP_FORMAT_ARMAGEDDONS_BLADE,
|
||||||
|
MAP_FORMAT_SHADOW_OF_DEATH,
|
||||||
|
MAP_FORMAT_HORN_OF_THE_ABYSS,
|
||||||
|
MAP_FORMAT_JSON_VCMI,
|
||||||
|
MAP_FORMAT_IN_THE_WAKE_OF_GODS,
|
||||||
TOWNS_BUILDINGS_PER_TURN_CAP,
|
TOWNS_BUILDINGS_PER_TURN_CAP,
|
||||||
TOWNS_STARTING_DWELLING_CHANCES,
|
TOWNS_STARTING_DWELLING_CHANCES,
|
||||||
COMBAT_ONE_HEX_TRIGGERS_OBSTACLES,
|
COMBAT_ONE_HEX_TRIGGERS_OBSTACLES,
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include "TerrainHandler.h"
|
#include "TerrainHandler.h"
|
||||||
#include "mapObjects/CObjectHandler.h"
|
#include "mapObjects/CObjectHandler.h"
|
||||||
#include "mapping/CMapDefines.h"
|
|
||||||
#include "CGameState.h"
|
#include "CGameState.h"
|
||||||
|
|
||||||
VCMI_LIB_NAMESPACE_BEGIN
|
VCMI_LIB_NAMESPACE_BEGIN
|
||||||
|
@ -11,10 +11,12 @@
|
|||||||
#include "StartInfo.h"
|
#include "StartInfo.h"
|
||||||
|
|
||||||
#include "CGeneralTextHandler.h"
|
#include "CGeneralTextHandler.h"
|
||||||
|
#include "CModHandler.h"
|
||||||
|
#include "VCMI_Lib.h"
|
||||||
#include "rmg/CMapGenOptions.h"
|
#include "rmg/CMapGenOptions.h"
|
||||||
#include "mapping/CMapInfo.h"
|
#include "mapping/CMapInfo.h"
|
||||||
#include "mapping/CCampaignHandler.h"
|
#include "mapping/CCampaignHandler.h"
|
||||||
#include "mapping/CMap.h"
|
#include "mapping/CMapHeader.h"
|
||||||
#include "mapping/CMapService.h"
|
#include "mapping/CMapService.h"
|
||||||
|
|
||||||
VCMI_LIB_NAMESPACE_BEGIN
|
VCMI_LIB_NAMESPACE_BEGIN
|
||||||
|
@ -56,14 +56,14 @@ namespace EBuildingType
|
|||||||
{
|
{
|
||||||
const std::string names [44] =
|
const std::string names [44] =
|
||||||
{
|
{
|
||||||
"mageGuild1", "mageGuild2", "mageGuild3", "mageGuild4", "mageGuild5",
|
"mageGuild1", "mageGuild2", "mageGuild3", "mageGuild4", "mageGuild5", // 5
|
||||||
"tavern", "shipyard", "fort", "citadel", "castle",
|
"tavern", "shipyard", "fort", "citadel", "castle", // 10
|
||||||
"villageHall", "townHall", "cityHall", "capitol", "marketplace",
|
"villageHall", "townHall", "cityHall", "capitol", "marketplace", // 15
|
||||||
"resourceSilo", "blacksmith", "special1", "horde1", "horde1Upgr",
|
"resourceSilo", "blacksmith", "special1", "horde1", "horde1Upgr", // 20
|
||||||
"ship", "special2", "special3", "special4", "horde2",
|
"ship", "special2", "special3", "special4", "horde2", // 25
|
||||||
"horde2Upgr", "grail", "extraTownHall", "extraCityHall", "extraCapitol",
|
"horde2Upgr", "grail", "extraTownHall", "extraCityHall", "extraCapitol", // 30
|
||||||
"dwellingLvl1", "dwellingLvl2", "dwellingLvl3", "dwellingLvl4", "dwellingLvl5",
|
"dwellingLvl1", "dwellingLvl2", "dwellingLvl3", "dwellingLvl4", "dwellingLvl5", // 35
|
||||||
"dwellingLvl6", "dwellingLvl7", "dwellingUpLvl1", "dwellingUpLvl2", "dwellingUpLvl3",
|
"dwellingLvl6", "dwellingLvl7", "dwellingUpLvl1", "dwellingUpLvl2", "dwellingUpLvl3", // 40
|
||||||
"dwellingUpLvl4", "dwellingUpLvl5", "dwellingUpLvl6", "dwellingUpLvl7"
|
"dwellingUpLvl4", "dwellingUpLvl5", "dwellingUpLvl6", "dwellingUpLvl7"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,7 @@ void CRewardableConstructor::configureObject(CGObjectInstance * object, CRandomG
|
|||||||
rewardInfo.reward.extraComponents.emplace_back(Component::EComponentType::LUCK, 0, bonus.val, 0);
|
rewardInfo.reward.extraComponents.emplace_back(Component::EComponentType::LUCK, 0, bonus.val, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
assert(!rewardableObject->configuration.info.empty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "CGHeroInstance.h"
|
#include "CGHeroInstance.h"
|
||||||
#include "CBank.h"
|
#include "CBank.h"
|
||||||
#include "../TerrainHandler.h"
|
#include "../TerrainHandler.h"
|
||||||
#include "../mapping/CMap.h"
|
#include "../mapping/CMapDefines.h"
|
||||||
#include "../CHeroHandler.h"
|
#include "../CHeroHandler.h"
|
||||||
#include "../CGeneralTextHandler.h"
|
#include "../CGeneralTextHandler.h"
|
||||||
#include "../CCreatureHandler.h"
|
#include "../CCreatureHandler.h"
|
||||||
@ -338,6 +338,7 @@ CGObjectInstance * MarketInstanceConstructor::create(std::shared_ptr<const Objec
|
|||||||
if(!title.empty())
|
if(!title.empty())
|
||||||
market->title = VLC->generaltexth->translate(title);
|
market->title = VLC->generaltexth->translate(title);
|
||||||
|
|
||||||
|
if (!speech.empty())
|
||||||
market->speech = VLC->generaltexth->translate(speech);
|
market->speech = VLC->generaltexth->translate(speech);
|
||||||
|
|
||||||
return market;
|
return market;
|
||||||
|
@ -1403,7 +1403,7 @@ void CGWitchHut::initObj(CRandomGenerator & rand)
|
|||||||
|
|
||||||
for(int i = 0; i < defaultAllowed.size(); i++)
|
for(int i = 0; i < defaultAllowed.size(); i++)
|
||||||
if (defaultAllowed[i] && cb->isAllowed(2, i))
|
if (defaultAllowed[i] && cb->isAllowed(2, i))
|
||||||
allowedAbilities.insert(i);
|
allowedAbilities.insert(SecondarySkill(i));
|
||||||
}
|
}
|
||||||
ability = *RandomGeneratorUtil::nextItem(allowedAbilities, rand);
|
ability = *RandomGeneratorUtil::nextItem(allowedAbilities, rand);
|
||||||
}
|
}
|
||||||
@ -1479,7 +1479,7 @@ void CGWitchHut::serializeJsonOptions(JsonSerializeFormat & handler)
|
|||||||
allowedAbilities.clear();
|
allowedAbilities.clear();
|
||||||
for(si32 i = 0; i < skillCount; ++i)
|
for(si32 i = 0; i < skillCount; ++i)
|
||||||
if(temp[i])
|
if(temp[i])
|
||||||
allowedAbilities.insert(i);
|
allowedAbilities.insert(SecondarySkill(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,8 @@ protected:
|
|||||||
class DLL_LINKAGE CGWitchHut : public CTeamVisited
|
class DLL_LINKAGE CGWitchHut : public CTeamVisited
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::set<si32> allowedAbilities;
|
std::set<SecondarySkill> allowedAbilities;
|
||||||
ui32 ability;
|
SecondarySkill ability;
|
||||||
|
|
||||||
std::string getHoverText(PlayerColor player) const override;
|
std::string getHoverText(PlayerColor player) const override;
|
||||||
std::string getHoverText(const CGHeroInstance * hero) const override;
|
std::string getHoverText(const CGHeroInstance * hero) const override;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user